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.
\documentclass{article}
\usepackage{xassoccnt}
\DeclareBackupCountersGroupName{pagebackup}
\AssignBackupCounters[name=pagebackup]{page}
\usepackage{blindtext}
\begin{document}
\pagenumbering{roman}
\blindtext[20]
\clearpage
\BackupCounterGroup[backup-id=roman]{pagebackup}
\pagenumbering{arabic}
\section{Introduction}
\blindtext[10]
\clearpage
\pagenumbering{roman}
\RestoreBackupCounterGroup[backup-id=roman]{pagebackup}
\appendix
\section*{Appendix}
\blindtext[50]
\end{document}

\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:21appendix
is no environment, so\appendix
, not\begin{appendix}...\end{appendix}
. If you use theappendix
package, then it's\begin{appendices}...\end{appendices}
. – user31729 Feb 14 '17 at 21:46