An Example of Page Numbering in LaTeX
May. 13, 2025 • Updated May. 13, 2025
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
\documentclass{article}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{blindtext}
\usepackage{lastpage} % To obtain the total number of document pages
\usepackage{fancyhdr}
\usepackage[colorlinks,
linkcolor=blue]{hyperref}
\usepackage[x11names]{xcolor}
\pagecolor{AntiqueWhite1}
\def\contentsname{\empty} % Remove the title auto generated by command `\tableofcontents`
\renewcommand{\headrulewidth}{0mm} % Remove the header line
%\renewcommand{\footrulewidth}{0mm}
\begin{document}
\pagenumbering{Alph}
\section*{Guest Foreword (TBD)}
\addcontentsline{toc}{section}{Foreword: 4 pages (TBD)}
To be written: Allowing 4 pages.
\newpage
\setcounter{page}{5}
\section*{Introduction (2 pages)}
\addcontentsline{toc}{section}{Introduction: 2 pages (TBD)}
To be written: 2 pages allowed.
\newpage
\addtocounter{page}{1}
\section*{Strategy summary (2 pages)}
\addcontentsline{toc}{section}{Strategy summary: 2 pages (TBD)}
To be written: 2 pages.
\newpage
\stepcounter{page}
\section*{Contents}
\vspace{-2.5em}
\addcontentsline{toc}{section}{TOC}
\pagenumbering{roman}
\tableofcontents
\newpage
\setcounter{page}{1}
\pagenumbering{arabic}
\pagestyle{fancy}
\fancyhf{} % Clear existing header/footer entries
\fancyfoot[R]{Page \thepage \hspace{1pt} of \pageref{LastPage}} % Place Page X of Y on the right-hand side of the footer
\blinddocument
\end{document}






References