# How do i replace the dots in my table of contents between the text and page number with a horizontal line using the tocstyle package?

Due to some major design changes in our corporate identity, its now up to me to update our existing latex document class according to the new design guidelines. I´m having troubles cutomizing the layout of our table of contents. Instead of filling the gaps between sections and page numbers with dots, I need to use a continuous horizonal line.

Chapter...............................................................1

I need

Chapter__________________________________________1

How can this be achieved using the tocstyle package?

The feature is documented in table 3 of the manual:

\documentclass[paper=a4]{scrbook}

\usepackage{tocstyle}

\begin{document}
\frontmatter
\tableofcontents

\mainmatter
\chapter{First}
\section{Sec}
\end{document}


You could exchange the dots with an underscore and change the separation lower than zero with the tocloft package.

\usepackage{tocloft}
\renewcommand{\cftdot}{\_}
\renewcommand{\cftdotsep}{-.5}


It looks a bit like a quick and dirty solution, especially since the gap between section name and underscore is too small.