Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

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
share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.