I am trying to use roman numerals for the table of contents (and abstract, notes of thanks etc.) and then start the main body of the text from page 1 in arabic numerals. I am using the article document class and do not want a page number on the title page. At the same time in the footer I want to show Page x of y.

i.e. I want

Title page: no number
Table of contents first page: Page i of ii
Table of contents second page: page ii of ii [ii was just chosen for this example]
First page of document: page 1 of x
Second page of document: page 2 of x

The code works fine for the table of contents, i do get page i of ii, page ii of ii etc. However, for the rest of the document I then get page 1 of ii, page 2 of ii Actually I can see what causes the mistake (the use of a \label{lastromanpage}), but I do not know how to solve this.



\title{\vspace{2in}\textmd{\textbf{ \Title}}\\\normalsize\vspace{0.1in}\small{Due\ on\ \DueDate}\\\vspace{0.1in}\large{\textit{\ClassInstructor\ \ClassTime}}\vspace{3in}}


\rfoot{Page\ \thepage\ of\ \pageref{lastromanpage}}


\pagenumbering{roman}\tableofcontents \label{lastromanpage}
  • Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). Apr 12, 2013 at 8:09
  • Issue \rfoot{Page \thepage\ of \pageref{LastPage}} after \pagenumbering{arabic} and load the lastpage package (or \zpageref{LastPage} loading zref-lastpage).
    – egreg
    Apr 12, 2013 at 8:16

1 Answer 1


You can also change the footer inside the document with \rfoot. The label for the last page number is more complicate, because \label after the last page would not write anything in the .aux file. For example, package lastpage provides a label LastPage that can be used with \pageref.

Full example:


\newcommand*{\AuthorName}{John Doe}


\rfoot{Page\ \thepage\ of\ \pageref{lastromanpage}}




\rfoot{Page\ \thepage\ of \pageref{LastPage}}
\section{First section}
\section{Last section}

  • Thank you for your help, this seems to work just fine ^^ Apr 12, 2013 at 10:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .