i use pdflatex to generate pdf files. my source files are all utf-8 encoded because of non-english characters. without \usepackage{hyperref}
code, they can be compiled without any problem. but when i put \usepackage{hyperref}
(even without any \href{}{}
code) in the package list, an error would occur, saying
**************************************
! Use of \@chapter doesn't match its definition.
\CJK@altchar ...fx \csname \reserved@a \endcsname
\relax \CJKsymbol {\@tempc...
l.1 \chapter{XXX}
?
**************************************
where "XXX" represents non-english characters.
then i googled a lot, finding the cause is that hyperref uses pdftex drivers, which doesn't work with utf-8 encoded files. i checked this page: http://www.tug.org/applications/hyperref/manual.html , and failed to find any driver suitable for pdflatex.
i tried \usepackage[utf8]{inputenc}
, but still couldn't get it to work.
so anyone could help me? thank you!
Have you tried loading hyperref using \usepackage[unicode]{hyperref}
, or, equivalently, specifying \hypersetup{ unicode = true }
right after ? This should enable you to use unicode characters in bookmarks.
Try this, works for me. Instead of:
\usepackage[pdftex, unicode,
pdfauthor={çç êÊ},
pdftitle={T\'{o}picos Avançados ôô},
pdfsubject={Trabalho 6},
pdfkeywords={a1, a2},
pdfproducer={Latex with hyperref},
pdfcreator={pdflatex}]{hyperref}
I do:
\usepackage[pdftex, unicode,
pdfproducer={Latex with hyperref},
pdfcreator={pdflatex}]{hyperref}
\hypersetup{
pdfauthor={çç êÊ},
pdftitle={T\'{o}picos Avançados ôô},
pdfsubject={Trabalho 6},
pdfkeywords={a1, a2},
}
I hope it works for you too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With