1

How to remove the section number ("1" in the example below) in the toc of scrartcl?

  • it does not matter if the section number is or is not stated in the text (I already know how to remove it there).

  • I know, I could use a starred section and manually add it to the toc, but in my real document, I use them for something else with a different format

MWE:

\documentclass{scrartcl}

\KOMAoption{sectionentrydots}{true}
\renewcommand*{\sectionformat}{}

\begin{document}

\tableofcontents

\section{non-star section}

\end{document}

enter image description here

3

Maybe you want something like

\documentclass{scrartcl}
\RedeclareSectionCommand[
  toclinefill=\TOCLineLeaderFill,
  %tocnumwidth=0pt,
  tocentrynumberformat=\gobbleentrynumber
]{section}
\newcommand*\gobbleentrynumber[1]{}

\renewcommand*{\sectionformat}{}

\begin{document}
\tableofcontents
\section{non-star section}
\end{document}

enter image description here

Or if you uncomment tocnumwidth=0pt:

enter image description here

But I would use

\documentclass{scrartcl}

\KOMAoptions{
  sectionentrydots=true,
  toc=indenttextentries
}

\begin{document}
\tableofcontents
\addsec{non-star section}
\end{document}

with or without toc=indenttextentries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.