Sie sind auf Seite 1von 3

11/19/2014

sectioning - Creating unnumbered chapters/sections (plus adding them to the ToC and/or header) - TeX - LaTeX Stack Exchange
sign up

log in

tour

help

Ad Options

Ads by Info

TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related
typesetting systems. It's 100% free, no registration required.

Take the 2-minute tour

Creating unnumbered chapters/sections (plus adding them to the ToC and/or header)
I'm using the report document class for a thesis, and I need to add things like "Acknowledgements" and an "Introduction". I
noticed that there is an \abstract command which would have been wonderful if applied similarly. How do I add these without
messing up the chapters' numbering while being picked up by the ToC in proper order and page numbering?
{sectioning} {table-of-contents} {header-footer} {numbering} {starred-version}

edited Jan 12 '13 at 17:25


lockstep
130k

25

362

544

asked Nov 19 '11 at 22:47


Ayman Elmasry
2,094

21

41

Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem
strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very
concise. Upvoting is the preferred way here to say "thank you" to users who helped you. Torbjrn T.
Nov 19 '11 at 22:56
Are you really using \documentstyle ? That's LaTeX2.09 (pre-1994) syntax. Joseph Wright Nov 19
'11 at 22:56
@JosephWright: Without even thinking, I modified "documentstyle" to "document style" in the post. Not
sure how intentional this was from the OP. Werner Nov 19 '11 at 22:59

For unnumbered chapters, you could just use \chapter*{Acknowledgements} and \chapter*
{Introduction} . These chapter will be formatted similarly to \chapter , without the number and not
show up in the ToC. Subsequent chapters will be numbered 1 , 2 , ... Is this what you're after? Or are
you interested in have something look similar to \abstract from the article document class? Note
that the report document class does not provide \abstract , only an abstract environment.
Werner Nov 19 '11 at 23:02
I know that this seems like a potentially big shift, but I recommend the book class over the report
class. That way you get the handy \frontmatter , \mainmatter and \backmatter switches that handle
this for you. Otherwise it's not a lot different from report . qubyte Nov 20 '11 at 4:33

2 Answers
To get unnumbered chapters, parts, sections, subsections, etc, you just affix a * (asterisk)
to the respective sectioning command; hence, you'd type something like
\section*{Acknowledgments}

or
\chapter*{Introduction}

Exactly which sectioning command you ought to use will depend importantly on aspects of
the document that you haven't told us about. E.g., should the respective parts begin on a
page of their own, and how prominent do you want the caption of the sectioning command
to be?
Note that unnumbered parts, chapters, sections, etc are not included automatically in the
table of contents (ToC). In case you need some (or all) of them to be included, you should
insert an \addcontentsline instruction after each such sectioning command. For example,
you'd type:
\chapter*{Foreword}
\addcontentsline{toc}{chapter}{Foreword}

The second argument of the \addcontentsline instruction -- here, chapter -- instructs


LaTeX to typeset the entry in a given style, here, "chapter style".
The following MWE
\documentclass{report}
\begin{document}
\tableofcontents

http://tex.stackexchange.com/questions/35433/creating-unnumbered-chapters-sections-plus-adding-them-to-the-toc-and-or-header

1/3

11/19/2014

sectioning - Creating unnumbered chapters/sections (plus adding them to the ToC and/or header) - TeX - LaTeX Stack Exchange

\chapter*{Acknowledgments}
\addcontentsline{toc}{chapter}{Acknowledgments}
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}
\chapter{Experiments}
\chapter{Conclusion}
\end{document}

generates this ToC:


edited Jan 12 '13 at 20:20

answered Nov 19 '11 at


23:03
Mico
95.1k

126

294

It's probably a good idea to show also the way to insert the unnumbered chapters in the ToC. egreg
Nov 19 '11 at 23:06
Great suggestion. I've amended the answer accordingly. Mico Nov 19 '11 at 23:35
AdsThat's
by Info

Options
wrong. Ad
:) A
\chapter command in the \frontmatter produces by itself an unnumbered chapter

which goes in the ToC. The OP uses report, it seems, so no \frontmatter and \mainmatter . egreg
Nov 19 '11 at 23:46
I had missed the fact that the OP was using the report rather than the book document class. I've
updated my MWE. Mico Nov 20 '11 at 0:00

If the book class is really better, I suppose I should give it a try, but I would need the support for such an
endeavour, probably post a new thread to see if it is more fitting for a thesis. I really don't have time to
experiment, I couldn't even check my own post (this one) for 2 days.
0:38

Ayman Elmasry Nov 22 '11 at

Besides adding unnumbered chapters/sections to the ToC, you may also want to ensure that
they are correctly displayed in the header/footer. In the report and book class this may be
done by writing, e.g.,
\chapter*{Introduction}
\markboth{Introduction}{Introduction}

for unnumbered chapters (the second argument of \markboth controls "right" [odd] pages in
twoside documents; it may also be left empty) and
\section*{Introduction}
\markright{Introduction}

for unnumbered sections. (Should you have enabled headers in the article class, use
\markboth in conjunction with \section* and \markright in conjunction with \subsection* .)
Note that the above code snippets will produce non-capitalized names in the header;
should you want to capitalize them (as for numbered chapters in the standard classes),
replace Introduction with \MakeUppercase{Introduction} .
Addendum: Both Mico's and my answer refer to the standard document classes ( article ,
book , report ). The answers should work for most other classes; however, some classes
may offer easier solutions. E.g., with the KOMA-Script classes you may simply use the
commands \addchap / \addsec to create unnumbered chapters/sections that will be
displayed in the ToC and the header.
edited Jan 13 '13 at 13:05

answered Jan 12 '13 at


16:36
lockstep
130k

25

362

544

http://tex.stackexchange.com/questions/35433/creating-unnumbered-chapters-sections-plus-adding-them-to-the-toc-and-or-header

2/3

11/19/2014

sectioning - Creating unnumbered chapters/sections (plus adding them to the ToC and/or header) - TeX - LaTeX Stack Exchange
Ads by Info

Ad Options

http://tex.stackexchange.com/questions/35433/creating-unnumbered-chapters-sections-plus-adding-them-to-the-toc-and-or-header

3/3

Das könnte Ihnen auch gefallen