1

Is it possible to have an Appendix in the middle of a document? That would be extremely helpful in working on two volumes of a book together, like for example, what was used in the new edition of the LaTeX Companion, Parts I & II, 3rd edition.

I tried scooping the \appendix command as in:

\documentclass{book}

\begin{document} \chapter{The first chapter} \chapter{The second chapter} { \appendix \chapter{The first Appendix} \chapter{The second Appendix} } \chapter{The third chapter} \chapter{The fourth chapter} \end{document}

to no avail.

2 Answers2

4

in book the command \appendix is very simple, defined by:

\newcommand\appendix{\par
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \gdef\@chapapp{\appendixname}%
  \gdef\thechapter{\@Alph\c@chapter}}

so you don't need a group (as the definitions are all global) but after your appendix do

\makeatletter
\setcounter{chapter}{2}
\setcounter{section}{0}
\gdef\@chapapp{\chaptername}
\gdef\thechapter{\@arabic\c@chapter}
\makeatother

and chapters will be restored

David Carlisle
  • 757,742
1

Some like this?

mwe

\documentclass{book}
\usepackage{appendix}
\begin{document}
\tableofcontents
\part{Volume}
\chapter{bla} bla ...
\chapter{bla} bla ...
\begin{appendices}
\chapter{bla} bla ...
\chapter{bla} bla ...
\end{appendices}
\part{Volume}
\chapter{bla} bla ...
\chapter{bla} bla ...
\begin{appendices}
\chapter{bla} bla ...
\chapter{bla} bla ...
\end{appendices}
\end{document}
Fran
  • 80,769