General ⇒ Exclude a headline from the ToC, but keep the section number
Exclude a headline from the ToC, but keep the section number
Is there a way to give a header a number, the sectional numbering, and leave it out of the Table of Content?
I've tried the \section*{something} but it leaves out both the number and the entry in the ToC, and I would very much like to keep the numbering of the sections (and subsection + subsubsections).
Is there a possible solution for this matter? (Keep headline number, exclude from the ToC)
/Kish
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Exclude a headline from the ToC, but keep the section number
try:
\section*{foo}
\stepcounter{section}
the latter command should increase the section counter.
Best,
Ott
Re: Exclude a headline from the ToC, but keep the section number
Did that solve your problem Kishmet?
Because I have the same problem, but the suggested solution cannot be used. I want a section number! If I use
\section*{}
It drops the sectionnumber. Using \stepcounter{section} just solves the problem for the nest section...
I.e. I want a toc like this:
1. Title 1
2. Title 2
And my text like this:
1. Title 1
2. Title 2
3. Title 3
Is that not possible?
Kind regards Hans
Re: Exclude a headline from the ToC, but keep the section number
It is possible to use \settocdepth{section}
in the document. This enables us to change the tocdepth for parts of the document. In my case this would be:
Contents
1. Title 1
2. Title 2
And my text like this:
1. Title 1
2. Title 2
\settocdepth{chapter}
3. Title 3
\settocdepth{section}
Hope this makes sense!