[Tex/LaTex] Latex – Table of contents appearing twice

table of contents

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.


\documentclass[a4paper, 12pt, oneside, BCOR1cm,toc=chapterentrywithdots]{article}



\LARGE{\textbf{eksfhsufse sdsdgz hfszudfg sjhdgsdgs}}\\

\Large{\textbf{Master Thesis}}\\ 
Submitted in Fulfilment of the\\
Requirements for the Academic Degree\\
Dept. of Computer Science\\
Chair of Computer Engineering
Submitted by: ajdadad\\
Student ID: bxdjhasdga\\
Date: 12.12.2016\\
Supervising tutor: jdjasda \\
(further supervisors)

% Declaration

%\textbf{Keywords: Keyword1, Keyword2, Keyword3, ...max 5}
my content 

% Table of Contents, List of figures, List of Tables
\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}
\subsection{Microsoft Visual Studio 2013}
\subsubsection{Programing language C}

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

Best Answer

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.:

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:

    This is a little example.
    Light the way for who is in the dark.


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


Related Question