Hi, I'm trying to put my university report together in latex, and I've run into an issue I dont know how to solve.
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
General ⇒ Exclude a headline from the ToC, but keep the section number
Re: Exclude a headline from the ToC, but keep the section number
Hi Kishmet,
try:
\section*{foo}
\stepcounter{section}
the latter command should increase the section counter.
Best,
Ott
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
Hi
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
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
Ok I found a solution myself
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!
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!