## 编译环境 操作系统 * [ ] Windows 7/8/10 * [ ] macOS * [X ] Linux `若需勾选,请把[ ]改成[x]` Tex发行版 * [X ] TexLive `年份` * [ ] MikTeX `版本号` * [ ] CTeX `若需勾选,请把[ ]改成[x]` ## 我的问题 想给目录中的章节标题添加超链接,但是hyperref宏包警告,原因好像是标题中有空格,不影响使用,但是我想去掉下面所示的警告信息,能把警告信息屏蔽了也行。 ``` Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) \hskip 10.53937pt ``` 编译方式是XeLaTeX, WME如下: ``` \documentclass[UTF8]{ctexbook} \usepackage{tocloft} \usepackage{hyperref} \begin{document} \tableofcontents \section{第\quad 一\quad 节} \end{document} ```

1 回答1

18
自己去看 `texdoc lshort-zh-cn`, _sec6.4.3 PDF 书签_ ```tex \documentclass[UTF8]{ctexbook} \usepackage{tocloft} \usepackage{hyperref} \begin{document} \tableofcontents \section{\texorpdfstring{第\quad 一\quad 节}{第一节}} \end{document} ``` 还有不要手写编号,自己看 https://www.latexstudio.net/index/details/index/mid/764.html
  • 非常感谢! – 赵超军 2020-08-29 21:11 回复

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。