我使用pdflatex生成pdf文件。我的源文件都是utf-8编码的,因为都是非英文字符。在没有\usepackage{hyperref}代码的情况下,编译它们没有任何问题。但是,当我将\usepackage{hyperref} (即使没有任何\href{}{}代码)放到包列表中时,会出现如下错误
**************************************
! Use of \@chapter doesn't match its definition.
\CJK@altchar ...fx \csname \reserved@a \endcsname
\relax \CJKsymbol {\@tempc...
l.1 \chapter{XXX}
?
**************************************其中"XXX“表示非英文字符。
然后我用谷歌搜索了很多,发现原因是hyperref使用了pdftex驱动程序,它不能处理utf-8编码的文件。我查看了这个页面:http://www.tug.org/applications/hyperref/manual.html,但是找不到任何适合pdflatex的驱动程序。
我试过\usepackage[utf8]{inputenc},但还是不能正常工作。
所以有人能帮我吗?谢谢!
发布于 2011-01-15 07:24:10
您是否尝试过使用\usepackage[unicode]{hyperref}加载hyperref,或者在加载后立即指定\hypersetup{ unicode = true }?这将使您能够在书签中使用unicode字符。
发布于 2015-05-24 06:21:00
试试这个,对我很管用。而不是:
\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},
}我希望它也适用于你。
https://stackoverflow.com/questions/4592315
复制相似问题