I want to add a Contents table along with page numbers in a single page before the tile of my article.

I have used the following Code:



\textwidth =  17cm

\textheight = 23cm


\setlength{\oddsidemargin}{0.01 pt}

\setlength{\evensidemargin}{0.01 pt}




\graphicspath{ }

























\title{Term Paper}





This is the code I have used the code with special code \tableofcontents but this does not give subsections and subsubsections. Also I need the contents in a single page before the title of the article with page numbers.

Do I need these format or book format?

Help me

enter image description here

  • You wrote but this does not give subsections and subsubsections. This is because you didn't use \subsection{} neither \subsubsection{}. How it could be in contents if you didn't insert anywhere. But, if you don't want them like in my second page below, simply delete it. – Sigur Feb 16 '19 at 18:47
  • Sir, this page is the 2nd page which I attached and I do not want the box part in the 2nd part and I want the content only in the first page. – M. A. SARKAR Feb 16 '19 at 18:50
  • Sorry. I suggest you to learn a little bit about basic LaTeX. You are confusing the contents with the ((sub)sub)section's header. I can only suggest you to delete the lines \subsection{title} and \subsubsection{title} if you don't want them. – Sigur Feb 16 '19 at 18:54
  • It is ok. Thanks for your good effort to make me understand but I did not get it fully though it was helpful – M. A. SARKAR Feb 16 '19 at 18:59
  • Looking at the comments to the answer below, i have to say... This question is more than confusing. – Johannes_B Feb 18 '19 at 12:43

Just use


to insert title page in a new page. Also, move \author{} and \title{} to preamble (ie., before \begin{document}).

To print subsections and subsubsection on table of contents you have to change the tocdepth counter.

enter image description here


% .... your full preamble here

\title{Term Paper}          % <--- moved to here
\author{Mathuser}           % <--- moved to here

\setcounter{tocdepth}{3}    % <--- added

\clearpage                  % <--- added
\subsection{title}          % <--- added
\subsubsection{title}       % <--- added
| improve this answer | |
  • This gives a new page of the content but same content (repeatedly) again is being appeared in the introduction part after the 'tile' $Mathuser$. Can you check by running it? – M. A. SARKAR Feb 16 '19 at 17:58
  • @M.A.SARKAR, please, do like I did, use the commands \tableofcontents \clearpage \maketitle only once in that order and compile twice to update the table of contents. – Sigur Feb 16 '19 at 18:01
  • I request to run the code in your machine in order to see the outcome. Your code can help me a lot if you check it yourself it. As I said the content section is appearing twice, once before the title page and once in the introduction part. plaese run the code yourself and help me. Otherwise give your email address I will sent you the output PDF file to show the output – M. A. SARKAR Feb 16 '19 at 18:18
  • @M.A.SARKAR, are you kidding me? Do you think that I didn't compile it? See the screenshot. That introduction part is the section head. Type something there and you'll see. – Sigur Feb 16 '19 at 18:19
  • Sir I am saying that I want to remove the same content in the 2nd page of the output (as you attached). I just highlighted the page which i want to remove. Please see the attched page in my answer part, I want to remove the part within highlighted box – M. A. SARKAR Feb 16 '19 at 18:43

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.