4

I am trying to add dotted lines in the table of contents using the tocloft package.

\usepackage{tocloft}
\renewcommand\cftchapdotsep{\cftdotsep}
\renewcommand\cftchapleader{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}

I succeeded in getting them on the table of contents page, but I can't seem to figure out how to get them to show up on my list if figures and list of tables.

  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – karlkoeller Nov 27 '13 at 5:47
  • Try \renewcommand\cfttabdotsep{\cftdotsep} \renewcommand\cfttableader{\cftdotfill{\cfttabdotsep}} for the LoT and \renewcommand\cftfigdotsep{\cftdotsep} \renewcommand\cftfigleader{\cftdotfill{\cftfigdotsep}} for the LoF. – karlkoeller Nov 27 '13 at 5:53
1

Which document class do you use? With either the book or the report document class (and the tocloft package loaded), dot leaders are enabled by default for section, figure, and table items; there should thus be no need to (re)define the macros \cftsecleader, \cftfigleader, and \cfttableader to enable dot leaders for these items in the table of contents, the list of figures, and the list of tables. To enable dot leaders for chapter items, it suffices to run

\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}

Anyway, it appears that you're using a document class that doesn't enable dot leaders by default for any of these four item types. To enable them, you should execute the following four instructions (note that the macro \cftdotsep occurs in all four of them):

\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftfigleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cfttableader}{\cftdotfill{\cftdotsep}}

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.