Latex - 目录出现两次

Latex - 目录出现两次

我正在写论文,但目录有问题。它总是出现两次。我尝试了很多方法,但得不到任何帮助。

截屏

\documentclass[a4paper, 12pt, oneside, BCOR1cm,toc=chapterentrywithdots]{article}
\usepackage{graphicx}
\begin{document}
\begin{titlepage}

{
    \begin{center}
        \raisebox{-1ex}{\includegraphics[scale=0.8]{University1.PNG}}
         \raisebox{-1ex}{\includegraphics[scale=0.7]{DOC.PNG}}
    \end{center}
    \vspace{0.5cm}
}

\begin{center}

\LARGE{\textbf{eksfhsufse sdsdgz hfszudfg sjhdgsdgs}}\\
\vspace{1cm}


\Large{\textbf{Master Thesis}}\\ 
\vspace{0.5cm}
Submitted in Fulfilment of the\\
Requirements for the Academic Degree\\
M.Sc.\\
\vspace{0.5cm}
Dept. of Computer Science\\
Chair of Computer Engineering
\end{center}
\vspace{3cm}
Submitted by: ajdadad\\
Student ID: bxdjhasdga\\
Date: 12.12.2016\\
\vspace{0.0cm}\\
Supervising tutor: jdjasda \\
(further supervisors)
\end{titlepage}

%---------------------------------------------------------
% Declaration
%---------------------------------------------------------

{Declaration}
%\blindtext
\\
%\textbf{Keywords: Keyword1, Keyword2, Keyword3, ...max 5}
\vspace{0.0mm}
%setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{0.0}
\begin{sloppypar}
my content 
\end{sloppypar}
\newpage

%---------------------------------------------------------
% Table of Contents, List of figures, List of Tables
%---------------------------------------------------------
\tableofcontents
\section{Introduction}
\section{Motivation}
\section{Theoritical Background}
\subsection{Development of Emissions legislation}
\subsection{Beginning of regulation for Exhaust Emissions}
\subsection{Current Emission regulations}
\subsection{Worldwide Harmonized Light vehicles Test cycle}
\subsection{Portable Emission Measurement system}
\subsection{Real-Drive Emissions}
\section{Software}
\subsection{INCA}
\subsection{Matlab/Simulink}
\subsection{Mil-Desk}
\subsection{Microsoft Visual Studio 2013}
\subsubsection{Programing language C}
\section{Conclusion}
\section{References}
\listoffigures
\listoftables
\end{document}

这是我的代码。任何帮助都将不胜感激。提前致谢。

答案1

目录 (ToC) 仅显示一次,就在您的\tableofcontents代码所在位置。

不是\section{Introduction}目录的第一行,是正文第一节的标题。但如果节标题之间没有正常文本,标题列表就像没有页数的目录。只需在 \section\subsection行之间写一些文本,例如:

\subsection{INCA}
The Inca Empire was the largest empire in pre-Columbian America.

您会看到差异。

为了更好地理解基础知识,最好先从最小工作示例为:

\documentclass{article} 
\begin{document}
\tableofcontents 
\section{Introduction} 
    This is a little example.
\section{Motivation} 
    Light the way for who is in the dark.
\end{document}

姆韦

还不够清楚?也许不同的目录和颜色会有帮助。(对每个晦涩难懂的代码进行大量注释也会有帮助):

\documentclass{paper}         % Just for see a dotted ToC 
\usepackage{color}            % Just for see another color in the ToC 
\pagestyle{empty}             % Just for no head/foot distraction
\begin{document}              % This start the document
{\color{red}\tableofcontents} % This make a (one) ToC in red 
\color{blue}                  % This turn blue the following content in blue
\section{Introduction}        % This is already the contents !!
    This is a little example. % This is plain text  
\section{Motivation}          % This is another section title
    Light the way for who
 is in the dark.
\end{document}                % This is the end

姆韦

相关内容