[LaTeX] Add TOC in LaTeX

It is always convenient and helpful to have a (clickable) TOC while we are preparing for our publications. It will give us a big picture of our work.

Put the piece of code I provided below immediately before your \section{Introduction} in your .tex file, you will have a clickable TOC in your tex created pdf! Happy Writing:)!

\newpage

\thispagestyle{empty}
 \setcounter{tocdepth}{4}
 \normalsize
 \tableofcontents
 \normalsize
 \newpage

%\pagestyle{fancy}

\setcounter{page}{1}
 \setcounter{section}{0}
 %\cfoot{\small \sffamily \thepage}
 \pagenumbering{arabic}

Leave a Reply

Your email address will not be published. Required fields are marked *