Open shhyou opened 1 year ago
Thanks for the great work on latexdiff! This is such an incredible project.
latexdiff
I've hit an issue when I use nested arrays with curly braces. Consider the file df.tex:
array
df.tex
\documentclass{article} \usepackage{amsmath,amsfonts,amssymb} \begin{document} \[\begin{array}{l} { \begin{array}{ll} 1 & 2 \\ 3 & 4 \end{array} } \end{array}\] \end{document}
When I run latexdiff df.tex df.tex, the output is:
latexdiff df.tex df.tex
% ... latexdiff preamble ... \begin{document} \[\begin{array}{l} { \begin{array}{ll} 1 & 2 \\ 3 & 4 } % <- here \end{array} % <- here \end{array}\] \end{document}
The closing curly brace } and the inner \end{array} are swapped. This example is extracted from a use case where I need to adjust arraystretch for the inner array. That is, I have the actual code like this:
}
\end{array}
arraystretch
\[\begin{array}{l} { \renewcommand{\arraystretch}{1.5} \begin{array}{ll} 1 & 2 \\ 3 & 4 \end{array} } \end{array}\]
I am not sure if this is related to #47 and #39. How do I work around the issue?
The version of latexdiff:
$ latexdiff --version This is LATEXDIFF 1.3.2 (Algorithm::Diff 1.15 so, Perl v5.30.3) (c) 2004-2021 F J Tilmann
Thanks for the great work on
latexdiff
! This is such an incredible project.I've hit an issue when I use nested
array
s with curly braces. Consider the filedf.tex
:When I run
latexdiff df.tex df.tex
, the output is:The closing curly brace
}
and the inner\end{array}
are swapped. This example is extracted from a use case where I need to adjustarraystretch
for the innerarray
. That is, I have the actual code like this:I am not sure if this is related to #47 and #39. How do I work around the issue?
The version of latexdiff: