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?
- 506,678
- 8,814
3 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
\chapter*{Acknowledgments}
\addcontentsline{toc}{chapter}{Acknowledgments}
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}
\chapter{Experiments}
\chapter{Conclusion}
\end{document}
generates this ToC:

- 506,678
-
1
-
4@snoram - The option
toctells LaTeX to write the output to\jobname.toc, where\jobnameis set to the name of your main tex file. Other options arelot(to write to\jobname.lot, for the "List of Tables", generated by\listoftables) andlof(to write to\jobname.lof, for the "List of Figures", generated by\listoffigures. (Note, though, that the sample document features a\tableofcontentsinstruction but no\listoftablesor\listoffiguresinstructions.) – Mico Sep 10 '16 at 19:41 -
Many thanks to whoever provided the 100th upvote, earlier today! It yielded the 6th "Great Answer" gold badge. Thanks so much. This site is really great!!! – Mico Feb 10 '18 at 20:49
-
You might also want to add a
\mtcaddchapterin front of list of tables or figures if you're using one in case minitoc content does not appear. https://tex.stackexchange.com/questions/146461/minitoc-not-appear – usersina Jun 10 '22 at 15:26
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.
- 250,273
-
1wow - literally took a couple dozen answer-trials till i found this one. amazing - thanks! – trdavidson Aug 25 '19 at 15:09
A little package on github that might never hit CTAN can be of help here.
It takes care of the entries and the headings automatically.
\documentclass{book}
\usepackage{blindtext}
\usepackage[
% indentunnumbered
]{unnumberedtotoc} %get it from https://github.com/johannesbottcher/unnumberedtotoc
\usepackage{hyperref}
\begin{document}
\tableofcontents
\addchap{unnumbered chapter with toc and head}
\blindtext[10]
\addchap[title for toc and head]{chapter title}
\blindtext[10]
\addsec*{starred addsec}
\blindtext[10]
\addsec{regular addsec}
\blindtext[10]
\addsec*{starred addsec}
\blindtext[10]
\chapter{usual chapter}
\blindtext[10]
\chapter*{look at the header}
\blindtext[10]
\addchap*{really nothing, header cleared}
\blindtext[10]
\end{document}
- 24,235
- 10
- 93
- 248
\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 numbered1,2, ... Is this what you're after? Or are you interested in have something look similar to\abstractfrom thearticledocument class? Note that thereportdocument class does not provide\abstract, only anabstractenvironment. – Werner Nov 19 '11 at 23:02bookclass over thereportclass. That way you get the handy\frontmatter,\mainmatterand\backmatterswitches that handle this for you. Otherwise it's not a lot different fromreport. – qubyte Nov 20 '11 at 04:33