[XeTeX] xelatex, hyperref, and new TeXLive

Ross Moore ross.moore at mq.edu.au
Thu Jun 16 01:25:09 CEST 2016


Hi Mike, David, Herb,

On Jun 16, 2016, at 8:46 AM, maxwell <maxwell at umiacs.umd.edu<mailto:maxwell at umiacs.umd.edu>> wrote:

With the help of David Carlisle and Herbert Schulz, I've found part of the problem.  For some reason, in the (our?) 2016 version, kpsewhich points to this hyperref.cfg file:
  ...texlive/2016/texmf-dist/doc/latex/listings-ext/hyperref.cfg

I’m seeing the same behaviour, but for me the packages are as follows:

(/usr/local/texlive/2016/texmf-dist/tex/latex/latexconfig/hyperref.cfg)

/usr/local/texlive/2016/texmf-dist/tex/latex/hyperref/hyperref.sty:4322: Packag
e hyperref Error: Wrong DVI mode driver option `dvipdfmx',
(hyperref)                because XeTeX is running.




This .cfg file contains a \hypersetup{...} command that specifies 'ps2pdf'.  Changing that to 'xetex' fixes the problem, at least for xelatex (I'm not sure what would happen with other flavors of latex).  (Update: removing the line entirely, so it specifies neither xetex nor ps2pdf, works too, and presumably won't cause trouble for other latices.)

But:
1) Why does kpsewhich find that file, instead of this one:
  ...texlive/2016/texmf-dist/tex/latex/latexconfig/hyperref.cfg
  which does not have any \hypersetup{} command, and which would
  presumably not cause the same problem?
2) Why did this change from 2015 to 2016?  We did a pretty vanilla
  install, I think the only non-default choice we made was to use
  'letter' instead of 'a4'.
3) Is this a bug? (meaning should I report it?)

Here is the relevant coding from  hyperref.sty  with annotations added by me.

\newif\ifHy at DviMode
This defines  \ifHy at DviMode and switches, leaves it as  \iffalse
\let\Hy at DviErrMsg\ltx at empty
\ifpdf
  \def\Hy at DviErrMsg{pdfTeX or LuaTeX is running in PDF mode}%
\else
  \ifxetex
This is already  \iftrue
    \def\Hy at DviErrMsg{XeTeX is running}%
… but surely we should be setting  \Hy at DviModetrue  here !!!
  \else
    \ifvtex
      \ifvtexdvi
        \Hy at DviModetrue
      \else
        \def\Hy at DviErrMsg{VTeX is running, but not in DVI mode}%
      \fi
    \else
      \Hy at DviModetrue
    \fi
  \fi
\fi

The result is that when you subsequently request   [dvipdfmx]  or  any other driver,
hyperref thinks that we are in non-dvi mode, so  *incorrectly* throws the error.

So it’s surely an omission in  hyperref.sty .

But you don’t actually need to specify a driver option,
and everything works OK anyway.


  Mike Maxwell


Hope this helps,

Ross


Dr Ross Moore

Mathematics Dept | Level 2, S2.638 AHH
Macquarie University, NSW 2109, Australia

T: +61 2 9850 8955  |  F: +61 2 9850 8114<tel:%2B61%202%209850%209695>
M:+61 407 288 255<tel:%2B61%20409%20125%20670>  |  E: ross.moore at mq.edu.au<mailto:rick.minter at mq.edu.au>

http://www.maths.mq.edu.au<http://mq.edu.au/>


[cid:image001.png at 01D030BE.D37A46F0]<http://mq.edu.au/>


CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.<http://mq.edu.au/>

This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University.<http://mq.edu.au/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20160615/840a40c6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: image001.png
URL: <http://tug.org/pipermail/xetex/attachments/20160615/840a40c6/attachment-0001.png>


More information about the XeTeX mailing list