4 May 2003 BenFrantzDale   » (Journeyer)

I finally figured out how to get a LaTeX table of contents to look the way I want, with no dot leaders and with the page numbers just to the right of the section titles.

  \ifnum \c@tocdepth >-2\relax
    \addvspace{2.25em \@plus\p@}%
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
       \large \bfseries #1~~\hb@xt@\@pnumwidth{\hss #2}\hfill}\par
  \ifnum \c@tocdepth >\m@ne
    \vskip 1.0em \@plus\p@
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \hskip -\leftskip
      \mbox{#1}\nobreak\nobreak\hb@xt@\@pnumwidth{\hss #2}\par

\setcounter{tocdepth}{1} % Only show sections and higher \def\@tocline#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 \mbox{#4}~~#5\hfill \hfill\par}% \fi} \makeatother

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!