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

Jens Seidel jensseidel at users.sf.net
Wed Aug 10 19:40:44 UTC 2005


On Wed, Aug 10, 2005 at 08:17:52PM +0200, Frank Küster wrote:
> Frank Küster <frank at kuesterei.ch> wrote:
> > 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
> 
> Instead I suggest
> 
> \usepackage{ifpdf}
> \ifpdf
> \usepackage[hypertex]{hyperref}
> \else
> \usepackage[colorlinks=true]{hyperref}
> \fi

I can only guess that you mean (I noticed that already in your last
mail!)

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

You assume that hyperref detects pdf mode and enables the pdftex option
by default, right? But please note that the documentation
(manual.pdf.gz, section 5.3) of hyperref contains that without specified
driver option "hypertex" is used.

So I think the following should work
\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex,colorlinks=true]{hyperref}
\else
\usepackage{hyperref}
\fi

which is the same as currently used (exception: colorlinks; this breaks
external links both in dvi and pdf (created by pdflatex)) since
no driver stands for hypertex.

You do not want to drop the pdftex option, right?

> Background:
> 
> - the breaklinks option *does* work, but it only has an effect on
>   document-internal links, i.e. ordinary text like in the table of
>   contents that links to the pages of the respective section headings.
>   It has no effect on the line breaking in external hyperlinks like the
>   ones on page 7 of the Debian-reference which was mentioned in
>   #214249. 

Ah, a little bit inconsistent but OK.

> - If you produce a pdf with \usepackage[hypertex]{hyperref}
>   (i.e. without the breaklinks option) with the sequence latex; dvips;
>   ps2pdf, the external links are broken over the line but still work,
>   but the internal links do not work (because it is the wrong driver).
> 
> - If you produce a pdf with \usepackage{hyperref} with the same sequence
>   latex; dvips; ps2pdf, the external links are not broken over the line,
>   but the internal links do work (because it takes the correct driver).
> 
> In summary, I would suggest *not* to use the sequence latex; dvips;
> ps2pdf at all to produce pdf files, simply because dvips has some
> limitations here.  Instead, use "latex; dvips" only when you want to
> provide a ps file for printing, and use pdflatex directly when you want
> to make pdf files.

I know (and added a few comments about this e.g. in my old fixlatex script
which is still in DDP). hyperref cannot guess the driver and
debiandoc2latex{dvi,ps} cannot know how the user processes the file.

I checked the DDP and noticed that only counting-potatoes and refcard
use ps2pdf.

> With the setup above, both ways work fine, and the
> links are not colored in the PS file which I consider nicer - the color
> doesn't signify anything in the printout.  Alternatively, you could use
> something like

Since these links are not active in ps I agree (and the links are
underlined in dvi).

Jens




More information about the Debiandoc-sgml-pkgs mailing list