Open lucainnocenti opened 7 years ago
Consider the following two files:
old.tex:
old.tex
\documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{gathered} a \\ b \end{gathered} \end{equation} \end{document}
and new.tex:
new.tex
\documentclass{article} \usepackage{amsmath} \begin{document} \end{document}
Running latexdiff old.tex new.tex > diff.tex produces (with latexdiff 1.2.0, Windows 10):
latexdiff old.tex new.tex > diff.tex
diff.tex:
diff.tex
\documentclass{article} %DIF LATEXDIFF DIFFERENCE FILE %DIF DEL .\test_old.tex Tue Mar 21 16:11:14 2017 %DIF ADD .\test_new.tex Tue Mar 21 16:11:13 2017 \usepackage{amsmath} %DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF %DIF UNDERLINE PREAMBLE %DIF PREAMBLE \RequirePackage[normalem]{ulem} %DIF PREAMBLE \RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE \providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE \providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}} %DIF PREAMBLE %DIF SAFE PREAMBLE %DIF PREAMBLE \providecommand{\DIFaddbegin}{} %DIF PREAMBLE \providecommand{\DIFaddend}{} %DIF PREAMBLE \providecommand{\DIFdelbegin}{} %DIF PREAMBLE \providecommand{\DIFdelend}{} %DIF PREAMBLE %DIF FLOATSAFE PREAMBLE %DIF PREAMBLE \providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE \providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE \providecommand{\DIFaddbeginFL}{} %DIF PREAMBLE \providecommand{\DIFaddendFL}{} %DIF PREAMBLE \providecommand{\DIFdelbeginFL}{} %DIF PREAMBLE \providecommand{\DIFdelendFL}{} %DIF PREAMBLE %DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF \begin{document} \DIFdelbegin \begin{displaymath} \DIFdel{\begin{gathered} a }\\ \DIFdel{b \end{gathered} }\end{displaymath} %DIFAUXCMD %DIFDELCMD < %DIFDELCMD < %%% \DIFdelend\end{document}
Compiling diff.tex results in compilation errors, most likely due to way the gathered environment is split at the linebreak.
gathered
Is there a workaround for this?
+1. I have the same issue. A workaround is to surround manually with a blue color group (or a single \DIFdel / \DIFadd), but is quite annoying.
\DIFdel
\DIFadd
Consider the following two files:
old.tex
:and
new.tex
:Running
latexdiff old.tex new.tex > diff.tex
produces (with latexdiff 1.2.0, Windows 10):diff.tex
:Compiling
diff.tex
results in compilation errors, most likely due to way thegathered
environment is split at the linebreak.Is there a workaround for this?