# How to replace fixed indentation of ToC entry names with fixed space between number and name?

How to make indents as in the second image?

This is what it looks like now:

This is what it should look like:

MWE:

\documentclass[a4paper, 14pt, english]{extreport}

\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tocloft}
\usepackage[a4paper, left=25mm, right=10mm, top=20mm, bottom=20mm]{geometry}

\renewcommand{\rmdefault}{ftm}
\frenchspacing

\renewcommand{\cftchapfont}{\normalsize  }
\renewcommand\cftchappagefont{\normalfont}

\renewcommand{\cftbeforechapskip}{0em}
\renewcommand{\cftparskip}{-1mm}
\renewcommand{\cftdotsep}{1}

\cftsetindents{chapter}{0pt}{10pt}
\cftsetindents{section}{0pt}{30pt}
\cftsetindents{subsection}{0pt}{40pt}
\cftsetindents{subsubsection}{0pt}{50pt}

\begin{document}

\tableofcontents
\thispagestyle{empty}

\chapter{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}

\end{document}


The package tocloft supports this indirect. However this modification allows all settings by tocloft

\documentclass{book}
\usepackage{tocloft}
\makeatletter
\renewcommand{\numberline}[1]{%
\hb@xt@\wd0{\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
\makeatother
\begin{document}

\tableofcontents
\chapter{foo}
\section{bar}
\section{bar}
\setcounter{section}{170}
\section{bar}
\section{bar}

\end{document}


While I can't offer a tocloft solution, the desired layout can be achieved by using the tocstyle package (part of KOMA-Script) and its tocfullflat option.

\documentclass{report}

\usepackage[tocfullflat]{tocstyle}
\usetocstyle{allwithdot}
\settocstylefeature[0]{entryhook}{\normalfont}
\settocstylefeature[0]{entryvskip}{0pt}

\makeatletter
\renewcommand*{\@dotsep}{1}
\makeatother

\begin{document}

\tableofcontents

\chapter{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}
\section{test}

\end{document}