latexdiff icon indicating copy to clipboard operation
latexdiff copied to clipboard

latexdiff does not know \tolerance, \hbadness etc

Open bersbersbers opened this issue 9 years ago • 1 comments

First file:

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\LARGE\lipsum
\end{document}

Second file:

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\tolerance=1600
\LARGE\lipsum
\end{document}

The diff does not compile:

...
\begin{document}
\DIFaddbegin \tolerance\DIFadd{=1600
}\DIFaddend \LARGE\lipsum
\end{document}
! Missing number, treated as zero.
<to be read again> 
                   {
l.28 }
      \DIFaddend \LARGE\lipsum
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

bersbersbers avatar Jan 31 '17 16:01 bersbersbers

latexdiff does not understand raw TeX - it would have to understand too much of the language to make this a feasible proposition with my limited time resources. There are two workarounds: 1.Define special environment \DIFnomarkup (which should do nothing) and use the \tolerance command etc. within this environment only (see manual) 2. Define command: \newcommand{\settolerance}[1]{\tolerance=#1} etc. and only use this in body (note that I have not tested whether this actually works)

ftilmann avatar Jan 31 '17 17:01 ftilmann