% % This package provides diamond dots in table of contents % Most of code are copied from texbook.tex by D. Knuth % This package is maintained by Ky Anh, Huynh (xkyanh@gmail.com) % You may distribute/modify/use this package under the terms of LPPL % (LaTeX Project Public License). If you need help, feel free to % post your requestt at http://viettug.org/projects/show/tex % \ProvidesPackage{hka_fancy_dotted_toc_line}[2009/05/01 HKA - fancy dotted toc line] \countdef\counter=255 \def\diamondleaders{% from texbook.tex \global\advance\counter by 1\relax% \ifodd\counter \kern-10pt% \fi% \leaders\hbox to 20pt{% \ifodd\counter \kern13pt% \else \kern3pt% \fi% .\hss}% } \def\@dottedtocline#1#2#3#4#5{% \ifnum #1>\c@tocdepth \else% \vskip \z@ \@plus .2\p@% {% \leftskip#2\relax% \rightskip\@tocrmarg% \parfillskip -\rightskip\parindent#2\relax% \@afterindenttrue\interlinepenalty% \@M\leavevmode\@tempdima#3\relax% \advance\leftskip\@tempdima\null% \nobreak% \hskip-\leftskip{#4}\nobreak% \diamondleaders\hfill% \nobreak% {#5}% the page \par% }% \fi% } \endinput