\pagenumbering{roman}
will set the page numbering
style to lowercase Roman.
Page Numbering
Setting a numbering style
In order to number the pages of a document, some numbering style needs
to be specified. Using
CODE
\documentclass{article}
\pagenumbering{roman}
\begin{document}
\tableofcontents
\newpage
\section{Test 1}
\subsection{Subsection 1}
\newpage
\section{Test 2}
\subsection{Subsection 2}
\newpage
\section{Test 3}
\subsection{Subsection 3}
\end{document}
Numbering styles
The following styles are available for page numbering:
roman
: Lower case Roman numeralsRoman
: Upper case Roman numeralsalph
: Alphabetic lower caseAlph
: Alphabetic upper casearabic
: Arabic numerals
CODE
\documentclass{article}
\pagenumbering{arabic}
\begin{document}
\tableofcontents
\newpage
\section{Test 1}
\subsection{Subsection 1}
\newpage
\section{Test 2}
\subsection{Subsection 2}
\newpage
\section{Test 3}
\subsection{Subsection 3}
\end{document}
Using multiple numbering styles in a single document
This is usually used in the book document class, where pages before
the first chapter have Roman numerals.
The commands that control the page numbering style are
The commands that control the page numbering style are
\frontmatter
,
which numbers the pages between that command and the next with one
particular style, and \mainmatter
, which changes and resets the style.
CODE
\documentclass{book}
\begin{document}
\frontmatter
\newpage
\addcontentsline{toc}{chapter}{Preface}
\addcontentsline{toc}{chapter}{Entry}
\tableofcontents
\mainmatter
\newpage
\chapter{Chapter 1}
\newpage
\chapter{Chapter 2}
\newpage
\chapter{Chapter 3}
\end{document}
For other document classes, see the following example:
CODE
\documentclass{article}
\pagenumbering{roman}
\begin{document}
\tableofcontents
\newpage
\section{Test 1}
\setcounter{page}{2} %sets the page counter to 2 and the
count starts from that one
\subsection{Subsection 1}
\newpage
\section{Test 2}
\subsection{Subsection 2}
\newpage
\section{Test 3}
\pagenumbering{arabic}
\subsection{Subsection 3}
\end{document}
Customizing numbering styles
If you want to display the current page number out of the total number
of pages, you can use the package fancyhdr:
CODE
\documentclass{article}
\usepackage{fancyhdr}
\usepackage[english]{babel}
\usepackage{lastpage}
\pagestyle{fancy}
\fancyhf{}
\rfoot{Page \thepage \hspace{1pt} of
\pageref{LastPage}}
\begin{document}
\tableofcontents
\newpage
\section{Test 1}
\subsection{Subsection 1}
\newpage
\section{Test 2}
\subsection{Subsection 2}
\newpage
\section{Test 3}
\subsection{Subsection 3}
\end{document}