Page LayoutHide appendix title from TOC

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
CJFugate
Posts: 12
Joined: Thu Aug 23, 2012 11:47 pm

Hide appendix title from TOC

Post by CJFugate »

My TOC of the appendix looks something like this -

Appendices 39
A 40
A.1 1H NMR..................40

But I want to remove the second line. I tried using \chapter{}*, but that removes the "A" from TOC and from the section (the section appears as .1 1H NMR.......40).

I've tried using the \protect command added to the \addtocontents command, but this messes up my List of Figures and List of Tables. I've been reading the documentation on the tocvsec2 package, but I'm struggling to figure out how I can use it.

How can I remove the chapter from the TOC?
Last edited by cgnieder on Mon Sep 24, 2012 1:09 am, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Hide appendix title from TOC

Post by Stefan Kottwitz »

You could manipulate the tocdepth counter, or use the tocvsec2 package which you already mentioned. You did not tell, which problems you had in applying what the documentation said, so it's hard to help. I don't write up the documentation just in other words.

I just notice, you seem to want to use the A as a marker for appendix numbers, but you create a dummy chapter to achieve that, which should not be listed. Perhaps change the numbering instead. A doesn't stand for Appendix, it's alphabetical numbering, i.e. after Appendix A comes Appendix B, then Appendix C, etc.

Your document is divided in chapters, chapters are divided in sections. The sectioning units in the appendix seem to be sections, so they should be part of a chapter, which implies a normal chapter to me. Well, I would either have an appendix consisting of chapters, or an appendix which is a chapter consisting of sections.

Stefan
LaTeX.org admin
CJFugate
Posts: 12
Joined: Thu Aug 23, 2012 11:47 pm

Hide appendix title from TOC

Post by CJFugate »

Thanks. With the tocvsec2 package doc (like most LaTeX docs) I'm not to the point where I can figure out what to do from the doc yet. I need a working example that I can dissect in addition to the doc.

Your comment about chapters, sections, etc. got me thinking and I solved my problem. I had forgotten that you can modify the section numbering with \renewcommand. I got the style I wanted with -

Code: Select all

\renewcommand\thesection{A.\arabic{section}}
I did not include the \chapter command at all.
Last edited by cgnieder on Mon Sep 24, 2012 1:10 am, edited 1 time in total.
Post Reply