I wish to have a "Introduction" section that is not numbered, with subparts within it. I wish the subsections of that section not to be numbered, yet the whole thing to appear in the table of contents.
If I use
\section*{Introduction}
\addcontentsline{toc}{section}{Introduction}
\subsection{First part of intro}
...
\subsection{Second part of intro}
...then the \subsection commands will (in the numbering scheme I use) generate numbering such as "0.1 First part of intro" both in-text and in the TOC.
The following generates what I want:
\section*{Introduction}
\addcontentsline{toc}{section}{Introduction}
\subsection*{First part of intro}
\addcontentsline{toc}{subsection}{First part of intro}
...
\subsection*{Second part of intro}
\addcontentsline{toc}{subsection}{Second part of intro}
Is there a way to automagically do this? My problem is that I have to type the \addcontentsline
everywhere, when I would like to have something where \section*
triggers a switch to "non-numbered mode" where each \subsection command is expanded to the pair of \subsection*;\addcontentsline
commands or something similar (and the next \section
switches back to "numbered mode").
EDIT: disabling numbering of subsections for the whole document is not desired.
\frontmatter
usually turns of the numbers of\chapter
only. Withbook
the section numbers even still have the chapter prefix, e.g.,0.
. Other classes may behave different, e.g.,scrbook
omits the chapter number prefix forsection
,subsection
etc. andfigure
andtable
.