TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using example given here by @stephan TOC Section & Subsection coloring. Works great however I want to get rid of dots and page numbers.

I added this to the preamble


that removed the page numbers, but do not know how to remove the dots. I would appreciate your help. Its hard to get result without understanding the basics.

share|improve this question
up vote 22 down vote accepted

Method - 1: Add


in your preamble.

Method - 2: This can be achieved by tocloft package also. Here one has to use


to remove the page numbers and


to remove the dots.

A MWE will be:

% \cftpagenumbersoff{chapters}
\addtocontents{toc}{\cftpagenumbersoff{section}} %% Similarly for subsection, figure... as you wish
\renewcommand{\cftdot}{} %empty {} for no dots. you can have any symbol inside. For example put {\ensuremath{\ast}} and see what happens.
% ----------------------------------------------------------------




share|improve this answer
method-1 worked great, thanks for your help. – Raama May 12 '12 at 10:50
method 2- does not work on \listofalgorithms, but method 1 works... thanks! – ultrajohn May 8 '13 at 12:19

Your Answer


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.