I want page 13 to show up as 12+1
Define a new counter format:
\documentclass{article}
\usepackage{kantlipsum} % for mock text
\makeatletter
\newcommand{\fixedarabic}[1]{%
\expandafter\@fixedarabic\csname c@#1\endcsname
}
\newcommand{\@fixedarabic}[1]{%
\ifnum#1=13 12${}+{}$1\else\number#1\fi
}
\makeatother
\pagenumbering{fixedarabic}
\begin{document}
\kant[1-50]
\end{document}
It could be a complex solution to convert the counter page to "12+1" if the value reach 13, but if only matter when 13 is the last page, why not simply change the footer just before \end{document}
to "12+1"?.
\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
aaa
\setcounter{page}{12} % this is the 12th page
\newpage
bbb
\cfoot{12+1} % this is the 12+1th page
\end{document}
The following solution sets page 13 as 12+1 in whichever format your page numbering is set to. It uses fancyhdr
to set the page number in the C
entre of the footer.
\documentclass{article}
\usepackage{lipsum,fancyhdr}
\pagestyle{fancy}
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% Remove header rule
\fancyfoot[C]{%
\ifnum\value{page}=13
$\mbox{\setcounter{page}{12}\thepage} + \mbox{\setcounter{page}{1}\thepage}$%
\setcounter{page}{13}%
\else
\thepage
\fi
}
\pagenumbering{roman} % Just as an example
\begin{document}
\sloppy\lipsum[1-50]\lipsum[1-50]
\end{document}