y question is, whether there is a solution to define a minimum blank space (length: three dots) between an entry's last word and the its page number within the table of contents?
Thanks a lot!
Update [08.01.2014]:
Hi! I have tried your solution, but interestingly, the space is connected to the page number's length. Thus the dots were removed if the page number increases (see my example).
\documentclass{scrbook}
\usepackage{tocstyle}
\usetocstyle{KOMAlike}
\settocstylefeature{pagenumberbox}{\hspace*{3em}}
\begin{document}
\tableofcontents
\chapter{chapter}
some text
\section{section}
some text\newpage
\setcounter{page}{10}
\section{Another section}
some text\newpage
\setcounter{page}{100}
\section{Next section}
some text\newpage
\setcounter{page}{1000}
\section{Guess! It's a section}
some text\newpage
\setcounter{page}{10000}
\section{Finally, the last section}
some text
\end{document}
This code result in the tiff-file below. How can I fix this problem?
Best Answer
Since in your older questions you've always used the
scrbook
class, I'll assume that you are using it.To make modifications to the ToC in KOMA classes usually the package
tocstyle
is used.If you want to keep the normal ToC of KOMA classes use
and to achieve what you want use the line
Note that approximately each
em
corresponds to a dot you want to remove.Also note that the optional argument
[1]
sets this behavior for\section
s only (2 is for\subsection
s, etc.). If you want it for all sectioning commands, simply remove it.MWE:
Output:
EDIT
To obtain what you have described in your edited question, it is better to resort to the
titletoc
package, issuing the commandMWE:
or, without any additional package, redefine the command
\@pnumwidth
to beMWE:
In both cases the output is: