Page numbering – styles, suppress page numbering in LaTeX

In this tutorial, you will learn all about page numbering, how to change page number style, use multiple number styles in the same document, and how to suppress page numbering for an entire document or a particular page.

Page numbering style in LaTeX

LaTeX provides four different styles of page numbering. You can set any one of them. Those are:

  • Arabic (1, 2, 3 … etc.): This is the default page numbering style.
  • Roman (i, ii & I, II): You get the lower-case roman numbers with the \pagenumbering{roman}  and \pagenumbering{Roman} for upper-case roman numbers.
  • Alphabet (a, b & A, B): To get the lower-case alphabet use \pagenumbering{alph} and for upper-case use this \pagenumbering{Alph}.
  • Symbol: You can also use this \pagenumbering{fnsymbol} to get different symbols instead of numbers.

 

All of the styles I mentioned above can be used for an entire document or for a particular amount of pages. In order to set page numbering for an entire document you have to use the \pagenumbering{<numstyle>} command in the preamble of your document. Take a look.

\documentclass{article}
\usepackage{lipsum}
\pagenumbering{roman} % To get lowercase roman numbering.
\begin{document}

\lipsum

\end{document}

Let’s try with fnsymbol.

\documentclass{article}
\usepackage{lipsum}
\pagenumbering{fnsymbol} 
\begin{document}

\lipsum
\lipsum

\end{document}

Output:

First page:
1st page number
Second page:

second page number
Third page:
3rd page number

Use different page numbering styles for different page

You can also use different page numbering styles for different pages. In this case, you have to use the \pagenumbering{<numstyle>} command in the document body. To get multiple styles of page numbering, you have to use this command multiple times with a particular style.

For example, I have two sections in my document and I want my first section’s page numbers to be in capital roman style and the last section’s page numbers to be alphabetical (capital). let’s see.

\documentclass{article}
\usepackage{lipsum}
\begin{document}

\pagenumbering{Roman} 
\section{This is first section}
\lipsum

\clearpage % This command is needed otherwise numbering will not working
\pagenumbering{Alph} 
\section{This is second section}
\lipsum

\end{document}

Output:

Page numbering

In the above output, you will see that the different style number is printing but the page number is not counting continuously. Now if you want page count to be continuous despite different styles then you need to set page counter by \setcounter{page}{<page-num>} command while changing the numbering style.

Here my first section ends on the 2nd page so I set it continuous from 3rd page by \setcounter{page}{3} command.

\documentclass{article}
\usepackage{lipsum}
\begin{document}

\pagenumbering{Roman} 
\section{This is first section}
\lipsum

\clearpage % This command is needed otherwise numbering will not working
\pagenumbering{Alph} 
\setcounter{page}{3} % Continuous from 3rd page. 
\section{This is second section}
\lipsum

\end{document}

Output:

continuous page numbering.

Suppress page numbering for an entire document

In order to turn off or suppress page numbering for an entire document in LaTeX, you have to use the \pagestyle{empty} command in the preamble of the document.

\documentclass{article}
\pagestyle{empty}
\usepackage{lipsum}
\begin{document}

\section{This is first section}
\lipsum
 
\section{This is second section}
\lipsum

\end{document}

But if you want to suppress the page number of a specific page then you have to use the \thispagestyle{empty} command before that page content.

\documentclass{article}
\usepackage{lipsum}
\begin{document}

\thispagestyle{empty}
\section{This is first section}
\lipsum

\section{This is second section}
\lipsum

\end{document}

But in the standard classes, you have to use this \thispagestyle{empty} command after \maketitle and \chapter command.

Leave a Reply

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