GeneralAdd "Chapter" to ToC entries except for Appendix

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
jlin
Posts: 1
Joined: Thu Sep 22, 2011 12:51 am

Add "Chapter" to ToC entries except for Appendix

Post by jlin »

Hi everyone,

Adding the word Chapter to each chapter heading in the table of contents has appeared numerous times, and this one worked,

http://www.latex-community.org/forum/vi ... 968&p=7608

except that I don't want chapters in my appendix renamed 'chapters' but still keep the appendix heading. In the end, I want my TOC to look like this

Chapter 1 Introduction
1.1
1.2
Chapter 2 Conclusion
Appendix A
A.1
A.2

Is this possible? (btw, I'm using Lyx and have been adding code as ERT)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Add "Chapter" to ToC entries except for Appendix

Post by kaiserkarl13 »

I'm assuming you used these to get it working (inside tocloft):

Code: Select all

\renewcommand{\cftchappresnum}{Chapter }
\renewcommand{\cftchapaftersnum}{:}
\renewcommand{\cftchapnumwidth}{6em}
So now just do "\renewcommand{\cftchappresnum}{}" after \appendix and it should go back to normal.

If that doesn't work, try posting an example so we can tinker with it ourselves.
Post Reply