I want to continue the roman numbering of the front matter of my document after the main matter is finished. The following, unfortunately, does not work. The counter start over with 1.






  • BTW, \setcounter{page}{\number\value{savepage}} can be shortened to \setcounter{page}{\value{savepage}}. \value addresses the count register of the specified counter and it can directly be used in \setcounter. – Heiko Oberdiek Feb 14 '17 at 21:21
  • BTW: appendix is no environment, so \appendix, not \begin{appendix}...\end{appendix}. If you use the appendix package, then it's \begin{appendices}...\end{appendices}. – user31729 Feb 14 '17 at 21:46

\pagenumbering does the following two things (from latex.ltx):

  \global\c@page \@ne
  \gdef\thepage{\csname @#1\endcsname \c@page}}

  • The page number is set to one (\global\c@page \@ne)
  • The page number representation is changed to use the argument (\gdef\thepage{\csname @#1\endcsname \c@page})

Since it's resetting the page number to one, your saving and restoring of the page number doesn't stick. So, instead, use the following order of coding:


Note that this will make the first page within the appendix be equivalent to the last page in your front matter. If you want it to start one page further, use

  • I'd prefer \stepcounter{savepage} after the \setcounter in the front matter. – egreg Feb 14 '17 at 21:55

A little bit more complicate than Werner's solution, but with the possibility of storing whole 'counter' trees.

Use the package xassoccnt, define a backup counter group, say pagebackup, populate it with the page counter, store the state into some id (say, roman) and restore it later on, after changing the counter output to roman again with \pagenumbering.

In the example of usage below, the first five pages are numbered with roman figures and the appendix numbering continues with vi, as requested.

I agree, that this is 'too' much for such one occasion, but good to know for other issues.












enter image description here enter image description here

  • Thanks to all of you! @Werner, switching lines worked perfectly! – Tobi1990 Feb 16 '17 at 17:58
  • @Tobi1990: I think your line should be under Werner's post, not mine ;-) – user31729 Feb 19 '17 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.