Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I create page numbers with a mixed Roman numeral-Arabic numeral (<Roman numeral>.<Arabic numeral>) format?

  • They increment as: "I.1", "I.2", "I.3", etc.
  • The Roman numerals change only when I manually specify an increase.
  • I can manually increment the Roman numeral, without changing the Arabic numeral: "I.30", \stepcounter{pageroman} "II.31", "II.32", "II.33", \stepcounter{pageroman}, "III.34", etc.
  • The Arabic numerals behave just like the page counter (increasing on each page automatically).
  • I can manually change the Arabic numeral, without changing the Roman numeral: "IV.1", "IV.2", \setcounter{pagearabic}{20} "IV.20", "IV.21", etc.
  • Cross-references with pageref display "I.30".
share|improve this question
add comment

2 Answers

You can simply redefine \thepage using the page counter and prepending a new counter represented using Roman numerals:

\documentclass{article}
\usepackage{lipsum}

\newcounter{mycntr}
\stepcounter{mycntr}
\renewcommand\thepage{\Roman{mycntr}.\arabic{page}}

\begin{document}
\pageref{sec:one} \pageref{sec:two} \pageref{sec:three} \pageref{sec:four}

\section{Test}\label{sec:one}
\lipsum[1-6]

\section{Test}\label{sec:two}
\lipsum[1-6]

\stepcounter{mycntr}
\section{Test}\label{sec:three}
\lipsum[1-6]

\stepcounter{page}
\section{Test}\label{sec:four}
\lipsum[1-6]

\end{document}
share|improve this answer
add comment

And a bit more LaTeX-y solution, using \pagenumbering (how many people know about this command?)

\documentclass{article}

\makeatletter

\newcounter{pageroman}
\stepcounter{pageroman}

\def\@pageromanarabic{\@Roman\c@pageroman.\@arabic}
\pagenumbering{pageromanarabic}

\makeatother

\begin{document}

lorem ipsum\label{first}\newpage
lorem ipsum\newpage
lorem ipsum\newpage
lorem ipsum\newpage
\stepcounter{pageroman}
lorem ipsum\newpage
lorem ipsum, go to page \pageref{first}\newpage
\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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