TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have searched for something to resolve a problem that has shown up here: How do I get \chaptername to appear in the table of contents?

I have tried the code from that thread. But I got an issue, that is, it adds the \chaptername even for appendix chapters:

Chapter 1. aaaaa
Chapter Appendix A

How can I resolve it?

share|improve this question
up vote 12 down vote accepted

At the start of the appendix, a redefinition of \cftchappresnum must be forwarded to the .toc file. I have appended the definition of \appendix to do so.

\chapter{Hello again}

enter image description here

share|improve this answer
Thanks for you reply! I dont know why, but it's seem that the problem is not complete resolved yet. It doesn't make effect on the first appendix chapter. And the result is: > Chapter A Appendix tittle. > Appendix B Appendix tittle. – xuansamdinh May 21 '12 at 21:44
@xuansamdinh Thanks for accepting my answer, but please also upvote it (this has to be done separately from accepting). – lockstep May 21 '12 at 21:55
Oh, it's suprise that it's doesn't effect to the first chapter when use \include to include appendix chapters, such as \include{appendA}. But when put these chapters directly to the main file or using the \input command, it's work nice! Could you improve the code for more nice working? Thank you! – xuansamdinh May 21 '12 at 21:58
@xuansamdinh Try to add \addtocontents{toc}{\protect\renewcommand{\protect\cftchappresnum}{\appendixnam‌​e\space}} at the start of your first "included" appendix chapter file. I suspect that it's a problem similar to the one solved in tex.stackexchange.com/a/50037/510. – lockstep May 21 '12 at 22:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.