[OS X TeX] titletoc and Appendix

Marc Millstone millstone at gmail.com
Thu Jun 8 12:29:21 EDT 2006


For the heck of it, I decided to play around with the titlesec and
titletoc packages.
However, I am having issues with the code below.

In the documentation of titlesec, it says that \chaptertitlename will
refer to either "Chapter" or "Appendix" depending on the situation.

The desired behaviour is the formatted table of contents of the form
Chapter 1
Chapter 2
Chapter 3
Appendix A

However, latex seems to be ignoring the \chaptertitlename command in the table
of contents formatting and  outputs:

Chapter 1 ......
Chapter 2 ...
Chapter 3
Chapter A


  However, in the document itself, it is outputting the correct title
"Appendix" when asked.


What am I missing?  ANy help in this matter would be greatly appreciated.

Also, on this list, is there a way of responding to a specific message
even though
I receive list emails in digest form?


Sincerely,
marc





CODE:
---------------------
\documentclass[twoside]{report}
\usepackage{titlesec}
\usepackage[nodotinlabels]{titletoc}

\titlecontents{chapter} [5pc]
   {\addvspace{1pc}\bfseries\filright}
   {\contentslabel
      [\rmfamily\textsc{\chaptertitlename}\
       \thecontentslabel]{5pc}}
   {\rmfamily\textsc{\thecontentslabel}}{
\hfill\makebox[.3\textwidth][r]{\contentspage}}
   [\addvspace{2pt}]

\setcounter{tocdepth}{2}

\begin{document}
\clearpage
\tableofcontents
\chapter{Chapter 1}
\chapter{Chapter 2}
\chapter{Chapter 3}

\appendix
\chaptertitlename
\chapter{Appendix}
\chaptertitlename
\end{document}
-------------------------
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list