2

everyone:

I came across a problem. Following is how I format my table of contents:

\usepackage{tocloft}

\tocloftpagestyle{empty}

\renewcommand{\cftdot}{…}

\renewcommand{\cftdotsep}{0}

\renewcommand\cftsecleader{\cftdotfill{\cftdotsep}}

Its effect is as follows: enter image description here

My question is How to format the leading dots of section page number and subsection page number respectively. I want a different leading line for my subsection page number. I do not know how to set up it separately. Thanks in advance.

0

1 Answer 1

1

May be this is what you are asking:

\documentclass{article}
\usepackage{blindtext}
\usepackage{tocloft}
\renewcommand{\cftsecdotsep}{7}
\renewcommand\cftsecleader{\bfseries\large\cftdotfill{\cftsecdotsep}}
\renewcommand{\cftsubsecdotsep}{4}
\renewcommand\cftsubsecleader{\normalsize\cftdotfill{\cftsubsecdotsep}}
\renewcommand{\cftsubsubsecdotsep}{1}
\renewcommand\cftsubsubsecleader{\small\cftdotfill{\cftsubsubsecdotsep}}
\begin{document}
  \tableofcontents
  \Blinddocument
\end{document}

enter image description here

2
  • 1
    So how to align the different leading lines? They are ragged on the right. Commented Apr 26, 2015 at 8:32
  • @LawrenceLiu So it's do this for me.
    – touhami
    Commented Apr 26, 2015 at 8:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .