I have been using tocstyle until it was removed.
Here is my definition
\usepackage[%
%%% toc width calculation
tocindentauto, % all widths at the TOCs are calculated by tocindentauto
%%% indentation of toc
tocgraduated, % standard
%%% page breaking rules
tocbreaksstrict, % sets a lot of penalties before and after TOC entries
% to avoid page break between a TOC entry and it's parent.
%%% indentation of unnumbered TOC entries
toctextentriesleft, % indented as if they have an empty number.
]{tocstyle}
I have found this definition for tocbasic and changed the second line to \dotfill, but the dotted line is different to before
\DeclareTOCStyleEntries[
raggedentrytext,
linefill=\hfill,
numwidth=0pt,
numsep=1ex,
dynnumwidth
]{tocline}{chapter,section,subsection,subsubsection,paragraph,subparagraph}
\DeclareTOCStyleEntries[
linefill=\dotfill,
indent=0pt,
dynindent
]{tocline}{section,subsection,subsubsection,paragraph,subparagraph}
\setkomafont{chapterentry}{\bfseries}
So the question is how to restore the dotted line with spacing as in the first example?
Best Answer
Package
tocbasic
provides\TOCLineLeaderFill
for the dotted line between the entry text and the page number in TOC. So you could useBut chapter entries without dots and other levels with dots are the default for
book
andreport
classes! Therefore you simple have to remove all yourhfill
settings to get the desired result.Example:
If you do not use a KOMA-Script class, you have to load package
tocbasic
and have to declare that thesection
indent follows thechapter
settings and theparagraph
indent follows the indent and number width ofsubsubsection
entries.