Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LaTex newbie question - Removing chapter headings while keeping in toc

2,988 views
Skip to first unread message

Toby Cadoux

unread,
Dec 7, 2003, 10:26:23 AM12/7/03
to
Hi

I was wondering if anyone could help me with a problem involving chapter
numbering in a report. I need to be able to remove the numbering from
\chapter headings in the body of the report while still having the
(unnumbered) chapter headings put in the toc. I suppose I need something
like \chapter* which keeps the item in the contents.

I am using the standard Debian LaTex distribution and am really wet behind
the ears when it comes to all this document preparation stuff

Thanks

José Carlos Santos

unread,
Dec 7, 2003, 11:59:42 AM12/7/03
to
Toby Cadoux wrote:

> Hi
>
> I was wondering if anyone could help me with a problem involving chapter
> numbering in a report. I need to be able to remove the numbering from
> \chapter headings in the body of the report while still having the
> (unnumbered) chapter headings put in the toc. I suppose I need something
> like \chapter* which keeps the item in the contents.

Start the new chapter with \chapter*{Another chapter} and type, on the
next line

\addcontentsline{toc}{chapter}{Another chapter}

Best regards,

Jose Carlos Santos

Donald Arseneau

unread,
Dec 7, 2003, 12:48:44 PM12/7/03
to
Toby Cadoux <to...@beclands.co.uk> writes:

> I was wondering if anyone could help me with a problem involving chapter
> numbering in a report. I need to be able to remove the numbering from
> \chapter headings in the body of the report while still having the
> (unnumbered) chapter headings put in the toc. I suppose I need something
> like \chapter* which keeps the item in the contents.

\chapter* is the harder way, because you need to make the toc entry
and the page header explicitly (\addcontentsline, \markboth). Better
is the setting:

\setcounter{secnumdepth}{-1}

in your preamble.

Donald Arseneau as...@triumf.ca

Manoj Kummini

unread,
Dec 7, 2003, 1:15:35 PM12/7/03
to
Donald Arseneau <as...@triumf.ca> wrote:

> Toby Cadoux <to...@beclands.co.uk> writes:
>
>> I was wondering if anyone could help me with a problem involving chapter
>> numbering in a report. I need to be able to remove the numbering from
>> \chapter headings in the body of the report while still having the
>> (unnumbered) chapter headings put in the toc. I suppose I need something
>

> [...]
>
> \setcounter{secnumdepth}{-1}

If the OP does not want to suppress the printing of section and subsection
numbers, he will have to set secnumdepth back to its default value of 2
after every \chapter, or define a new command that does

\setcounter{secnumdepth}{-1}
\chapter{An Unnumbered but TOCed Chapter}
\setcounter{secnumdepth}{2}

This is not clear from the original message.

Manoj.

--
Manoj Kummini
Graduate Student, Dept. of Mathematics, The Univ. of Kansas,
Lawrence KS 66045 USA. 38 deg 55 min N, 95 deg 14 min W.
http://www.math.ukans.edu/~kummini/index.html

Toby Cadoux

unread,
Dec 8, 2003, 3:30:41 PM12/8/03
to

Ah

That makes a whole lot of sense - now I just need to ensure what I write
is semi-decent:)

Many, many thanks

Douaa Medjamia

unread,
Oct 1, 2020, 1:44:04 PM10/1/20
to
I was wondering if anyone could help me with a problem involving chapter
numbering in a book.

Robert Heller

unread,
Oct 1, 2020, 3:51:29 PM10/1/20
to
At Thu, 1 Oct 2020 10:43:59 -0700 (PDT) Douaa Medjamia <dooa.m...@gmail.com> wrote:

>
> I was wondering if anyone could help me with a problem involving chapter
> numbering in a book.

What sort of problems are you having?

There are preamble instructions for controling chapter numbers. And it is
also possible to skip chapter numbering for specific "chapters".

I'm *guessing* you have some "chapters" where a chapter number is "wrong", but
they are still logically chapters that should be in the toc. Typically such
chapters like the Preface, Acknowledgements, etc. These chapters would be
declared with \chapter*{} instead of \chapter{}:


\chapter*{Preface}

\chapter*{Acknowledgements}

%% Chapter 1:
\chapter{The Story Begins}

It is also possible to create a toc entry directly:

\addcontentsline{toc}{chapter}{Some Chapter Heading}

This will add a chapter heading to the table of contents, but not generate a
actual chapter heading in the body of the document.

If this is what you want -- chapter headings in the toc, but not in the body
of the document, then what you really want is to redefine (or replace) the
\chapter{} command to do just that. One thing it should do in addition to the
\addcontentsline command is to update the sectioning counters (incrementing
the chapter counter, reseting the section and below counters to zero).

You might take a look at book.cls and use the code there as a template for
your replacement command.


>
>

--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services

Peter Flynn

unread,
Oct 3, 2020, 4:52:32 PM10/3/20
to
On 01/10/2020 18:43, Douaa Medjamia wrote:
> I was wondering if anyone could help me with a problem involving chapter
> numbering in a book.
>

We can try. You seem to have put your problem in the Subject, is that right?

The \chapter command has an optional argument for a version of the
chapter title to use in the ToC (and in running headings, if you use them).

\chapter[Introduction]{}

will create Chapter 1 with no title on the page, but the ToC will
contain an entry for "Introduction".

This is a rather unusual style — would you be in a position to explain a
little more about it?

Peter
0 new messages