LyXInvisible \lyxadded and \lyxdeleted, undefined

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
surreel
Posts: 5
Joined: Tue Oct 29, 2013 7:01 am

Invisible \lyxadded and \lyxdeleted, undefined

Post by surreel »

Hi All,

I have a document that will not compile on one computer but will on two others. Clearly the problem is with the computer. I recently had my hard drive replaced and the OS (Windows 7) reinstalled along with LyX 2.06, MiKTeX 2.9. The main problem is that the new installation does not recognize the control sequences "\lyxadded" and "\lyxdeleted." When I compile the document from LyX, I get many "Undefined control sequence" messages, an example of which is:

Code: Select all

Code, edit and compile here:
... \ref{cha:Model-evaluation-and}\lyxadded
{Tom Loughin}{Sat Oct 26 1...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The problem occurs both for \lyxadded and \lyxdeleted.

The LaTeX export has the following possibly relevant preamble:

Code: Select all

Code, edit and compile here:
\documentclass[oneside,english]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{listings}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{xcolor}
\usepackage{pdfcolmk}
\usepackage{varioref}
\usepackage{amsbsy}
\usepackage{amstext}
\usepackage{graphicx}
\usepackage[authoryear]{natbib}
\PassOptionsToPackage{normalem}{ulem}
\usepackage{ulem}
\usepackage{subscript}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\providecolor{lyxadded}{rgb}{0,0,1}
\providecolor{lyxdeleted}{rgb}{1,0,0}
%% Change tracking with ulem
\DeclareRobustCommand{\lyxadded}[3]{{\color{lyxadded}{}#3}}
\DeclareRobustCommand{\lyxdeleted}[3]{{\color{lyxdeleted}\sout{#3}}}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
All packages are installed, and there are no warnings about them

The problem originally existed with one error in a document that actually had no visibly tracked changes, because they had all been accepted. Clicking on the error in the "LaTeX Errors" popup did not take me to any error, and It was detected even though it does not appear in the LaTeX export! Now that some additional tracked changes have been made, these are showing up in the LaTeX export and causing more errors.

I have compared the local settings on the problem computer with one of the ones where the document compiles. The main difference I could find is that the other computer is running LyX 2.0.3. There may have been other things that escaped me (not especially helpful, I realize).

Suggestions on where to look to locate the problem are much appreciated.
Last edited by cgnieder on Thu Oct 31, 2013 11:12 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Invisible \lyxadded and \lyxdeleted, undefined

Post by cgnieder »

Hi surreel,

Welcome to the LaTeX community!

Strange, according to the LaTeX export the commands are defined. Unfortunately I am no LyX user so I have only superficial knowledge of how LyX works...

What happens if you add

Code: Select all

Code, edit and compile here:
\usepackage{xcolor}
\providecolor{lyxadded}{rgb}{0,0,1}
\providecolor{lyxdeleted}{rgb}{1,0,0}
%% Change tracking with ulem
\DeclareRobustCommand{\lyxadded}[3]{{\color{lyxadded}{}#3}}
\DeclareRobustCommand{\lyxdeleted}[3]{{\color{lyxdeleted}\sout{#3}}}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
to your preamble?

Regards
site moderator & package author
surreel
Posts: 5
Joined: Tue Oct 29, 2013 7:01 am

Invisible \lyxadded and \lyxdeleted, undefined

Post by surreel »

Hi cgnieder,
What happens if you add

CODE: SELECT ALL • OPEN IN WRITELATEX
\usepackage{xcolor}
\providecolor{lyxadded}{rgb}{0,0,1}
\providecolor{lyxdeleted}{rgb}{1,0,0}
%% Change tracking with ulem
\DeclareRobustCommand{\lyxadded}[3]{{\color{lyxadded}{}#3}}
\DeclareRobustCommand{\lyxdeleted}[3]{{\color{lyxdeleted}\sout{#3}}}


to your preamble?
What happens is this: it works! (THANKS!) But I'm confused as to why this wan't getting processed before. The LaTeX export is different from what pdflatex actually processes?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Invisible \lyxadded and \lyxdeleted, undefined

Post by cgnieder »

surreel wrote:What happens is this: it works! (THANKS!)
Glad to hear!
surreel wrote:The LaTeX export is different from what pdflatex actually processes?
I can't imagine that this is true... that would be quite misleading. Something else must be going on. Maybe some LyX expert can shed some light into this.

Regards
site moderator & package author
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: Invisible \lyxadded and \lyxdeleted, undefined

Post by scottkosty »

Are you saying that the LyX document compiled in 2.0.3 and did not compile with 2.0.6? This sounds like a regression and if so it needs to be fixed. Can you please post the .lyx file (or a similar one that reproduces the problem)?. Please post a minimal .lyx file and the (complete) export to .tex from the computer with 2.0.3 and the (complete) export to .tex from the computer with 2.0.6.
surreel
Posts: 5
Joined: Tue Oct 29, 2013 7:01 am

Invisible \lyxadded and \lyxdeleted, undefined

Post by surreel »

Hi scottkosty,

Creating a MWE is proving to be a challenge. The full document is a book consisting of a master document with child documents for individual chapters and some sections. I normally open the master, then from the outline open other documents as I need them.

When I compile from the master, the errors occur. When I open the "problem child" from the master and compile it, the errors occur. But if I open the exact same file separately and compile it, there are no errors. (Acrobat doesn't open, but that's a different problem that I'm trying to solve). The isolated document has no preamble, whereas the child-within-master uses the master's preamble.

This suggests to me that there is something in the master's preamble that is choking the works. But the thing compiles on another computer in 2.0.3.

So I'm not sure what example I can load under the circumstances. I will need to create a similar master/child that expresses this problem.

In lieu for the time being, here is the Master's preamble:

Code: Select all

Code, edit and compile here:
\usepackage{epsfig}
\usepackage{theorem}
\usepackage{sunil}
\theoremstyle{definition} %Should produce correct font
\newtheorem{myExample}{Example}[chapter]
\tolerance=5000
\renewcommand{\topfraction}{0.85}
\renewcommand{\textfraction}{0.1}
\renewcommand{\floatpagefraction}{0.75}
\lstset{showstringspaces=false, breaklines=true, breakatwhitespace=true, basicstyle=\small, xrightmargin=-32pt}
\usepackage{multirow} %Added 11-12-10 to get Bird table correct - see p. 24 of Emebd objects manual
\usepackage[english]{babel}
% Added below by tom, suggested by cgnieder, trying to fix compilation issues on laptop. THE CODE BELOW FIXES THE ERRORS!
%\usepackage{xcolor}
%\providecolor{lyxadded}{rgb}{0,0,1}
%\providecolor{lyxdeleted}{rgb}{1,0,0}
%% Change tracking with ulem
%\DeclareRobustCommand{\lyxadded}[3]{{\color{lyxadded}{}#3}}
%\DeclareRobustCommand{\lyxdeleted}[3]{{\color{lyxdeleted}\sout{#3}}}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The sunil package is custom design from the publisher to match their book format. I've attached it, but I don't think it's the problem. The lyxadded and lyxdeleted errors persist if I comment the package out of the preamble. (And a bunch of new ones are created, thanks to use of custom commends from the package...)

I will try to come up with an example if I can. I won't have access to the other computer until next week, though.

Thanks for considering this issue.
Attachments
sunil.sty
(47.67 KiB) Downloaded 332 times
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: Invisible \lyxadded and \lyxdeleted, undefined

Post by scottkosty »

Thanks, surreel. If you're able to come up with a minimal example, that would be great. I know that it can take a lot of time in some cases to do so though so I understand if you're not able to.
surreel
Posts: 5
Joined: Tue Oct 29, 2013 7:01 am

Invisible \lyxadded and \lyxdeleted, undefined

Post by surreel »

Hi scottkosty,

Here are the uploads: the LyX file, which is the same in both cases, and the .tex files from 2.0.3 and 2.0.6 on diffrent computers. Comparing these, the obvious thing is that the 2.0.6 version does not add the preamble material:

Code: Select all

Code, edit and compile here:
\usepackage{xcolor}
\usepackage{pdfcolmk}
\PassOptionsToPackage{normalem}{ulem}
\usepackage{ulem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\providecolor{lyxadded}{rgb}{0,0,1}
\providecolor{lyxdeleted}{rgb}{1,0,0}
%% Change tracking with ulem
\newcommand{\lyxadded}[3]{{\color{lyxadded}{}#3}}
\newcommand{\lyxdeleted}[3]{{\color{lyxdeleted}\sout{#3}}}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
When I add the material manually to the preamble and run in 2.0.6 it works.

-Tom.
Attachments
master_test206.tex
LaTeX export from 2.0.6
(4.13 KiB) Downloaded 329 times
master_test203.tex
LaTeX export from 2.0.3
(4.51 KiB) Downloaded 272 times
master_test203.lyx
Lyx file (same on both versions)
(5.91 KiB) Downloaded 333 times
Last edited by cgnieder on Fri Nov 08, 2013 11:30 am, edited 1 time in total.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Invisible \lyxadded and \lyxdeleted, undefined

Post by scottkosty »

surreel wrote:Hi scottkosty,

Here are the uploads: the LyX file, which is the same in both cases, and the .tex files from 2.0.3 and 2.0.6 on diffrent computers. Comparing these, the obvious thing is that the 2.0.6 version does not add the preamble material:

\usepackage{xcolor}
\usepackage{pdfcolmk}
\PassOptionsToPackage{normalem}{ulem}
\usepackage{ulem}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\providecolor{lyxadded}{rgb}{0,0,1}
\providecolor{lyxdeleted}{rgb}{1,0,0}
%% Change tracking with ulem
\newcommand{\lyxadded}[3]{{\color{lyxadded}{}#3}}
\newcommand{\lyxdeleted}[3]{{\color{lyxdeleted}\sout{#3}}}

When I add the material manually to the preamble and run in 2.0.6 it works.

-Tom.
Hi Tom,

Thanks for the example. Unfortunately when I open your .lyx file I get an error "Could not load included file Chapter3_test2.lyx".

I recall there having been a change with regard to preambles of master/child. This might have something to do with it. I'm not sure if this is a regression or if it was intended.

In any case, if you can provide a minimal example (e.g include Chapter3_test2.lyx) I will pass this on to the LyX developer mailing list.

Scott
surreel
Posts: 5
Joined: Tue Oct 29, 2013 7:01 am

Re: Invisible \lyxadded and \lyxdeleted, undefined

Post by surreel »

Sorry, brain fart. Here is it. Thanks for pushing this along.

-Tom.
Attachments
chapter3_test2.lyx
Child document
(4.37 KiB) Downloaded 298 times
Post Reply