Information and discussion about graphics, figures & tables in LaTeX documents.
Vanvic
Posts: 2 Joined: Thu Mar 14, 2013 7:59 pm
Post
by Vanvic » Thu Mar 14, 2013 8:04 pm
Hello friends.
I'm having a problem with the Table of contents. Each time it appears twice in my pdf document
Can anyone help me sort this out? Thanks a lot
I have done the following:
Code: Select all
\newpage
\tableofcontents
\section{Management-\textit{The definition}}
\section{Management-the history}
\section{Analysis}
P.S: I'm new to Latex.
Last edited by
cgnieder on Thu Mar 14, 2013 8:48 pm, edited 1 time in total.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide : 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook : 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ : the first book about TikZ for perfect drawings in your LaTeX thesis
cgnieder
Site Moderator
Posts: 2000 Joined: Sat Apr 16, 2011 7:27 pm
Post
by cgnieder » Thu Mar 14, 2013 8:52 pm
Hi Vanvic,
welcome to the LaTeX community!
Vanvic wrote: [...] Each time [the table of contents] appears twice in my pdf document [...]
Code: Select all
\newpage
\tableofcontents
\section{Management-\textit{The definition}}
\section{Management-the history}
\section{Analysis}
This is not caused by only the code you posted as you can verify easily:
Code: Select all
\documentclass{article}
\begin{document}
\newpage
\tableofcontents
\section{Management-\textit{The definition}}
\section{Management-the history}
\section{Analysis}
\end{document}
So please post a complete
minimal working example starting with
\documentclass
and ending with
\end{document}
similar to the one I just posted. We will then be able to reproduce the issue and hopefully be able to figure out what causes it.
Regards
Vanvic
Posts: 2 Joined: Thu Mar 14, 2013 7:59 pm
Post
by Vanvic » Thu Mar 14, 2013 10:07 pm
Hello Cgnieder.
Thanks a lot for the reply.
I wrote:
Code: Select all
\documentclass[12 pt]{article}
\usepackage{graphicx}
\begin{document}
\title{\textbf{ROLE OF MANAGERS}:\\assignment for the Organisation and Management module}
\author{Vanvic}
\maketitle
\newpage
\tableofcontents
\addtocontents{toc}{\protect\rule{\textwidth}{.2pt}\par}
\section{Management-\textit{The definition}}
\section{Management-The history}
\section{Analysis}
\end{document}
I don't know what's the problem with that.
Thanks again for helping
Last edited by
cgnieder on Thu Mar 14, 2013 10:11 pm, edited 1 time in total.
cgnieder
Site Moderator
Posts: 2000 Joined: Sat Apr 16, 2011 7:27 pm
Post
by cgnieder » Thu Mar 14, 2013 10:15 pm
But this does not produce two tables of contents! Open your code in writeLaTeX (follow the link above the code) to verify.
If you really have two tables of contents you have to be doing something else, too.
Regards