0

I have a tricky question; is there a way to start a Roman page numbering part in a document with the left (which is actually the even numbers pages in all the document) page starting with "I" but with this page being an even number page for the internal numbering counter?

I'd like to begin the appendix part on the left page starting with "I" but I'd like this page being seen as an even page for the internal counter (because of fancy page style applying differently on odd and even pages, otherwise it will flipped the normal behaviour which would look really strange).

I'll try to make an MWE when I had a little more time if really needed.

2

I can't understand the purpose, but the customer's always right. ;-)

\documentclass[twoside]{report}

\usepackage{lipsum}

\makeatletter
\newcommand{\shiftedRoman}[1]{\expandafter\@shiftedRoman\csname c@#1\endcsname}
\newcommand{\@shiftedRoman}[1]{\@Roman{\numexpr#1-1}}
\makeatother

\newcommand{\shiftedRomannumbering}{%
  \setcounter{page}{2}%
  \renewcommand{\thepage}{\shiftedRoman{page}}%
}

\pagestyle{headings}

\begin{document}

\chapter{Title of chapter}

\section{Title of section}

\lipsum[1-30]

\clearpage
\shiftedRomannumbering

\chapter{Title of chapter}

\section{Title of section}\label{whatever}

\lipsum[1-30]

\end{document}
0

The following will result in the second page being numbered 'I' but the counter state of the counter page being '2':

\documentclass[]{article}

\newcounter{fakecounter}
\begin{document}
~\clearpage
\renewcommand*{\thepage}{%
    \setcounter{fakecounter}{\value{page}}%
    \addtocounter{fakecounter}{-1}%
    \Roman{fakecounter}}
\the\value{page}
\refstepcounter{figure}\label{test}\pageref{test}
\end{document}
  • Hmm, can you try with \label in such a page? – egreg Jul 26 '17 at 20:29
  • @egreg with this setup \label would give 'I' if you execute a \pageref. – Skillmon Jul 26 '17 at 20:31
  • Do you believe this entry in the aux file is desirable? \newlabel{test}{{1}{\global \c@fakecounter \c@page \relax \global \advance \c@fakecounter -1\relax I}} – egreg Jul 26 '17 at 20:57
  • @egreg no it's not. But it still works (though executing more code than necessary). But I admit that your answer is a lot better. – Skillmon Jul 26 '17 at 23:07

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.