2

I am writing my Thesis document and I have Problem with table of Contents. It appears twice all the time. I tried many ways but could not get any help.

screenshot

\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}

This is my code. Any help would be appreciable. Thanks in advance.

16
  • 3
    Welcome, the code posted created only one table of contents. – Johannes_B Oct 9 '16 at 11:08
  • 2
    \Large, like all size comamnds does not take an argument, the syntax is \LARGE abc not LARGE{abc} – David Carlisle Oct 9 '16 at 11:15
  • 9
    The first page is the table of contents, the second page is the contents (and the reason for the first page). – gernot Oct 9 '16 at 11:28
  • 4
    I suggest to take a 30 minute break, drink a coffee and come back. You are thinking in the completetly wrong direction. I am serious, take a break. – Johannes_B Oct 9 '16 at 11:35
  • 3
    After the break, consider replacing the wombat sentence with the real content of your thesis. – Johannes_B Oct 9 '16 at 11:36
5

The table of contents (ToC) is showed only one time, just where it is your \tableofcontents code.

The \section{Introduction} is not the first line of the ToC, is the title of the first section in the main text. But without normal text among sections titles, the list of titles resemble a table of contents without number of pages. Just write some text among the \section and \subsection lines, e.g.:

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

And you will see the difference.

For a better understanding of the basics, is always better start with a minimal working example as:

\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}

mwe

Not enough clear? May be help a different ToC and colors. (Also help a lot comment each obscure code):

\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

mwe

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.