Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I tend to use LyX for composing scientific papers, but a journal wants me to have changed text marked in specific ways that don't happen to be the way that LyX translates tracked changes into PS/PDF.

Is there a way to modify not just the color but also the underlining of changed text when it's converted to PS or PDF? I suppose I'd have to do something with the \lyxadded and/or \lyxdeleted commands?

LyX seems to always generate commands that look like \lyxadded{My Name,,,}{2011 blah blah date}{my text}, so if there's a good way to intercept this and add my own formatting to the {my text} part, that would probably work if there's no more elegant way.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

As long as you don't want to get fancy with detecting whether changed text should be viewed on the output or not, it's actually quite simple. LyX writes the \lyxadded command into its own preamble in the generated .tex file:


and this preamble occurs before the one it gives to you under Document / Settings ... / LaTeX Preamble. So all you have to do is redefine the command:


Since LyX already uses the ulem package for striking out changes, \uline is available without any additional usepackageing.

If you go this route, you're probably best off leaving the "show changes" on every time you export, and just renew the \lyxadded and \lyxdeleted commands as appropriate when you don't want to see them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.