[pdftex] Hyperref and graphics

Heiko Oberdiek oberdiek at uni-freiburg.de
Sun Jul 21 16:08:37 CEST 2002


On Sat, Jul 20, 2002 at 01:16:58PM -0700, John Usher wrote:
> 
> I am trying to include graphics using PDFLATEX and the hyperref package.

Why do you assume, that hyperref can include graphics? Perhaps
you are surprised, but for including graphics there are the
two packages "graphics" or the more powerful "graphicx".

> I can include eps figures if I include the epsfig package, but only if I use
> "\epsfig{figure=[file]}"

Since many many years the LaTeX standard way is the use
of package "graphics" or "graphicx" for including graphics.
"epsfig" is a relict from one of the last centuries.

> \usepackage{psfrag}

Not supported by pdfTeX, PDF does not have
the power of a programming language such as PostScript.
You can try pdftricks for a way to use psfrag with
pdfTeX.

> \usepackage{doublespace, graphicx, subfigure}

"doublespace" comes from LaTeX 2.09, replace it
by the successor "setspace".

> \usepackage[pdftex,                %%% hyper-references for pdflatex
> bookmarks=true,                    %%% generate bookmarks ...
> bookmarksnumbered=true,            %%% ... with numbers
> hypertexnames=false,               %%% needed for correct links to figures
> !!!

Not recommended, not needed for correct links to figures.
You can use package hypcap if you want a better anchor
placement.

> breaklinks=true,                   %%% break links if exceeding a single
> line

hyperref chooses this automatically, if the driver supports this.
Therefore the use of breaklinks is not recommended.

> \textwidth = 6.5 in \textheight = 8.5 in \oddsidemargin = 0 in
> \evensidemargin = 0 in \topmargin = 0.0 in \headheight = 14.5 pt
> \headsep = 0.5 in
> \parskip = 0.2in

These are plain-TeX assignments.

\setlength{\textwidth}{6.5in}% This is LaTeX2e

> \begin{document}
> \DeclareGraphicsExtensions{.jpg,.pdf,.mps,.png}

This is already done by the driver file "pdftex.def".

> the log complains:
> __________
> ! Too many }'s.
> \color at endbox ->\color at endgroup \egroup

Perhaps "doublespace" can be the cause, see above.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>



More information about the pdftex mailing list