I would like to omit the page number of parts from the TOC.
The space between
---
(\mypagestyle
) and the page number differs, since they are raggedright. The space should always be the same.
`
\documentclass[ngerman,twoside=false]{scrbook}
\def\mypagestyle{\,\mbox{---}\,}
\RedeclareSectionCommands[
tocraggedpagenumber,
toclinefill={\footnotesize\mypagestyle},
tocindent=0em,
tocnumwidth=4em,
]{chapter,section,subsection,subsubsection,paragraph}
\RedeclareSectionCommand[
,tocentryformat=\large\scshape%
,tocindent=0em
,tocnumwidth=4em
]{part}
\RedeclareSectionCommand[%
,tocentryformat=\textbf,%
]{chapter}
\begin{document}
\tableofcontents
\part{part}
\chapter{chapter chapter}
\section{section section section} \section{section section section} \section{section section section}
\part{part}
\chapter{chapter chapter}
\section{section section section} \section{section section section} \section{section section section}
\setcounter{page}{100}
\part{part}
\chapter{chapter chapter}
\section{section section section} \section{section section section} \section{section section section}
\end{document}