I want to start the page numbers with 1 on my table of contents, but I do not want to show page numbers.
I can do this with \pagenumbering{gobble}
.
After the toc, I want to show the numbers with arabic numerals but I do not want to reset the page count. How can I do this?
I have a book on latex that tells me to set the page counter to some other value if I want to start with another value, like so:
\setcounter{page}{some_number_here}
But this doesn't work, because the counter, that holds the value to which I want to set the page counter is the page counter itself, which just got reset to 1.
How can I start showing page numbers without resetting their value?
minimal working example:
\documentclass[a4paper, 12pt, titlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\begin{document}
\pagenumbering{gobble}
\tableofcontents
There is no page number on this page, great!
\clearpage
\pagenumbering{arabic}
\section{A}
This should not be the first page,
just the first page that displays the numbers.
In this example, this should be page 2
\clearpage
\section{B}
text
\clearpage
\section{C}
text
\end{document}
Best Answer
Hidding/displaying page numbers/headers/footers should be done with page styles, such as
empty
orplain
(or more sophisticated ones).If
article
class is used, then no explicit redefinition of\thepage
to\arabic{page}
is necessary, but in the case ofbook
and\frontmatter
, the ToC would be displayed with roman figures, so this redefinition might be necessary.\pagenumbering{...}
always resets the page counter.