[NTG-pdftex] Creating identical PDF files with different pdfTeX runs

Frank Küster frank at debian.org
Thu Mar 16 22:24:59 CET 2006


The Thanh Han <hanthethanh at gmail.com> wrote:

> there are a few places where pdftex takes the current time
> into account to generate certain tags. Implementing a
> primitive to leave out date-related things is not difficult.
> Can you please give some further explain what it would be useful
> for? 

1. Regression tests for package writers.  I already have set a simple
   setup in one or two LaTeX packages of mine, and it was very helpful
   when I decided to make big changes to the implementation without
   changing the interface.

   I always wanted to generalize this, but never came to it.

2. Regression testing for TeX distributions or, e.g., rpm or deb
   packages of texlive or teTeX for some Linux distribution.  When
   internals change (like rearranging TEXMF trees, putting fonts in
   other packages, changing dependencies, etc.), the documents should
   not change.

   This is actually the reason why we are now talking about this:
   There are a couple of Debian developers who invest a lot of effort in
   automated package tests, and one of them asked whether such thing was
   possible in teTeX.  We started discussing, now I'm here.

3. Regression testing in pdfTeX: A change that only aims at
   e.g. performance enhancements should not alter the document.  Many
   other changes of course will change it.

> Also note that even when such a primitive is available, the
> chance you get the same output for a given input file is
> rather low. You need to ensure that *all* relevant files
> (like font-related stuff, macro, figure etc.) are also the
> same.

That means that such tests would have to be done in a "controlled
environment".  That's easy for application 2, and probably not too hard
for 1.  For 3, it's not trivial - I don't think you can run the tests
after compiling, like other programs, e.g. perl, do, and hope they will
succeed on any system.  But if you recreate the known-good data on
*your* system just before applying a problematic patch, and test
afterwards, that should work.

Regards, Frank

-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX)



More information about the ntg-pdftex mailing list