Re: [問題]hyperref 搭配中文 \addcontentsline 的問題
※ 引述《suglwu (suglwu)》之銘言:
> 例子三:中文內容 + hyperref [5] => fail
> <quote src=[5]>
> \usepackage[final,hyperindex=true,backref,colorlinks=true]{hyperref}
> \newcommand{\nameFirstPage}{First page}
> \newcommand{\nameSecondPage}{Second Page}
> \newcommand{\nameCSecondPage}{第二頁}
> \addcontentsline{toc}{chapter}{\nameFirstPage}
> \newpage{\thispagestyle{empty} \
> \addcontentsline{toc}{chapter}{\nameSecondPage}\mbox{}\clearpage}
> \newpage{\thispagestyle{empty} \
> \addcontentsline{toc}{chapter}{\nameCSecondPage}\mbox{}\clearpage}
> </quote>
> <quote src=error message>
> [1]
> ! Argument of \reserved@a has an extra }.
> <inserted text>
> \par
> l.17 ...ntentsline{toc}{chapter}{\nameCSecondPage}
> \mbox{}\clearpage}
> </quote>
改用 CJKutf8.sty,他才能真正和 hyperref 搭配。
--
一個神聖的目標是很危險的。當一個目標變得神聖時,
要達到這個目標的手段往往會變得很卑下。(林語堂.快樂的天才)
--
※ Origin: SayYA 資訊站 <bbs.sayya.org>
◆ From: edt1023.sayya.org
討論串 (同標題文章)
LaTeX 近期熱門文章
PTT數位生活區 即時熱門文章