我对 \cleardoublepage 及其使用有一个常见问题。我有一篇按照 Classicthesis 模型编写的文档,使用 TexStudio 编写并使用 pdfLatex 编译。我有 7 个章节和 15 个部分,并且注意到有几个部分与目录的链接不正确,但页码是正确的。我已阅读有关 \phantomsection、\addcontentsline 和 \cleardoublepage 的所有答案,似乎对我来说唯一可行的方法是在出现链接错误的部分的开头添加 \cleardoublepage。这个解决方案正确吗?如果我错了,请纠正我,但这样我可能会有无用的空白页,对吗?从目录中链接所有部分的正确方法是什么?
请注意,使用 Classicthesis,我有以下几行(我无法理解...我不擅长使用 Latex):
\refstepcounter{dummy} % to refere to a chapter not numbered
\pdfbookmark[1]{\contentsname}{tableofcontents} % bookmark to the table of contents
\setcounter{tocdepth}{2} % <-- 2 includes up to subsections in the ToC
\setcounter{secnumdepth}{3} % <-- 3 numbers up to subsubsections
\manualmark
\markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}
% Table of contents
\tableofcontents % makes the table of contents
\automark[section]{chapter} % page header
\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\enspace \spacedlowsmallcaps{#1}}}
\cleardoublepage
在文档配置文件的末尾我有:
\PassOptionsToPackage{pdftex,hyperfootnotes=false,pdfpagelabels}
{hyperref} % load it last!
\usepackage{hyperref} % backref link tocpage pagebackref
\pdfcompresslevel=9
\pdfadjustspacing=1
% Hyperreferences
\hypersetup{%
%draft, % = no hyperlinking at all (useful in b/w printouts)
colorlinks=true, linktocpage=true, pdfstartpage=1, %linktoc = all, pdfstartview=FitV,%
% uncomment the following line if you want to have black links (e.g., for printing)
%colorlinks=false, linktocpage=false, pdfstartpage=1, pdfstartview=FitV, pdfborder={0 0 0},%
breaklinks=true, pdfpagemode=UseNone, pageanchor=true, pdfpagemode=UseOutlines,%
plainpages=false,
bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,%
hypertexnames=true,
pdfhighlight=/O,%nesting=true,%frenchlinks,%
urlcolor=webbrown, linkcolor=RoyalBlue, citecolor=webgreen, %pagecolor=RoyalBlue,%
%urlcolor=Black, linkcolor=Black, citecolor=Black, %pagecolor=Black,%
pdftitle={\myTitle},% Options for Acrobat reader
pdfauthor={\textcopyright\ \myNameOnly},%
pdfsubject={},%
pdfkeywords={},%
pdfcreator={pdfLaTeX},%
pdfproducer={LaTeX with hyperref and classicthesis}%
}
谢谢你的回答!Giovanni