2

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.

Thus, instead of

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

I need

Chapter__________________________________________1

How can this be achieved using the tocstyle package?

4

The feature is documented in table 3 of the manual:

\documentclass[paper=a4]{scrbook}

\usepackage{tocstyle}
\settocfeature{leaders}{\ \leaders\hrule\hfill}

\begin{document}
\frontmatter
\tableofcontents

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

enter image description here

0

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.

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.