I construct an article with three kinds of pagenumber style.
- fist part: \pagenumbering{Roman}
- Sencond part: \pagenumbering{arabic}
- third part: \pagenumbering{Alpha}
Q1:
How can I get the sum of pages of each part? For example, there are 3 pages in the first part with pagenumber style Roman, and 5 pages in the second part with pagenumber style arabic. The answer to this question will be used in the Q2.
Q2:
In the foot of every page in each part, I'd like typeset the page number like this: Page\ \thepage\ of\ \totalpages{Roman}
(or arabic, Alpha for related part). I know @abspage@last
, but it just give a total page number of an whole article. So is it possible to make a macro like \totalpages{Roman/arabic/Alpha...}
to achieve this? No other packages preferred.
Example:
\documentclass{article}
\usepackage{geometry,fancyhdr}
\pagestyle{fancy}\fancyhf{}
\newcommand\totalpages[1]{...}
\begin{document}
part 1:
\pagenumbering{Roman}
\cfoot{Page\ \thepage\ of\ \totalpages{Roman}}
...
part 2:
\pagenumbering{arabic}
\cfoot{Page\ \thepage\ of\ \totalpages{arabic}}
...
part 3: \pagenumbering{Alpha}
\cfoot{Page\ \thepage\ of\ \totalpages{Alpha}}
...
\end{document}