0

My table of contents looks like this now:

A Appendix A

B Appendix B

C Appendix C

D Appendix D

I want it to look like this:

Appendix A

Appendix B

Appendix C

Appendix D

I use the following code to make the appendices:

\chapter{Appendix A} \label{App:AppendixA}
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}

I tried the following:

\chapter*{Appendix A}
\label{App:AppendixA}
\addcontentsline{toc}{chapter}{Appendix A}

This does however give me the correct result in the table of contents. But the problem here is that when using the first code, I get the following result: GoodAppendix.

But when I then use the code as I explained above, I get the following result: BadAppendix

I obviously want the big letters to remain.

  • 2
    Please provide a complete, compilable, minimal working example. – Sean Allred Jun 9 '15 at 16:29
1

I suppose you are using the report or a similar class. If that be the case, you can make use of the appendix package by adding this simple command to the preamble

\usepackage[toc,page]{appendix}

The appendices environment then does your work, where you can simply use the \chapter command and provide a suitable title to your appendix. For example:

\begin{appendices}
\chapter{Code for Numerical Simulation}
%the first appendix
text for this appendix goes here
\end{appendices}

In table of contents, it appears as follows appendices in table of contents

  • Thank you for the help. However, as in your example it still says "A Code for Numerical Simulation". My question is, how do I remove the A in front? – Dennis Jun 9 '15 at 19:42

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.