[Tex/LaTex] Add “Appendix” before “A” for Appendix A in thesis TOC

appendicestable of contentsthesis

I am required to insert the word Appendix before the letter A in my dissertation Table of Contents as follows:

Appendix A (title for appendix A)

but the latex thesis cls file: FAU Thesis Class I use generates only the letter A followed by the appendix title:

A (title for appendix A)

The thesis cls file defines a "backmatter" command and the appendix is treated as a chapter.

\newcommand\backmatter{\appendix
\def\chaptermark##1{\markboth{%
\ifnum  \c@secnumdepth > \m@ne  \@chapapp\ \thechapter:  \fi  ##1}{%
\ifnum  \c@secnumdepth > \m@ne  \@chapapp\ \thechapter:  \fi  ##1}}%
\def\sectionmark##1{\relax}}

Is there a simple fix to the above code that will add the word Appendix before the letter A in the TOC for Appendix A? Some related questions have been posted but the answers did not appear to work in this case.

Best Answer

Add the following to your preamble:

\usepackage[titletoc]{appendix}
\makeatletter
\renewcommand\backmatter{
    \def\chaptermark##1{\markboth{%
        \ifnum  \c@secnumdepth > \m@ne  \@chapapp\ \thechapter:  \fi  ##1}{%
        \ifnum  \c@secnumdepth > \m@ne  \@chapapp\ \thechapter:  \fi  ##1}}%
    \def\sectionmark##1{\relax}}
\makeatother

The appendix package adds some extra functionality for dealing with appendices. This extra functionality (including the one you need) is accessed by using the \appendices environment instead of the \appendix command. So changing your thesis class \backmatter command to remove the \appendix command, along the with [titletoc] option of the package (which appends the appendix name to the letter in the TOC) should solve your problem.

Now in your actual thesis tex file you should do the following:

\backmatter
\begin{appendices}
\chapter{An appendix}
...
\end{appendices}
\bibliography{}