TeXnik - Tips TeX and LaTeX

Welcome to the TeXnik website (under construction)

tocloft - table of contents, list of figure / table, ...
TUG logo

Main page

Search CTAN:


Google c.t.t.

Google d.c.t.t.



Header  |  Labelwidth  |  Labelwidth without tocloft |  No Pagebreak between the Lists |  TOCstyle  |  Vertical Space | 

With the package tocloft you can define your own TOC-style. If it's not part of your local TeX-Installation download it at CTAN
Important: tocloft needs package stdclsdv.sty

To get a header like:

then write in the preamble f.ex. for toc and lof:
\addtocontents{toc}{\hfill Page\endgraf}
\addtocontents{lof}{\ Figure\hfill Page}
The TOC is different to the other lists which belongs to the LaTeX-bug

No Pagebreak between the Lists
For bookclasses you'll get a pagebreak between any new "list of ...". If you do not like this write just before the first "list of ..." should start
\chapter*{List of Figures, Tables and ...}\let\chapter=\section

Vertical Space
Your lo? has sometimes following entries:
-->  \addvspace {10\p@ }
      \contentsline {figure}{\numberline {1.1}{\ignorespaces Bild A}}{1}
-->  \addvspace {10\p@ }
       \contentsline {figure}{\numberline {2.1}{\ignorespaces Bild B}}{2}
      \contentsline {figure}{\numberline {2.2}{\ignorespaces Bild B1}}{3}
For some textclasses LaTeX puts this space between the listentries of different chapters. If you do not like this one write before the first figure in tex (red)
Alternative the listof??? can be redefine, if you also do not need ths space after the title:

Changing for example the style for the section headers write in LaTeX preamble:
changes the sectionfont to normalfont (not in bold). Not very intelligent, but possible ... ;-)

Changing the TOC style in general, go to this page

Labelwidth in TOC
When you have a lot of figures/tables/algorithm you'll get some problems with the list of figures/tables/algorithm:

As you see, the labelwidth for the figure/table/algorithm-num is too small. Using package tocloft you can change these labelwidth. For example for the list of figure:

in latex preamble

This commands add one space to the labelwidth:

In the same way you can change the labelwidth for the list of tables/algorithm. Look at the documentation of the package.

Changing the labelwidth without package tocloft is possible.

local time: Sun Sep 27 15:10:10 CEST 2020 ; file is: 456.357789351852 days old
contact webmaster _at_ TeXnik.de