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.

I am writing a book and would like to have appendices at the end of each chapter, for instance appendices at the end of Chapter 2 should look like:

Appendix 2A Derivation of MMSE Equation

Appendix 2B Proof of ....

Each appendix can contain subsections. In the TOC they should also appear with these titles. And the page headings also should she the title of the appendix. I have looked at the appendix package but it does not seem to offer all these capabilities. Any ideas how can I do this?

share|improve this question
So you're comfortable with having these appendices set as \section and show up in the ToC formatted as such? –  Werner Sep 21 '12 at 15:39

1 Answer 1

Here's a possible solution in which I assumed that the sections corresponding to appendices will be the last sections of their corresponding chapter. I defined an \appsection command to change \thesection so as to obtain the required formatting; this command has to be issued before the appendices for a chapter. Using the etoolbox package, \chapter restores the original meaning of \thesection.





\chapter{Test Chapter One}
\section{A regular section in chapter one}

\chapter{Test Chapter Two}
\section{A regular section in chapter two}
\section{Derivation of MMSE Equation}
\subsection{Some remarks}
\subsection{Preliminary results}
\section{Proof of the main result}
\subsection{Some important consequences}

\chapter{Test Chapter Three}
\section{A regular section in chapter three}
\section{Derivation of ABCD Equation}
\subsection{Preliminary results}
\section{Proof of the main result}
\subsection{Some important consequences}
\subsection{Some remarks}


enter image description here

In case hyperref is loaded, the above code has to be slightly changed to


share|improve this answer
When using hyperref the modified code doesn't work. It changes, for instance, 2.A Derivation of MMSE Equation into 2.1 Derivation of MMSE Equation. Is there a way to fix it? –  petobens Dec 6 '13 at 22:12
@petobens: using both versions (with thesection and with theHsection) together seems to make it work with hyperref. –  Dan Stahlke Apr 8 at 21:59
The version without hyperref works for me while using hyperref, but the second does not. The hyperrefs to the appendix is broken, but not to it's subsections. –  Bernhard Aug 26 at 8:11

Your Answer


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.