[tex-live] hyperref trouble with color and graphicx

Lars Madsen daleif at math.au.dk
Fri Jun 26 17:07:26 CEST 2015


In my case TL15 on Linux, it includes both the .eps and PDF just fine

Do you mind posting the log? Just to be sure that there aren't any files picked up from the wrong place.

Are your sure there isn't a problem with tiger.*?



/Lars Madsen
Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University
Mere info: http://au.dk/daleif@math<http://au.dk/daleif@imf> / More information: http://au.dk/en/daleif@math<http://au.dk/en/daleif@imf>

________________________________
From: Hironobu YAMASHITA [h.y.acetaminophen at gmail.com]
Sent: 26 June 2015 17:03
To: Lars Madsen
Cc: tex-live at tug.org
Subject: Re: [tex-live] hyperref trouble with color and graphicx

​I'm tested on both MacTeX-2015 on OS X Lion (10.7.5) and
TeX Live 2015 on Windows 7 Professional.
All packages are up-to-date with tlmgr.

I failed to include ``tiger.pdf'' when ``.pdf'' extension is not explicitly
written in test.tex, but ``tiger.eps'' can be included even when ``.eps''
extension is omitted.

Hironobu Yamashita


2015-06-26 23:56 GMT+09:00 Lars Madsen <daleif at math.au.dk<mailto:daleif at math.au.dk>>:
exactly which LaTeX installation are you using?

I replaced tiger with rose (as I had that one)

Then no problem with your MWE on TeX Live 2015, using latex + dvipdfmx


/Lars Madsen
Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University
Mere info: http://au.dk/daleif@math<http://au.dk/daleif@imf> / More information: http://au.dk/en/daleif@math<http://au.dk/en/daleif@imf>

________________________________
From: tex-live [tex-live-bounces at tug.org<mailto:tex-live-bounces at tug.org>] on behalf of Hironobu YAMASHITA [h.y.acetaminophen at gmail.com<mailto:h.y.acetaminophen at gmail.com>]
Sent: 26 June 2015 07:48
To: tex-live at tug.org<mailto:tex-live at tug.org>
Subject: [tex-live] hyperref trouble with color and graphicx

Hello,

I have some trouble with hyperref.sty when used at the same time with
graphicx.sty. The following LaTeX source can cause an error.
Please typeset using LaTeX + dvipdfmx.
(tiger.pdf can be obtained by converting tiger.eps with Ghostscript.)

----- test.tex -----
%#!latex -> dvipdfmx
\documentclass{article}
\usepackage[dvipdfmx,colorlinks=true,linkcolor=blue]{hyperref}
\usepackage[dvipdfmx]{graphicx}
\begin{document}
I will introduce an example of mathematical beauty.
\begin{equation}
  e^{i \pi} + 1 = 0 \label{eq1}
\end{equation}
Equation (\ref{eq1}) is called ``Euler's identity.''

Sample image here:
\includegraphics[width=3ex]{tiger} % tiger.pdf (extension implicit)
%\includegraphics[width=3ex]{tiger.pdf} % tiger.pdf
Tiger!
\end{document}
----- End of test.tex -----

The error message is:
----------
./test.tex:12: LaTeX Error: File `tiger' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.12 \includegraphics[width=3ex]{tiger}
                                        % tiger.pdf
?
----------

However,
* When "colorlinks" option is removed, test.tex causes no error.
* When .pdf extension is given explicitly, test.tex causes no error.

I think this is because "dvips.def" is loaded internally by color.sty
without driver option, and overloads "dvipdfmx.def" which has been
already loaded by graphicx.sty. This problem can be fixed:

l.2974 in "hyperref.sty" (2012/11/06 v6.83m)
----------
\DeclareVoidOption{dvipdfmx}{%
  \HyOpt at CheckDvi{dvipdfmx}{%
    \def\Hy at driver{hdvipdfm}%
    \PassOptionsToPackage{dvipdfmx}{color}% <- Add this line!
  }%
}
----------

This will solve all the unexpected results coming from conflict
between two drivers.
I hope this information helps improve hyperref package.
Regards,

Hironobu Y
​AMASHITA

h.y.acetaminophen at gmail.com<mailto:h.y.acetaminophen at gmail.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-live/attachments/20150626/4afc13f8/attachment.html>


More information about the tex-live mailing list