![tocloft 包将图表/表格列表链接到错误页面](https://linux22.com/image/442589/tocloft%20%E5%8C%85%E5%B0%86%E5%9B%BE%E8%A1%A8%2F%E8%A1%A8%E6%A0%BC%E5%88%97%E8%A1%A8%E9%93%BE%E6%8E%A5%E5%88%B0%E9%94%99%E8%AF%AF%E9%A1%B5%E9%9D%A2.png)
我正在使用 Vel 和 Johannes Böttcher 的硕士/博士论文课程。我从这里下载了它:http://www.latextemplates.com/template/masters-doctoral-thesis
该类有一个选项,liststotoc
用于将图形/表格等列表添加到目录中。并且它运行良好。
但是,当使用tocloft
需要更改目录样式的包时,图表和表格列表会从目录中消失。列表本身会显示在目录下方,而不是新页面上。
虽然我通过使用和而不是解决了上述问题\newpage
,但单击目录中的这两个项目将转到目录中它们上方的项目的页面。在本例中,转到编号为 的“致谢”页面\addcontentsline{toc}{chapter}{\listtablename}
\addcontentsline{toc}{chapter}{\listfigurename}
liststotoc
四,而不是其各自的页面七和八',即使目录中旁边的页码是正确的。
如果目录中图表列表和表格列表上方没有项目,则单击目录中的任意两个项目都会使我返回到文档的开头。
\documentclass[12pt,oneside, english, singlespacing]{MastersDoctoralThesis}
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex} % Use the bibtex backend with the authoryear citation style (which resembles APA)
\addbibresource{example.bib} % The filename of the bibliography
\usepackage[autostyle=true]{csquotes} % Required to generate language-dependent quotes in the bibliography
\usepackage{fontspec} % Fonts package
\setmainfont{Times New Roman}
\usepackage{tocloft} % Modify toc package
%-----------------------------------
% MARGIN SETTINGS
%-----------------------------------
\geometry{paper=a4paper, inner=2.5cm, outer=3.8cm, bindingoffset=.5cm, top=1.5cm, bottom=1.5cm}
%-----------------------------------
% THESIS INFORMATION
%-----------------------------------
\thesistitle{.}
\supervisor{.}
\examiner{}
\degree{.}
\author{.}
\addresses{}
\subject{.}
\keywords{}
\university{\href{.}{.}}
\department{\href{.}{.}}
\group{\href{.}{.}}
\faculty{\href{.}{.}}
\AtBeginDocument{
\hypersetup{pdftitle=\ttitle}
\hypersetup{pdfauthor=\authorname}
\hypersetup{pdfkeywords=\keywordnames}
}
\begin{document}
\frontmatter % Use roman page numbering style (i, ii, iii, iv...) for the pre-content pages
\pagestyle{plain} % Default to the plain heading style until the thesis style is called for the body content
%-----------------------------------
% TITLE PAGE
%-----------------------------------
\begin{titlepage}
\begin{center}
TITLE TEXT
\end{center}
\end{titlepage}
%-----------------------------------
% ABSTRACT PAGE
%-----------------------------------
\begin{abstract}
\addchaptertocentry{\abstractname}
ABSTRACT TEXT
\end{abstract}
%-----------------------------------
% ACKNOWLEDGEMENTS
%-----------------------------------
\begin{acknowledgements}
\addchaptertocentry{\acknowledgementname} % Add the acknowledgements to the table of contents
ACKNOWLEDGMENT TEXT\ldots
\end{acknowledgements}
%-----------------------------------
% LIST OF CONTENTS/FIGURES/TABLES PAGES
%-----------------------------------
\newpage
\tableofcontents % Prints the main table of contents
\newpage
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures % Prints the list of figures
\newpage
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables % Prints the list of tables
\end{document}
谢谢。