I’m using the titletoc package to create a TOC. How can I make sure that my dotted lines always touch the number? More precisely, I want the dotted lines to look as in the following image:

enter image description here


Here's one possible solution using \contentsmargin and \dottedcontents:





\section{test test test test test test}



And the obtained ToC:

enter image description here

Personally, I don't like much this layout, and would prefer some uniform white space between the rightmost dot and the page numbers.

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.