Bug#1078251: [EXT] Bug#1078251: latexdiff: (parcolumns incompatible) Text inside a \colchunk is ignored by diffing algorithm

Frederik Tilmann tilmann at gfz-potsdam.de
Mon Aug 12 16:24:35 BST 2024


> 
> Text inside the \colchunk command (which is used inside a parcolumns
> environment) escapes the diffing algorithm. Text that is inside a
> parcolumns environment but not in a colchunk is treated correctly. But
> \colchunk is essential to the core functionality of parcolumns. A
> minimal working example is attached.
> 

As it is usually better to fail to mark-up a part than produce an 
unprocessable output, latexdiff treats all unknown commands as 'unsafe' 
and with atomic arguments, i.e. it should neither be marked-up nor 
should it's arguments marked up.

With the option append-textcmd it is possible to tell latexdiff to treat 
the arguments of selected commands (+ a lot of presets) as text, which 
should be diff'ed.
So --append-textcmd=colchunk  will probably work, if colchunk is used 
directly.

But latexdiff is not a latex process so it will nor realise that the 
same applies to custom command \bilingual.

You can use --append-textcnd=bilingual  but this will only treat the 
second argument (here the English text) as text, not the first.
This limitation is difficult to work around, as it would essentially 
require a database of commands and which of their several arguments are 
text and which arent, so I am not planning to address it in the 
foreseeable future.

As a work-around you could add spaces between the \bilingual command and 
its arguments, which fools latexdiff into processing the arguments as 
normal text; this method is not entirely safe, though, as some changes 
will lead to a diff file that cannot be processed.

If the append-textcmd approach works for colchunk, I could hard-code 
that behaviour into latexdiff.



More information about the pkg-perl-maintainers mailing list