[tex-live] hyperref trouble with color and graphicx
Hironobu YAMASHITA
h.y.acetaminophen at gmail.com
Fri Jun 26 16:42:22 CEST 2015
> Have you tried to switch the order of paxckages? The documentation
> says that hyperref should be loaded as the last one.
Yes, of course I've tried switching the order of packages:
\usepackage[dvipdfmx]{graphicx}
\usepackage[dvipdfmx,colorlinks=true,linkcolor=blue]{hyperref}
However, color.sty still calls dvips.def and conflicts with dvipdfmx.def.
One of possible solution may be:
\usepackage[dvipdfmx]{graphicx,color}% <- explicit option for color.sty
\usepackage[dvipdfmx,colorlinks=true,linkcolor=blue]{hyperref}
But I think this kind of problem is hard to resolve on the users' side,
so I hope this can be handled on the package itself.
Regards,
Hironobu Yamashita
h.y.acetaminophen at gmail.com
2015-06-26 23:21 GMT+09:00 Zdenek Wagner <zdenek.wagner at gmail.com>:
>
> Have you tried to switch the order of paxckages? The documentation
> says that hyperref should be loaded as the last one.
> Zdeněk Wagner
> http://hroch486.icpf.cas.cz/wagner/
> http://icebearsoft.euweb.cz
>
>
> 2015-06-26 7:48 GMT+02:00 Hironobu YAMASHITA <h.y.acetaminophen at gmail.com
> >:
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-live/attachments/20150626/25654cbd/attachment-0001.html>
More information about the tex-live
mailing list