I would like to use roman page numbers (i, ii, iii, etc.) at the beginning of a report I am writing. In the main area of the report, I would like to use Arabic page numbers in the page of pages (1 of XX, 2 of XX, etc.) I am using the article class. I have seen articles of how to use both roman and Arabic format but not with the changes in page numbers. Is this possible?
The article
document class, by design, does not provide the convenient directives \frontmatter
and mainmatter
. However, it's not too difficult to create your desired setup by loading the packages fancyhdr
and pageslts
.
\documentclass{article}
\usepackage{lipsum} % for filler text
\usepackage{pageslts}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\begin{document}
\pagenumbering{roman} % switch to roman numerals
\cfoot{\thepage} % place page number centered in footer line
\section*{AAA}
\lipsum[1-15] % 2+ pages of filler text
\clearpage % start a new page
\pagenumbering{arabic} % switch to arabic numerals, start over at "1"
\cfoot{\thepage\ of \lastpageref{pagesLTS.arabic}}
% (Use \lastpageref*` if also using the `hyperref` package.)
\section{BBB}
\lipsum[1-20] % 3+ pages of filler text
\end{document}
-
-
-
@wonderich - Thanks for the follow-up. I've gone ahead and posted an answer to your query. – Mico May 23 '19 at 21:23
\frontmatter
for the roman page numbers, for thepage of pages
use header package, e.g.fancyhdr
and thelastpage
package – user31729 Oct 9 '17 at 13:57article class
in the post above. Of coursearticle.cls
does not provide\frontmatter
. You're right aboutreport
orbook
– user31729 Oct 9 '17 at 15:16