Module for the changebar package

Author: Paul A. Rubin (rubin@msu.edu), based on code proposed by Juergen
Spitzmueller (http://comments.gmane.org/gmane.editors.lyx.general/66666).

http://mid.gmane.org/562ACBC5.8030102@msu.edu
This commit is contained in:
Guillaume Munch 2015-11-01 22:30:38 +00:00
parent 9c728530c2
commit 646be95979
2 changed files with 30 additions and 0 deletions

View File

@ -2005,6 +2005,7 @@ dist_layouts_DATA =\
layouts/book.layout \ layouts/book.layout \
layouts/braille.module \ layouts/braille.module \
layouts/broadway.layout \ layouts/broadway.layout \
layouts/changebars.module \
layouts/chess.layout \ layouts/chess.layout \
layouts/cl2emult.layout \ layouts/cl2emult.layout \
layouts/ctex-article.layout \ layouts/ctex-article.layout \

View File

@ -0,0 +1,29 @@
#\DeclareLyXModule[changebar.sty]{Change bars}
#
#DescriptionBegin
#Enables LyX to add vertical change bars in the margin of PDF output
#when change tracking is turned on and pdflatex output format is chosen.
#DescriptionEnd
#
#Author: Paul A. Rubin (rubin@msu.edu)
#Based on code proposed by Juergen Spitzmueller
#(http://comments.gmane.org/gmane.editors.lyx.general/66666).
#
# Note: the \providecommand statements are necessary to avoid
# error messages from the \renewcommand statements if change
# tracking is turned off in the document.
#
Format 49
AddToPreamble
\usepackage{changebar}
\providecommand{\lyxadded}[3]{}
\providecommand{\lyxdeleted}{}
\renewcommand{\lyxadded}[3]{
{\protect\cbstart\color{lyxadded}{}#3\protect\cbend}
}
\renewcommand{\lyxdeleted}[3]{%
{\protect\cbstart\color{lyxdeleted}\sout{#3}\protect\cbend}
}
EndPreamble