[OS X TeX] Modification of the TOC

Christian Burk maillists at gmx.de
Tue Jan 23 06:05:24 EST 2007


Am 23.01.2007 um 11:31 schrieb Alan Munn:

> At 9:08 AM +0100 1/23/07, Christian Burk wrote:
>> Am 22.01.2007 um 22:27 schrieb Alan Munn:
>>
>>> At 7:36 PM +0100 1/22/07, Christian Burk wrote:
>>>>
>>>> Chapter 1 BlaBla...............1 (This is a real chapter)
>>>> Chapter A DuDa.................2 (This is an appendix and should  
>>>> have "Appendix" instead of "Chapter")
>>>>
>>>> How could I modify the TOC to get "Appendix" in front of appendics?
>>>
>>> Add the following after your \apppendix command:
>>>
>>> \addtocontents{toc}{\protect\renewcommand{\protect\chaptername} 
>>> {\appendixname}}
>>
>> Chapter is still used for the appendix in the TOC...
>
> Did you run latex a couple of times and delete the aux file?  The  
> following small document works fine for me:
>
> -Alan
>
> \documentclass[12pt]{book}
> \usepackage [dotinlabels]{titletoc}
> 	\titlecontents {chapter} [6pc] %
> 		{\addvspace{1pc}\scshape}
> 		{\contentslabel[\textsc{\chaptername}\ \thecontentslabel]{6pc}}
> 		{\hspace{-4pc}}{\hfill\contentspage}
> 		[\addvspace{2pt}]
> \begin{document}
> \tableofcontents
> \chapter{Foo} This is a chapter
> \chapter{}
> \appendix
> \addtocontents{toc}{\protect\renewcommand{\protect\chaptername} 
> {\appendixname}}
> \chapter{Appendix}
> \end{document}

Thanks Alan, this example worked for me too and I found out the reason.

For the appendix as well as for the other chapters, I use the  
\include command in connection with \includeonly for easier  
maintenance during the period of writing.
And with this special combination (\include and \includeonly) the  
appendix comes up with "Chapter" in front of it. (Any thoughts why?)
Now I use the \input {myappendix_a} and it comes up right in the TOC.

Thanks for your help.

  A last question: Is there way to get the headline "Appendix A  
BlaBla" modified, so that it appears justified and e.g. in the middle  
of the page?


Thanks
Christian

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list