Need help? Call 517-432-6200 or ithelp@msu.edu

Commit 8ddb8626 by Paul Rubin

Made code conditional on \pdfoutput=1, which seems to limit it to pdflatex.

Removed the \providecommand statements, which are redundant given the test of \pdfoutput.
Updated the comments and README file accordingly.
1 parent 9f162406
Showing with 14 additions and 13 deletions
......@@ -10,7 +10,7 @@ In `Document > Settings... > Modules`, select `Change bars` and click `Add` foll
Change bars will appear in the output only if `Document > Change Tracking > Show Changes in Output` is selected.
**IMPORTANT:** Use of the `Change bars` module will cause problems with any compilation method other than `PDF (pdflatex)`.
**IMPORTANT:** The `Change bars` module will not work with any compilation method other than `PDF (pdflatex)`.
### Options
Please consult the package documentation for details regarding options to the `changebar` package. One commonly used option determines the placement of the change bars. The choices (fairly self-explanatory) are `outerbars`, `innerbars` (default), `leftbars` and `rightbars`. To specify the location, enter the option in `Document > Settings... > Document Class > Class options > Custom:`.
\ No newline at end of file
......@@ -9,21 +9,21 @@
#Based on code proposed by Juergen Spitzmueller
#(http://comments.gmane.org/gmane.editors.lyx.general/66666).
#
# Note: providecommand is needed to prevent compilation errors if a
# document does not have both change tracking and display changes in output
# enabled.
# Note: Currently the code only works with pdflatex. The test
# of \pdfoutput=1 limits it to that case.
#
Format 49
AddToPreamble
\usepackage{changebar}
\providecommand{\lyxadded}[3]{#3}
\renewcommand{\lyxadded}[3]{%
{\protect\cbstart\color{lyxadded}{}#3\protect\cbend}%
}
\providecommand{\lyxdeleted}{}
\renewcommand{\lyxdeleted}[3]{%
{\protect\cbstart\color{lyxdeleted}\sout{#3}\protect\cbend}%
}
% limit what follows to pdflatex
\ifnum\pdfoutput=1
\usepackage{changebar}
\renewcommand{\lyxadded}[3]{%
{\protect\cbstart\color{lyxadded}{}#3\protect\cbend}%
}
\renewcommand{\lyxdeleted}[3]{%
{\protect\cbstart\color{lyxdeleted}\sout{#3}\protect\cbend}%
}
\fi
EndPreamble
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!