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 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? There is a related question, How to make 'appendix' appear in toc in Latex?, but the answers did not appear to help in this case.
How to add an appendix in LaTeX? Adding an appendix to your document in LaTeX is as easy as invoking the macro \appendix . From the moment you call this command, the new chapters will be numbered using capital letters, and instead of `Chapter' they will be called `Appendix'.
Appendices. Go to the end of the document where the appendices are to appear. Choose Document → Start appendix here. Sections, etc.
You can easily achieve what you want using the appendix
package. Here's a sample file that shows you how. The key is the titletoc
option when calling the package. It takes whatever value you've defined in \appendixname
and the default value is Appendix
.
\documentclass{report} \usepackage[titletoc]{appendix} \begin{document} \tableofcontents \chapter{Lorem ipsum} \section{Dolor sit amet} \begin{appendices} \chapter{Consectetur adipiscing elit} \chapter{Mauris euismod} \end{appendices} \end{document}
The output looks like
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With