[texhax] best way to revise a large existing text

W.J. Metzger wes at hef.ru.nl
Tue Oct 27 17:20:09 CET 2009

On Mon, 26 Oct 2009, Frederik Tilmann wrote:

> Dear Wes
> I have never had any reports of segfaults, and I know some people have used
> it on their PhD thesis, so length should not really be an issue. It should
> really bail with a Perl error if there was anything wrong with the latexdiff
> code.
> What's your system and perl version?  Did you try latexdiff-fast, which might
> be more robust if there is a memory problem with perl?
> Frederik

Dear Frederik,

I run on Scientific Linux 5.3, which is a clone of Red Hat Enterprise 5.
The perl version is  v5.8.8 built for i386-linux-thread-multi
latexdiff latexdiff-fast and latexdiff-so all gave the segmentation fault.

I tried doing it also on another machine with a slightly older version of
perl v5.8.5, but with twice the memory.  It also gave the segmentation

I've played around with the tex file and found that the segmentation fault
could be avoided by adding a comment line -- line 635 of the attached file.
If that line is removed, I get the segmentation fault.

The segmentation fault occurs very quickly, almost immediately. So I think
that latexdiff has not started looking for the differences yet.

I thought that the problem might be misinterpreting a { that was in a
comment, since adding a comment with a } got rid of the segmentation fault.
I attempted to isolate the problem in a small test file, containing only
the \begin{figure} - \end{figure} in which line 635 occurs.  But I did not
get a segmentation fault with or without line 635.
So the problem is more complicated than just the { in a comment.

Another problem, but only a slightly annoying one, is an apparent
misparsing of a line ending in a \
  use \ell\
  rather than l to avoid confusion with 1
Apparently the blank after \ell\  is not seen and results in warning

Further, differences in equations sometimes lead to incorrect mathmode in
the difference file resulting in latex needing to insert a $.

All in all,  latexdiff seems to work well for text, but has some problems
when things get complicated.

> W.J. Metzger wrote:
>> On Fri, 23 Oct 2009, martin f. krafft wrote:
>>> also sprach Boris Veytsman <borisv at lk.net> [2009.09.22.1700 +0200]:
>>>> Try latexdiff, http://www.ctan.org/tex-archive/support/latexdiff/
>>> That was a marvelous suggestion. Thanks.
>> It sounded good to me too.  So I downloaded it and tried it -- works fine
>> on small tex files, but when I tried it on 'real' files it results in a
>> segmentation fault.  Do others also have this experience?

Cheers, Wes

Dr. W. J. Metzger            Experimental High Energy Physics Group
tel. +31-24-3653127          Faculty of Science
      +31-24-3652099 (secr.)  Radboud University Nijmegen
fax. +31-24-3652191          Heyendaalseweg 135
                              6525 AJ  Nijmegen,  The Netherlands
e-mail:  wes at hef.ru.nl       or   Wesley.Metzger at cern.ch
http://home.cern.ch/metzger/ or   http://www.hef.ru.nl/~wes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pap7.tex
Type: application/x-tex
Size: 114431 bytes
URL: <http://tug.org/pipermail/texhax/attachments/20091027/0d592177/attachment-0001.tex>

More information about the texhax mailing list