# [OS X TeX] Modification of the TOC

Christian Burk maillists at gmx.de
Tue Jan 23 13:13:16 CET 2007

Am 23.01.2007 um 12:48 schrieb Alan Munn:

> At 12:05 PM +0100 1/23/07, Christian Burk wrote:
>> 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?
>>>>>
>>>>>
>>>>> {\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] %
>>> 		{\contentslabel[\textsc{\chaptername}\ \thecontentslabel]{6pc}}
>>> 		{\hspace{-4pc}}{\hfill\contentspage}
>>> \begin{document}
>>> \tableofcontents
>>> \chapter{Foo} This is a chapter
>>> \chapter{}
>>> \appendix
>>> {\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?)
>
> I'm not sure why this happens. Make sure that the first line of the
> included appendix contains the \addtocontents line I gave you (i.e.
> not in the main document) and it will work as you want.

To include the line in the appendix did the trick, I tried it within
the main document.

>>
>>  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?
>
> If you mean just for the appendix, I'm not sure.

Yep, I only need it for the appendix.

Christian
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8869004249572754, "perplexity": 12725.350241510148}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-35/segments/1408500826259.53/warc/CC-MAIN-20140820021346-00082-ip-10-180-136-8.ec2.internal.warc.gz"}