2

I am using the report document class together with part,section and chapter commands to structure my work. However, in the appendix this structure is too deeply nested, as I only have one Appendix.

So, what I want is:

  • Only one appendix, with the headline beeing "Appendix"
  • This Appendix being in the TOC on the same level as the chapters (Entry either "A Appendix" or "Appendix"
  • Sections inside the Appendix to be numbered A.1, A.2 etc.

My MWE looks like this:

\documentclass[a4paper, twoside, openright]{report}
\usepackage[titletoc]{appendix}
\usepackage{lipsum}
\renewcommand{\appendixpagename}{Appendix}
\begin{document}

\tableofcontents

\part{Part 1}
\chapter{Some Chapter}
\section{Some Section}
\lipsum

\appendix
\appendixpage
\noappendicestocpagenum

\chapter{This should be Appendix}%This is just for showing, where it shows up, in my original, it says only Appendix here.
\section{First section}
\lipsum
\section{Second section}

\end{document}

Which produces a nice entry in the TOC: TOC of the MWE

but the first page of the Appendix looks like this: Image of the Output of the MWE

So in this case the solution would be to remove the extra heading that says 'Appendix A' on the first appendix page. If this is not possible, any other solution to the problem is highly appreciated.

  • Does the subappendices environment help? It's part of the appendix package -- no one forces you to use \chapter. \renewcommand{\thesection}{A.\arabic{section}} and \section usage should solve the level and the numbering 'problem' – user31729 Jan 18 '18 at 12:35
  • Not really. This defines the Appendix belonging to the section that comes before. I actually want it to be on the chapter level. – Dschoni Jan 18 '18 at 12:51
  • Your question doesn't mention that appendices should appear on chapter level in ToC – user31729 Jan 18 '18 at 13:26
  • @ChristianHupfer fair enough. I added this. MWE does that so far. – Dschoni Jan 18 '18 at 13:30
3

A version with usage of most of appendix package macros: toc and page option as well as redefining the \appendixtocname and \thesection.

Most times, it is better to use the appendices environment.

\documentclass[a4paper, twoside, openright]{report}
\usepackage[titletoc,toc,page]{appendix}
\usepackage{lipsum}
\renewcommand{\appendixpagename}{\appendixname}

\renewcommand{\appendixtocname}{\appendixname}

\noappendicestocpagenum
\begin{document}

\tableofcontents

\part{Part 1}
\chapter{Some Chapter}
\section{Some Section}
\lipsum


\begin{appendices}
\renewcommand{\thesection}{A.\arabic{section}}
\section{First section}
\lipsum
\section{Second section}
\end{appendices}

\end{document}

enter image description here

2

I noticed that the starred macro \chapter* does not put the extra heading on the first page of the chapter. Unfortunately, it also doesn't make an entry to the table of contents, and the numbering of sections after this is messed up.

So what you can do: Use \chapter*, repair the section numbering with \refstepcounter{chapter} (or alike) and make a manual toc entry with \addcontentsline. MWE:

\documentclass[a4paper, twoside, openright]{report}
\usepackage[titletoc]{appendix}
\usepackage{lipsum}
\renewcommand{\appendixpagename}{Appendix}
\begin{document}

\tableofcontents

\part{Part 1}
\chapter{Some Chapter}
\section{Some Section}
\lipsum

\appendix
\appendixpage
\noappendicestocpagenum

\chapter*{Appendix}
\refstepcounter{chapter}
\addcontentsline{toc}{chapter}{Appendix}
\section{First section}
\lipsum
\section{Second section}

\end{document}

enter image description here

enter image description here

  • Also a very nice solution. I prefer the accepted answer, because it uses the appendices environment. Nevertheless, this answer is equally good. – Dschoni Jan 19 '18 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.