On 16 June 2016 at 00:25, Ross Moore <ross.mo...@mq.edu.au> wrote: > Hi Mike, David, Herb, > > 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. > > > >
Yes that's with the file with an explicit [dvipdfmx] option, as far as I can see hyperref has always (or at least for some years) given that error on xetex it insists on xetex option (which would be the default if the correct cfg is loaded) > > 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 !!! > Hmm perhaps... although the end result is that it just turns the error into a warning and ignores the specified option so you'd get Package hyperref Warning: Wrong driver `hdvipdfm.def'; (hyperref) XeTeX is running. (hyperref) Forcing driver `hxetex.def' for XeTeX. probably giving an error and making the user fix the document is as clear, and certainly what it's always done. > \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. > It only works with no option if you are not using a hyperref.cfg that specifies incompatible options:-) > > > Mike Maxwell > > > > Hope this helps, > > Ross > > > David
-------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex