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

2 Answers 2

up vote 13 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

For the article class I use the following in the preamble to get the page numbers to be A-1, A-2...B-1, B-2, etc. so you don't have to hardwire the section letter for each appendix. Including \break makes so that each appendix starts on its own page and gets a new page numbering style according to the section A, B, C, etc.

\newcommand{\appendixpagenumbering}{
  \break
  \pagenumbering{arabic}
  \renewcommand{\thepage}{\thesection-\arabic{page}}
}

Then use this command at the beginning of each appendix section

\appendixpagenumbering

This works nicely with the figure and table renumbering commands used once at the beginning of the appendix.

\counterwithin{figure}{section}
\counterwithin{table}{section}
share|improve this answer
1  
You could also add the clearpage, the redefinition of thepage and the pagenumbering to the definition of \appendix. Means less work and makes it more consistent. –  Johannes_B Nov 7 at 19:53
1  
Welcome to TeX.SX! –  Andrew Swann Nov 7 at 19:53
    
But, i think using report would be a cleaner solution considering the clearpages. Ah and yeah, welcome :-) –  Johannes_B Nov 7 at 19:53

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.