问题
使用 latex 模板,目录设置有诸多不如意的地方。经过一番学习,记录下常用见问题与解决命令
创建目录
分别创建了 目录,图目录,表目录。 由于 摘要等放在目录前,罗马数字编号也是从摘要编码,所以此处 \pagenumbering{roman} \setcounter{page}{1} 被注释掉了。
\cleardoublepage %\pagenumbering{roman} \setcounter{page}{1} % Page number is set before
\tableofcontents
\cleardoublepage \listoffigures
\cleardoublepage \listoftables
目录没有“摘要”等未编号的章节
在“摘要”这一章后面添加 \addcontentsline{toc}{chapter}{Abstract} 。在之前添加会导致点击目录“摘要”项链接到前一页。
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract} % show the "abstract" in contents, place this line after the chapter/section created
解决目录页中添加条目后,链接到错误页码的问题
使用 \addcontentsline{toc}{chapter}{Contents} 可以添加 “目录”这一项到目录页,但是会导致点击“Contents”这一项会链接到前一页。这个问题可以使用 \phant