Bug#1078251: latexdiff: this could be a user error

Manny debbug.1078251 at sideload.33mail.com
Fri Aug 9 10:23:11 BST 2024


Package: latexdiff
Version: 1.3.2-1
Followup-For: Bug #1078251
X-Debbugs-Cc: debbug.1078251 at sideload.33mail.com

This was in part a stupid user error, although in the end I think
latexdiff could still use a fix here. This comment made me realise
there is a bit of configurability, which is essential:

  https://github.com/ftilmann/latexdiff/issues/294#issuecomment-1950289552

So then I attempted to the following command variations:

  $ latexdiff --append-safecmd=append-file='colchunk' old.tex new.tex > diff.tex
  $ latexdiff --append-context1cmd='colchunk' old.tex new.tex > diff.tex
  $ latexdiff --append-context2cmd='colchunk' old.tex new.tex > diff.tex

  $ latexdiff --append-safecmd=append-file='bilingual' old.tex new.tex > diff.tex
  $ latexdiff --append-context1cmd='bilingual' old.tex new.tex > diff.tex
  $ latexdiff --append-context2cmd='bilingual' old.tex new.tex > diff.tex

Those did not make a difference. But matters are apparently
complicated by the \bilingual command that wraps a sequence of
\colchunk commands. When the \bilingual command is removed and
\colchunk is used more directly, then this command works:

  $ latexdiff --append-context1cmd='colchunk' old.tex new.tex > diff.tex

It’s unclear why --append-safecmd='bilingual' failed to have effect
but I get the impression some PERL is needed. The --append-context*cmd
variations only operate on the last argument to bilingual, but in this
case there are two paragraph text arguments so the first paragraph is
ignored.

The latexdiff default configuration should probably treat colchunk
correctly in the normal case. And the configuration options probably
need an extra parameter so users can specify which arguments to a
custom command need treatment.



More information about the pkg-perl-maintainers mailing list