I have two sections before the table of contents.
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\thispagestyle{empty}
\section*{First random title} \lipsum[1]
\section*{Second random title} \lipsum[2]
\clearpage
\tableofcontents
\section{First section} \lipsum[3]
\section{Second section} \lipsum[4]
\section{Last section} Wombat \lipsum[5]
\end{document}
The problem is, that LaTeX starts the page numbering on the first page and I don't want that. I want the page numbering to start after the table of contents. How can I do this?
Best Answer
\pagenumbering
can be helpful in removing page numbers and resetting it, at the same time. The following minimal example, using thearticle
document class, removes the page numbers until the ToC, and then starts it again at 1 (set using\arabic
):\pagenumbering{gobble}
sets the "page number printing macro" to\@gobble
, which eats its argument/contents.\pagenumbering{arabic}
resets this to\arabic{page}
.The principle holds for other (standard) document classes as well.