TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

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.