Hi Mike, David, Herb,

On Jun 16, 2016, at 8:46 AM, maxwell 
<maxw...@umiacs.umd.edu<mailto:maxw...@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@DviMode
This defines  \ifHy@DviMode and switches, leaves it as  \iffalse
\let\Hy@DviErrMsg\ltx@empty
\ifpdf
  \def\Hy@DviErrMsg{pdfTeX or LuaTeX is running in PDF mode}%
\else
  \ifxetex
This is already  \iftrue
    \def\Hy@DviErrMsg{XeTeX is running}%
… but surely we should be setting  \Hy@DviModetrue  here !!!
  \else
    \ifvtex
      \ifvtexdvi
        \Hy@DviModetrue
      \else
        \def\Hy@DviErrMsg{VTeX is running, but not in DVI mode}%
      \fi
    \else
      \Hy@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.mo...@mq.edu.au<mailto:rick.min...@mq.edu.au>

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


[cid:image001.png@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/>


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex

Reply via email to