Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add "Appendix" before "A" in thesis TOC

Tags:

latex

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.

like image 281
Carey Avatar asked Apr 17 '11 00:04

Carey


People also ask

How do you add an appendix to a thesis in LaTeX?

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'.

How do you add an appendix in LYX?

Appendices. Go to the end of the document where the appendices are to appear. Choose Document → Start appendix here. Sections, etc.


1 Answers

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

enter image description here

like image 115
abcd Avatar answered Sep 22 '22 21:09

abcd