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.

For an appendix I want a page numbering which goes like A1, A2, ...

How to do that? With \pagenumbering{...} I can only choose between arabic and roman numbering.

share|improve this question
add comment

1 Answer

up vote 11 down vote accepted

You can change the "appearance" of the page counter by redefining \thepage. Here's a solution that simply adds "A":

\documentclass{article}

\usepackage{lipsum}

\begin{document}

\section{foo}

\lipsum

\clearpage
\pagenumbering{arabic}% resets `page` counter to 1
\renewcommand*{\thepage}{A\arabic{page}}
\appendix

\section{appfoo}

\lipsum

\end{document}

For the book and report class, you may consider to add a page number prefix according to the apendix chapter "number" ("A", "B", ...). In the following example, the etoolbox package is used to prepend the definition of \chapter at the start of the appendix:

\documentclass{report}

\usepackage{etoolbox}

\usepackage{lipsum}

\begin{document}

\chapter{foo}

\lipsum

\appendix
\pretocmd{\chapter}{%
  \clearpage
  \pagenumbering{arabic}%
  \renewcommand*{\thepage}{\thechapter\arabic{page}}%
}{}{}

\chapter{appfoo}

\lipsum

\chapter{appbar}

\lipsum

\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.