[Tex/LaTex] Appendix in book – chapter, not part

appendicesbook-design

I'm wondering whether is possible to have Appendix designed as a chapter with sections in book document class and not as a part with chapters.

This is what I get using appendix package

\documentclass[onesided]{book}

\usepackage[titletoc]{appendix}

\begin{document}
\tableofcontents
\begin{appendices}
\appendixpage
\noappendicestocpagenum
\addappheadtotoc

\chapter{Appendices}
\section{A1 First appendix}
\section{A2 Second appendix}

\end{document}

enter image description here

But I would like to get something like this:
enter image description here

Best Answer

Never, ever type chapter/section numbers manually!

If you have read the appendix documentation, you would know that \appendixpage will create a “part-like” page. So, don’t use it.

Since you are using the standard class: book, there aren’t many hooks we can use. So I proposed the following:

  1. \suppresschapternumber makes the numbered chapter to be typeset as an unnumbered chapter, and it changes how the rest of the chapters are written into the ToC.
  2. \removedotbetweenchapterandsection, well, removes the dot between the chapter letter and the section number.

Use the following with extreme caution!

\documentclass[onesided]{book}

%\usepackage[titletoc]{appendix}

\usepackage{etoolbox}
\makeatletter
\newcommand*\suppresschapternumber{%
  \let\@makechapterhead\@makeschapterhead
  \patchcmd{\@chapter}
    {\protect\numberline{\thechapter}}
    {}
    {}{}%
}
\newcommand*\removedotbetweenchapterandsection{%
  \renewcommand\thesection{\thechapter\@arabic\c@section}%
}
\makeatother

\begin{document}
\tableofcontents

\appendix

\suppresschapternumber
\removedotbetweenchapterandsection

\chapter{Appendices}
\section{First appendix}
\section{Second appendix}

\chapter{More appendices}
\section{First appendix}
\section{Second appendix}

\end{document}

ToC


Appendices


More appendices