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

Frank Küster frank at kuesterei.ch
Thu Aug 11 11:05:52 UTC 2005


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

> 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!)

Excuse me.

> \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.

The documentation of hyperref is notoriously outdated with respect to
the package.  In fact it chooses "pdftex" for pdflatex in PDF mode, and
the "default" driver for DVI mode.  However, it wasn't hyperref's
author, but Thomas Esser from teTeX who changed the default from
hypertex to dvips.  hypertex is useful for DVI files, dvips for PDF
files created via latex;dvips;distiller/ps2pdf.

Generally speaking:

I think you should first decide whether you want to always go the
pdfLaTeX way when you produce PDF files, or whether there is some reason
to stick to latex;dvips;ps2pdf.  There is only one reason I can think
of: Inclusion of eps files (except if created by MetaPost) is only
possible via latex;dvips;ps2pdf.  On the other hand there are two
alternatives: Since this is a script for automatic creation of docs, it
shouldn't be hard to automatically convert any eps file to pdf (epstopdf
is the tool of choice) which can be used with pdflatex, or you can use
latex to produce a DVI plus dvipdfm to produce the PDF - I'm not
familiar with that way, but the hyperref driver is dvipdfm in this case.

If you have decided that you will create DVI files only for producing PS
files for printout, not for further processing to PDF, then things are
easy.  Either you use hyperref.sty for DVI files only in draft mode to
get the \url command (since there are no clickable hyperlinks on
paper...), or---if you also want to create DVI files for online
viewing---use \usepackage[hypertex]{hyperref} to get clickable links in
xdvi.  The color is a matter of taste then - black color because the
printout looks better, or colors because it's easier to see in xdvi.

If you ensist on using latex and dvips to produce PDF files, then you
have to either live with non-broken links (with dvips) or non-working
links (with hypertex; it seems that the URL links magically do work,
only the internal links not, in tex files produced by debiandoc-sgml,
although not in a small example document).

> 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.

No, it isn't ideal.

- For DVI mode, this would (because of the change in teTeX) choose dvips,
  which has the effect that links are not broken over the line (because
  dvips---or even PS---doesn't support this).  This is ugly (and the
  cause of that old bug #29xxxx).  

  Using [hypertex] for DVI output results in line breaking in URL links,
  I have checked this.  Internal links will not work (because dvips
  doesn't understand the instructions from the hypertex driver), but
  that does not matter if you want to create only PS files for
  printout.  Internal links will still not be broken -- this can be
  changed with the breaklinks option.

- In PDF mode, your proposal works - currently

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

Yes, I do, because it's the autodeteced default for pdfTeX in PDF mode,
anyway, and because not specifying a driver makes things easier if there
is a new, better default for pdfTeX in PDF mode.

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

We could file bugs against those, requesting them to use
debiandoc2latexpdf directly.

Regards, Frank

-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer





More information about the Debiandoc-sgml-pkgs mailing list