[Tex/LaTex] I want page 13 to show up as 12+1

numberingtriskaidekaphobia

I am writing an important document which has ended up being 13 pages.

For superstitious reasons, I want the page number on the last page to show up as "12+1". In other words, I want the page numbers to be:
1, 2, …, 11, 12, 12+1.

How do I do this?

Best Answer

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}

enter image description here