10

For my dissertation, I have multiple parts to represent each separate paper. I'm trying to get the appendix for each part to follow the part, and then have chapter numbering reset to 1 (rather than continuing in the appendix style as A, B, C, etc.).

The code I'm currently using, which isn't working:

\documentclass[11pt,a4paper,oneside]{book}

\begin{document}

\tableofcontents

\part{Part I}

\chapter{Chapter 1}

\chapter{Chapter 2}

\begin{appendix}

\chapter{Appendix 1}

\chapter{Appendix 2}

\end{appendix}

\part{Part II}

\chapter{Chapter 1}

\chapter{Chapter 2}

\begin{appendix}

\chapter{Appendix 1}

\end{appendix}

\end{document}

2 Answers 2

5

You can use the environment appendices provided by the package appendix.

Replace \begin{appendix} ... \end{appendix} with \begin{appendices} ... \end{appendices} and add the following lines in your preamble

\makeatletter
  \@addtoreset{chapter}{part}
  \@addtoreset{@ppsaveapp}{part}
\makeatother

to reset chapter numbering (counter chapter) and appendix numbering (counter @ppsaveapp) each time a part starts.

Thus your modified code

\documentclass[11pt,a4paper,oneside]{book}
\usepackage{appendix}

\makeatletter
  \@addtoreset{chapter}{part}
  \@addtoreset{@ppsaveapp}{part}
\makeatother

\begin{document}

\tableofcontents

\part{Part I}

\chapter{Chapter 1}

\chapter{Chapter 2}

\begin{appendices}

\chapter{Appendix 1}

\chapter{Appendix 2}

\end{appendices}

\part{Part II}

\chapter{Chapter 1}

\chapter{Chapter 2}

\begin{appendices}

\chapter{Appendix 1}

\end{appendices}

\end{document} 

will output

enter image description here

5

rather than use \begin{appendix} ... \end{appendix}, i'd be inclined to create a command \restartchapters and use that similarly to the way \appendix is used.

a possible definition would be parallel to the present definition of \appendix:

\makeatletter
\newcommand\restartchapters{\par
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \gdef\@chapapp{\chaptername}%
  \gdef\thechapter{\@arabic\c@chapter}}
\makeatother

then i'd invoke \restartchapters immediately after every \part line. you should be able to alternate \appendix and \restartchapters ad infinitum.

you could also modify the \@endpart definition from book.cls, but the suggested definition is less invasive, and since \part is otherwise a nice clean break point, it's probably safer unless you're really familiar with tinkering in the innards of a class file.

if you have cross-part cross-references, you should probably reset \thechapter to include the part number, as \gdef\thechapter{\thepart.\@arabic\c@chapter} in the definition above.

(this hasn't been tested, but if i had to do this, it's what i'd start with.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .