# Line of dots in Table of Contents?

In my ToC, the "Bibliography" entry is treated as a chapter heading, so has no line of dots to the page number. However, as it has no sections, my publishers would like the line of dots. Same for the index.

What's the easiest way to do this?

-

## 1 Answer

Use the tocloft package, then where you want to switch it on

``````\addtocontents{toc}{%
\protect\renewcommand{\protect\cftchapleader}{%-- switch it on here
\bfseries\protect\cftdotfill{\protect\cftdotsep}}}
\bibliography{your-bib-file}
\makeindex
\addtocontents{toc}{%
\protect\renewcommand{\protect\cftchapleader}{}}%-- switch it of again
``````
-
Brilliant! That works perfectly - thank you very much. –  Alasdair Apr 14 '11 at 12:12
@Danie Els: Is there another perhaps less wordy way of accomplishings this without needing to put this for everything without dots? –  night owl Dec 15 '11 at 17:28