4

I am trying to work out which hyperref options allow all Unicode characters to display properly, and whether XeLaTeX, LuaLaTeX, and pdfLaTeX have different configuration requirements. The hyperref documentation helps with several problems, but there are a few ambiguities. Given the ubiquity of this package, it seems worthwhile to straighten these out:

  • The unicode option is required to ensure that LuaLaTeX displays bookmarks and PDF properties correctly. On the other hand, there is a thread from 2009 suggesting that the unicode option can somehow break with XeTeX. As far as I can tell, it simply has no effect on the latter, and can be used safely with all engines.

    There are also indications that using unicode as a package option can be more effective than leaving it for \hypersetup, but the manual implies that these approaches should have the same effect.

  • It is sometimes suggested that pdfencoding=auto or pdfencoding=unicode should also be enabled for LuaTeX (it is enabled automatically for XeTeX). In my testing, the unicode option appears to be sufficient, but I wonder whether there are any situations it does not cover.

  • Another thread from 2009 and a closed StackExchange question suggest that setpagesize should be set to false with XeTeX. I cannot seem to find any solid examples where this makes a difference, and I wonder whether this has been fixed.

This is what I am using so far, but I would be grateful to know whether any of these are redundant, or indeed whether there is anything I am missing that improves the final PDF:

\usepackage{hyperref}
\hypersetup{breaklinks=true,
            unicode=true,
            pdfauthor={AUTHOR NAME},
            pdftitle={TITLE},
            pdfsubject={SUBJECT},
            pdfkeywords={KEYWORD;KEYWORD},
            colorlinks=true,
            citecolor=blue,
            urlcolor=blue,
            linkcolor=magenta,
            pdfborder={0 0 0}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.