[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Conflict between pst-pdf, hyperref, pdflatex and ps2pdf; workaround



This message is for the attention of readers puzzled because pst-pdf no
longer works with hyperref.  If you are not puzzled by that, then you
can skip this message.  (Also, TeX Live's Debian Maintainers can
probably skip this message.)

If you are puzzled by that, however, and you would like a brief outline
of my workaround, the workaround's basic idea is

  * to include the \usepackage{hyperref} directive in the
    document's LaTeX source when the source is to be compiled
    with pdflatex, but
  * to exclude the \usepackage{hyperref} directive from the
    document's LaTeX source when the source is to be compiled
    with latex.

A pst-pdf build of the kind I have in mind requires compilation by both
pdflatex and latex.  Until recently, latex did not care whether the
\usepackage{hyperref} directive had been issued, but now, apparently,
latex does care.  I doubt that TeX's developers have deliberately
changed the behavior -- the change was probably inadvertent -- so it may
be that no clear documentation of the new behavior yet exists other than
the post you are now reading.

How you switch the \usepackage{hyperref} directive on and off is up to
you.  I have used LaTeX's ifthen package and a symlink to switch.  The
last message tells how to find my source if you wish to use it for
an example.

(In case TeX's developers find this message, my semi-informed guess is
that the trouble lies in hyperref.  Something has changed in LaTeX's
kernel and hyperref is not handling the change quite right.  If you are
a developer of TeX and are unsure where to start looking for the bug,
consider starting there.)

If you are composing a new document, my advice is to avoid trouble by
avoiding PSTricks.  Prefer PGF/TikZ, rather.  PSTricks is a fine,
flexible package with many useful features and a strong manual, but it
was meant for the 20th-century era in which PostScript, rather
than PDF, was the standard format for document distribution.  If you
have a old document to maintain with old PSTricks graphics as I have,
pst-pdf converts the diagrams to PDF for you; but for a new document,
if you use PGF/TikZ, instead, then you won't need pst-pdf or latex at
all (you can just use hyperref with pdflatex, rather), and the trouble
here described won't arise.

Attachment: signature.asc
Description: PGP signature


Reply to: