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
unicodeoption is required to ensure that LuaLaTeX displays bookmarks and PDF properties correctly. On the other hand, there is a thread from 2009 suggesting that theunicodeoption 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
unicodeas 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=autoorpdfencoding=unicodeshould also be enabled for LuaTeX (it is enabled automatically for XeTeX). In my testing, theunicodeoption 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
setpagesizeshould be set tofalsewith 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}}