Bug#321942: [debiandoc-sgml-pkgs] Bug#321942: Coordinating upload of teTeX-3.0 to unstable

Frank Küster frank at kuesterei.ch
Tue Aug 9 11:50:13 UTC 2005


Jens Seidel <jensseidel at users.sf.net> wrote:

>> >   Is the patch backwards compatible? (i.e., when used with teTeX-2.0,
>> >   will be the output correct?) If so, I would file at important and
>> >   ask for the patch to be applied ASAP; and NMU prior to uploading
>> >   teTeX-3.0 if it has not been fixed by then.
>> 
>> Yes, it is backward compatible.  It would have worked with woody (and
>> should in fact have been applied back then).
>
> Please note that bug #214249 was the reason that I introduced
>
> \ifx\pdfoutput\undefined
> \usepackage[hypertex,colorlinks=true]{hyperref}
> \else
> \usepackage[pdftex,colorlinks=true]{hyperref}
> \fi
>
> to debiandoc-sgml package. I agree that #214249 is not very important
> but the output was definitivly different for dvi and pdf without the
> \ifx.
>
> (I copied this conditional in nearly every document I wrote since 1997,
> since it worked great. 

... until somebody wants to produce DVI with pdfTeX...

Indeed, I missed the problem with breaklinks and dvips vs. hypertex.
I'll investigate this, and maybe we'll find a fix that does not need to
differentiate between PDF and DVI output.

However, for the time being, you should use ifpdf.sty instead:

\usepackage{ifpdf}
\ifpdf
\usepackage[hypertex,colorlinks=true]{hyperref}
\else
\usepackage[pdftex,colorlinks=true]{hyperref}
\fi

You can have a look at the code in ifpdf.sty.  The purpose of all that
is not only to correctly detect whether we are running TeX, or pdfTeX in
DVI mode, or pdfTeX in PDF mode, but also to not change the
"definedness" and the setting of \pdfoutput, so that this can be checked
again.  The code you use does not only fail with pdfTeX in DVI mode, it
also has the side effect that now \pdftex is \relax even when TeX is
used, and doing the test a second time will fail.

Regards, Frank

P.S. debian-tetex-maint is subscribed to both bugs, no need to Cc
-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer





More information about the Debiandoc-sgml-pkgs mailing list