Closed zxdawn closed 4 years ago
For sure it gets confused by the $$, which can also be used to designate a displayed equation $$ ... $$ (which strictly speaking is TeX rather than LaTeX, but is common enough that latexdiff allows for that). The sort of non-local understanding needed to distinguish the two meanings would not be that easy to implement (for sure it's possible but nothing that can be done in an hour or two, at least not by me). I could introduce an option that suppresses the display math interpretation of $$ but I am a bit reluctant to have an overabundance of rarely used functions. In your examples, is there any reason why you did not simply write:
t$_\textrm{window}^3$
If spacing is an issue, you can use the negative space command (I have forgotten what this was, maybe \!
)
If you absolutely must have the exponent in a different inline math environments, I assume adding a comment between the two parts would hint at latexdiff to treat the $$ as two singles.
t$_\textrm{window}$%
$^3$
Of course, this is less human-readable, but then my first variant is more easily understood than your version. For now I will close this, as it's probably a very marginal use case, but feel free to reopen if you strongly disagree.
@ftilmann Thanks! I use the %
to deal with this problem now.
BTW, this is the "complicated" case I met (the red rectangle) in the table:
Here's the simple examples:
v1.tex
v2.tex
latexdiff.exe v1.tex v2.tex > diff.tex
diff.tex
Error