5

Using memoir, I want to change the ToC such that it displays a colored horizontal line (_____) instead of the dots between the chapter name and the page number. Is this possible?

Before:

1 First Chapter . . . . . . . 5

After:

1 First Chapter _____________ 5

1 Answer 1

6

Use

\renewcommand{\cftchapterleader}{\color{green}\hrulefill}

MWE:

\documentclass{memoir}

\usepackage{xcolor}

\renewcommand{\cftchapterleader}{\color{green}\hrulefill}

\begin{document}

\tableofcontents

\chapter{First chapter}

\end{document} 

enter image description here

Change green to the color you like.

1
  • 1
    Thank you. I added additional spaces \renewcommand{\cftchapterleader}{\color{green}~\hrulefill~}
    – Florian
    Commented Mar 9, 2015 at 9:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .