我正在使用我所在大学发布的模板,但我自己作品中包含的章节没有出现在目录中,而我上传的文本与标题“目录”一起出现(见图)。我如何将章节包含在目录中并将每个章节与目录标题分开?(抱歉,我对 LaTeX 还不太熟悉)。
\begin{document}
\frontmatter % Begin Roman style (i, ii, iii, iv...) page numbering
% Set up the Title Page
\title {The Distance to Star Forming Regions in the Milky Way Galaxy}
\authors {\texorpdfstring
{\href{http://martynbristow.co.uk/}{Liam Middleton}}
{Liam Middleton}
}
\addresses {\groupname\\\deptname\\\univname} % Do not change this here, instead these must be set in the "Thesis.cls" file, please look through it instead
\date {\today}
\subject {}
\keywords {}
\maketitle
%% ----------------------------------------------------------------
\setstretch{1.5} % It is better to have smaller font and larger line spacing than the other way round
% Define the page headers using the FancyHdr package and set up for one-sided printing
\fancyhead{} % Clears all page headers and footers
\rhead{\thepage} % Sets the right side header to show the page number
\lhead{} % Clears the left side page header
\pagestyle{fancy} % Finally, use the "fancy" page style to implement the FancyHdr headers
\pagestyle{plain}
\pagenumbering{roman}
\setcounter{page}{2}
\include{preface}
\newpage
%\input{publications}
%\newpage
\input{acknowledgements}
\newpage
%% ----------------------------------------------------------------
% Declaration Page required for the Thesis, your institution may give you a different text to place here
\Declaration{
\addtocontents{toc}{\vspace{1em}} % Add a gap in the Contents, for aesthetics
I, Liam Middleton, declare that this thesis titled, `The Distance to Star Forming Regions in The Milky Way Galaxy' and the work presented in it are my own. I confirm that:
\begin{itemize}
\item[\tiny{$\blacksquare$}] Where I have quoted from the work of others, the source is always given. With the exception of such quotations, this thesis is entirely my own work.
\item[\tiny{$\blacksquare$}] I have acknowledged all main sources of help.
\\
\end{itemize}
}
\clearpage % Declaration ended, now start a new page
%% ----------------------------------------------------------------
% The "Funny Quote Page"
\pagestyle{empty} % No headers or footers for the following pages
\null\vfill
% Now comes the "Funny Quote", written in italics
\textit{``Write a funny quote here.''}
\begin{flushright}
If the quote is taken from someone, their name goes here
\end{flushright}
\vfill\vfill\vfill\vfill\vfill\vfill\null
\clearpage % Funny Quote page ended, start a new page
%% ----------------------------------------------------------------
\pagestyle{fancy} %The page style headers have been "empty" all this time, now use the "fancy" headers as defined before to bring them back
%% ----------------------------------------------------------------
\lhead{\emph{Contents}} % Set the left side page header to "Contents"
\tableofcontents % Write out the Table of Contents
% End of the pre-able, contents and lists of things
% Begin the Dedication page
\setstretch{1.3} % Return the line spacing back to 1.3
\pagestyle{empty} % Page style needs to be empty for this page
\dedicatory{
To my friends
\ldots}
\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics
\clearpage
%% ----------------------------------------------------------------
\mainmatter % Begin normal, numeric (1,2,3...) page numbering
\pagestyle{fancy} % Return the page headers back to the "fancy" style
% Include the chapters of the thesis, as separate files
% Just uncomment the lines as you write the chapters
\input{Chapters/Introduction}
\input{Chapters/Data Acquisition}
\input{Chapters/Methodology}
\input{Chapters/Discussion}
\input{Chapters/Conclusion}
%% ----------------------------------------------------------------
% Now begin the Appendices, including them as separate files
\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics
\appendix % Cue to tell LaTeX that the following 'chapters' are Appendices
\input{Appendices/AppendixA} % Appendix Title
%\input{Appendices/AppendixB} % Appendix Title
%\input{Appendices/AppendixC} % Appendix Title
\addtocontents{toc}{\vspace{2em}} % Add a gap in the Contents, for aesthetics
\backmatter
%% ----------------------------------------------------------------
\nocite{*}
\label{Bibliography}
\lhead{\emph{Bibliography}} % Change the left side page header to "Bibliography"
\bibliographystyle{mn2e} %{unsrtnat} % Use the "unsrtnat" BibTeX style for formatting the Bibliography
\bibliography{Bibliography} % The references (bibliography) information are stored in the file named "Bibliography.bib"
\end{document} % The End
%% ----------------------------------------------------------------