Ádám Tóth Ádám Tóth - 3 months ago 7
LaTeX Question

LaTeX Two Digit Page Numbering

I want to see the numbering of pages in LaTeX as follows using \thepage command: 01, 02, 03, ..., 09, 10, 11, ...etc.

So I want to have 2 digits always.

How can I achieve this smoothly?

Thank you for any help in advance!

Answer

There are a number of ways to achieve this. The following suffices:

\renewcommand{\thepage}{\ifnum\value{page}<10 0\fi\arabic{page}}

Reference: