Menu

HowTo_HeadingNoNumber

How to set an outline level in the text without a number but with a number in the table of contents

A quite common requirement is to set a heading in the text without a number, but to include the number in the table of contents. Mostly this concerns the top level of outline and the levels below should still be numbered in the text.

The KOMA-Script classes have statements \partformat, \chapterformat (only scrbook and scrreprt), \sectionformat etc. for all numbered outline levels. These determine the output of the outline number in the heading itself. This makes it very easy to disable the output:

\documentclass{scrartcl}
\renewcommand*{\sectionformat}[1]{% Change counter format in headings as follows:
  % ... output nothing
}
\usepackage{blindtext}

\begin{document}
\tableofcontents
\blinddocument

\end{document}

If the number in the header should also be switched off when using running heads, \...markformat is responsible for this:

\documentclass{scrartcl}
\renewcommand*{\sectionformat}[1]{% Change counter format in headers as follows:
  % ... output nothing
}
\renewcommand*{\sectionmarkformat}[1]{% Change counter format in running heads as follows:
  % ... output nothing
}
\usepackage{blindtext}
 \pagestyle{headings}

\begin{document}
\tableofcontents
\blinddocument

\end{document}

Related

Wiki (English): HowTo_Headings
Wiki (English): HowTo_ToCConfiguration

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.