ftilmann / latexdiff

Compares two latex files and marks up significant differences between them. Releases on www.ctan.org and mirrors
GNU General Public License v3.0
518 stars 73 forks source link

\protect\cite causes a diff that does not compile #44

Open wmuni opened 8 years ago

wmuni commented 8 years ago

Hi,

when using \protect\cite{} in a figure caption (and the figure caption was added, latexdiff produces an output that does not compile, at least not with the vldb class that is available from

http://vldb2016.persistent.com/download_files/vldb.cls

I have not looked at the latexdiff code, but maybe the easiest fix is to not split \protect\cite if it is found.

base.txt diff.txt extend.txt

ftilmann commented 8 years ago

OK, I had a look. Unfortunately your suggested fix is not so easy to implement without causing other problems. If I change \documentclass{vldb} to \documentclass{article} then it works as expected, so there must be some particular problem with the vldb package. As this is a non-standard package, I am a little bit reluctant to potentially break other functionality to accommodate that package. As a work-around you can use option --disable-citation-markup, which will result in compilable code even under vldb but means that citations are no longer marked up.