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
513 stars 72 forks source link

Problem with \input files #207

Closed pauloney closed 4 years ago

pauloney commented 4 years ago

From the manul I understand that ``latexdiff'' works fines with commands like \input, but I am having a hard time making it work on the simplest of all examples -- 4 files all in the same directory:

  1. oldsub.tex
  2. newsub.tex
  3. oldinp.tex
  4. oldinpold files.zip

All attached. When I run:

 latexdiff --flatten oldinp.tex newinp.tex > inp-diff.tex

I get a file that does not process:

(./inp-diff.aux) ! I can't find file `{'.

\protect l.44 \input \DIFdelbegin \DIFdel{oldsub} \DIFdelend \DIFaddbegin \DIFadd{news... (Press Enter to retry, or Control-D to exit) Please type another input file name: ! Emergency stop. \protect l.44 \input \DIFdelbegin \DIFdel{oldsub} \DIFdelend \DIFaddbegin \DIFadd{news... No pages of output. Transcript written on inp-diff.log. I have no problems with include files. This is running on the latest version 1.3.2a
ftilmann commented 4 years ago

You have to write \input{oldsub}, ie. curly braces and no space between command and its argument (as described on page 3 of the latexdiff manual (pdf file) ). For \input I guess one could add some custom preprocessing, but given that the format with the curly braces is the one used by any LaTeX tutorial or help I am familiar with, this is not something I will pursue now. (Thanks for the well-organised bug report and example, though)