links,bookmarks with hyperref don't work
Also applies to links for citations and toc items. Links become highlighted, but are non-functional.
Setup is Os X 10.4 Standard MacTex installation. Built file using:
#xelatex test.tex
Apologies if this isn't clear enough - I'm slightly new here. However the same example works fine with pdflatex - I guess I may just need to change a setting, but it's non-obvious.
The log/error messages I get when building the file are listed below. I'm happy to provide more examples if needed...
This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
(./test.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng
erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,
french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc
us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por
tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish,
turkish, ukenglish, ukrainian, loaded.
(/usr/local/texlive/2007/texmf-dist/tex/latex/base/book.cls
Document Class: book 2005/09/16 v1.4f Standard LaTeX document class
(/usr/local/texlive/2007/texmf-dist/tex/latex/base/bk10.clo))
(/usr/local/texlive/2007/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/local/texlive/2007/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2007/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/local/texlive/2007/texmf/tex/latex/config/hyperref.cfg)
(/usr/local/texlive/2007/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
Implicit mode ON; LaTeX internals redefined
(/usr/local/texlive/2007/texmf-dist/tex/latex/hyperref/backref.sty)
(/usr/local/texlive/2007/texmf-dist/tex/xelatex/xetexurl/url.sty))
*hyperref using default driver hdvipdfm*
(/usr/local/texlive/2007/texmf-dist/tex/latex/hyperref/hdvipdfm.def)
(./test.aux) (/usr/local/texlive/2007/texmf-dist/tex/latex/graphics/color.sty
(/usr/local/texlive/2007/texmf/tex/latex/config/color.cfg)
(/usr/local/texlive/2007/texmf-dist/tex/xelatex/graphics/xetex.def))
(/usr/local/texlive/2007/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/local/texlive/2007/texmf-dist/tex/latex/oberdiek/refcount.sty))
(./test.out) (./test.out) [1] [2] (./test.toc) [3] [4]
Chapter 1.
[5] [6]
Chapter 2.
[7] (./test.aux)# ERROR: need xdv2pdf_mergemarks script to process: /Users/ben/Documents/projects/psychology/my papers/phd writeup/tex/test.pdf /Users/ben/Documents/projects/psychology/my papers/phd writeup/tex/test.pdf.marks
)
Output written on test.pdf (7 pages).
Transcript written on test.log.
Anonymous
Logged In: YES
user_id=1562266
Originator: NO
You are using an old xetex version which still use xdv2pdf as driver. I doubt that hyperref will work with it.
Try
xelatex --output-driver=xdvipdfmx test
Ulrike Fischer
Logged In: YES
user_id=2098733
Originator: YES
Amazing! Thanks for the quick response. All works fine now. I'll post to the textmate list and suggest they add this option as the default when using xetex.
Regards,
Ben
Logged In: YES
user_id=700925
Originator: NO
A little more explanation: up through v0.996 (the version released with TeX Live 2007), xetex on Mac OS X used xdv2pdf as the default driver; on other platforms, and newer versions on OS X, use xdvipdfmx by default.
xdvipdfmx has built-in support for hyperref features (with the appropriate hyperref package options). xdv2pdf can also support some features, but uses an auxiliary script xdv2pdf_mergemarks to do this. In your case, that script was not found - see the error message. I'm guessing this has something to do with the PATH or TeX-related environment variables in effect when you run it in TextMate. (Did you try running the xelatex command directly in a Terminal window?)
Normally, the script should be found in a "scripts" subdirectory of one of the texmf directory trees; running the command
kpsewhich -format texmfscripts xdv2pdf_mergemarks
should show you the location. If not, this suggests something slightly broken in your TeX installation.
In general, though, I'd support the recommendation to use xdvipdfmx instead.
I'm going to close this report as "Out of date" rather than "Fixed". It's true that this kind of failure can happen, if the helper script isn't found as expected, but as xdv2pdf is becoming largely obsolete (and with the upcoming TL2008 release, will no longer be the default anywhere), I think we can ignore the issue.
Logged In: YES
user_id=700925
Originator: NO
A little more explanation: up through v0.996 (the version released with TeX Live 2007), xetex on Mac OS X used xdv2pdf as the default driver; on other platforms, and newer versions on OS X, use xdvipdfmx by default.
xdvipdfmx has built-in support for hyperref features (with the appropriate hyperref package options). xdv2pdf can also support some features, but uses an auxiliary script xdv2pdf_mergemarks to do this. In your case, that script was not found - see the error message. I'm guessing this has something to do with the PATH or TeX-related environment variables in effect when you run it in TextMate. (Did you try running the xelatex command directly in a Terminal window?)
Normally, the script should be found in a "scripts" subdirectory of one of the texmf directory trees; running the command
kpsewhich -format texmfscripts xdv2pdf_mergemarks
should show you the location. If not, this suggests something slightly broken in your TeX installation.
In general, though, I'd support the recommendation to use xdvipdfmx instead.
I'm going to close this report as "Out of date" rather than "Fixed". It's true that this kind of failure can happen, if the helper script isn't found as expected, but as xdv2pdf is becoming largely obsolete (and with the upcoming TL2008 release, will no longer be the default anywhere), I think we can ignore the issue.