5

I would like to have no dotted line between the sections and the page number (like for chapters). The switch I have included seem not to work (but it works for the chapter: I can have dotted lines if I set it to true). What is wrong?

\documentclass{scrbook}
\KOMAoptions{paper=156mm:234mm, BCOR=8mm,twoside,
    headinclude=false, footinclude=false, 
    headings=normal,
    chapterentrydots=false,  % default
    sectionentrydot=false,
    }

\begin{document}

\tableofcontents

\chapter{one}
\section{oneone}
\end{document}

enter image description here

9

Option sectionentrydots is provided by class scrartcl, but not by the classes with chapters.

But you can use \RedeclareSectionCommand:

\RedeclareSectionCommand[
  toclinefill=\hfill
]{section}

Example:

\documentclass{scrbook}
\KOMAoptions{paper=156mm:234mm, BCOR=8mm,twoside,
    headinclude=false, footinclude=false, 
    headings=normal,
    chapterentrydots=false,  % default
    }
\RedeclareSectionCommand[
  toclinefill=\hfill
]{section}

\begin{document}
\tableofcontents
\chapter{one}
\section{oneone}
\end{document}

Result:

enter image description here

Note that there is also \RedeclareSectionCommands:

\RedeclareSectionCommands[
  toclinefill=\hfill
]{section,subsection}

Then both sections and subsections do not get the dotted line in TOC.

3

You can redefine the command responsible for the leaders:

\documentclass{scrbook}

\KOMAoptions{
  paper=156mm:234mm,
  BCOR=8mm,twoside,
  headinclude=false,
  footinclude=false,
  headings=normal,
}

\renewcommand\TOCLineLeaderFill[1][]{\hfill}

\begin{document}

\tableofcontents

\chapter{one}
\section{oneone}

\end{document}

enter image description here

For finer control, you can load the tocbasic package (part of the KoMa-script bundle) and use \DeclareTOCStyleEntry.

  • 1
    You don't need to explicitly load tocbasic to use \DeclareTOCStyleEntry, because KOMA-Script classes already load tocbasic. – Schweinebacke Jul 13 '18 at 7:12

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.