The hyperref pdftex driver does not work with utte-8 encoded .tex files

I use pdflatex to create pdf files. my source files are all utf-8 encoded due to non-english characters. without code \usepackage{hyperref}, they can be compiled without any problems. but when I put \usepackage{hyperref}(even without code \href{}{}) in the package list, an error will 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 searched a lot, finding that the hyperref uses pdftex drivers, which does not work with utf-8 encoded files. I checked this page: http://www.tug.org/applications/hyperref/manual.html and could not find a driver suitable for pdflatex.

I tried \usepackage[utf8]{inputenc}, but still could not get it to work.

- ? !

+3
2

, \usepackage[unicode]{hyperref}, , , \hypersetup{ unicode = true } ? .

+3

, . :

\usepackage[pdftex, unicode,
            pdfauthor={çç êÊ},
            pdftitle={T\'{o}picos Avançados ôô},
            pdfsubject={Trabalho 6},
            pdfkeywords={a1, a2},
            pdfproducer={Latex with hyperref},
            pdfcreator={pdflatex}]{hyperref}

:

\usepackage[pdftex, unicode,
            pdfproducer={Latex with hyperref},
            pdfcreator={pdflatex}]{hyperref}

\hypersetup{
  pdfauthor={çç êÊ},
  pdftitle={T\'{o}picos Avançados ôô},
  pdfsubject={Trabalho 6},
  pdfkeywords={a1, a2},
}

, .

0

Source: https://habr.com/ru/post/1783376/


All Articles