On 12/6/18 5:39 PM, Daniel Goya wrote:
Hello everyone,
I just realised that I could not compile a file displaying changes,
when the change, within a TeX code, includes a %.
I attach an MWE. Sure it doesn't make much sense to try to display
something commented out, but still, it's useful within LyX to be able
to see where I added a comment, but if I keep it as "added" with track
changes, then I can't compile a version displaying all other changes.
Is it just a bug?
I would say so. If you look at the "code" view to see what LaTeX is
generated, you can see that the percent sign not only makes the
following text look like it's commented out but also comments out the
closing brace (}) of the LyX-inserted LaTeX function for which the
changed text is an argument. So you get a fatal LaTeX syntax error. My
feeling is that LyX should escape any percent signs in changed content.
Has it been reported? (not sure where of how to look for it).
The place to look would be the bug tracker, which you can find in the
left margin of the LyX home page (http://lyx.org). Unfortunately, the
bug tracker does not have advanced search functionality (at least not
that I can find), so my search attempts either found nothing (which
might or might not mean it's unreported) or a zillion hits (all
extraneous as best I could tell). I'd suggest reporting it and let the
devs decide if it duplicates an existing ticket. If you do report it,
there's a box to indicate which component of LyX is the offender. I
think "changes" would be the correct setting there.
Paul