6

我使用 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}了,但仍然无法让它工作。

所以有人可以帮助我吗?谢谢你!

4

2 回答 2

5

您是否尝试过使用 加载 hyperref \usepackage[unicode]{hyperref},或者等效地,\hypersetup{ unicode = true }在 之后指定?这应该使您能够在书签中使用 unicode 字符。

于 2011-01-14T23:24:10.483 回答
2

试试这个,对我有用。代替:

\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},
}

我希望它也适合你。

于 2015-05-23T22:21:00.293 回答