15

I am using the book LaTeX class and I want to add appendices. I do this in the following way:

\usepackage{appendix} \appendix \appendixpage \noappendicestocpagenum \addappheadtotoc \chapter{Some title} %... 

My problem with this is that the \chapter seems to be taken as \chapter*. Because instead of Appendix A. Some title (which is what I want) the appendix that is just titled Some title.

Any idea how I can get the "Appendix A" in front of it? I though this would standard behaviour in the book class. Possibly some other package is messing things up. For instance, I use titlesec, hyperref and cleveref.

Edit: clarification, I am talking about both the title in the text AND the ToC. Neither shows "Appendix A".

2
  • Are you talking about the title in the ToC or in the text? Also please complete your example. It's not a working example. Commented Dec 6, 2011 at 10:25
  • I mean both. I edited question to clarify. Commented Dec 6, 2011 at 13:17

2 Answers 2

12

The problem turned out to be caused by the fact that I had put \backmatter before \appendix. Putting \backmatter after the appendices solves the problem entirely.

It also turned out this problem had already been solved here: Numbering of appendices in the backmatter of a book

8

I'm not quite sure if I correctly understood your request. But try the following to get "Appendix A" in front of your entries in the ToC.

\documentclass{book} \usepackage[titletoc]{appendix} \begin{document} \tableofcontents \begin{appendices} \appendixpage \noappendicestocpagenum \addappheadtotoc \chapter{Some title} Some text \end{appendices} \end{document} 

ToC:

enter image description here

Title in text:

enter image description here

10
  • 2
    With this setup, you get a line in the ToC labelled "Appendices" followed by "Appendix A Some Title". It may be better to replace the \begin{appendices} and \end{appendices} commands with a single \appendix instruction (while leaving the \appendixpage, \noappendicestocpagenum, and \addappheadtotoc instructions in place. This way, the entries for the individual appendix sections in the ToC will look like "A Some Text". A second advantage of using \appendix is that cleveref's \cref command will replace the prefix "section" with "appendix", which is probably what the OP wants. Commented Dec 6, 2011 at 10:53
  • @Mico Yes, I know, that you get "Appendix A Some title". The image above shows the ToC. I understand the OP's request in a way that he wants to change the title formatting in the ToC. Commented Dec 6, 2011 at 10:59
  • OK, maybe I misunderstood the OP's request -- I thought he wanted "Appendix A" to show up at the start of the section. Upon re-reading the OP's question, I'd say your interpretation seems closer to the mark. Commented Dec 6, 2011 at 11:10
  • @Mico: you were both right. My problem is that "Appendix A" is shown neither in the text nor in the ToC Commented Dec 6, 2011 at 13:18
  • 1
    @Matthias Nice to hear this :) Also have a look at tex.stackexchange.com/questions/1884/…. Especially Caramdir's answer. Commented Dec 6, 2011 at 14:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.