TeXnik - Tips TeX and LaTeX

Welcome to the TeXnik website (under construction)

 Main page Index UK FAQ Documentation Software CTAN Search CTAN: Statistics Google c.t.t. Google d.c.t.t.
Header  |  Labelwidth  |  Labelwidth without tocloft |  No Pagebreak between the Lists |  TOCstyle  |  Vertical Space |

Important: tocloft needs package stdclsdv.sty

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

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
```\begingroup
\chapter*{List of Figures, Tables and ...}\let\chapter=\section
\listoffigures
\listoftables
\endgroup
```

Vertical Space
Your lo? has sometimes following entries:
```-->  \addvspace {10\p@ }
\contentsline {figure}{\numberline {1.1}{\ignorespaces Bild A}}{1}
\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)
```\addtocontents{lof}{%
}```
Alternative the listof??? can be redefine, if you also do not need ths space after the title:
```\let\myListof\listof????
\renewcommand\listof???{%
\begingroup
\myListof
\endgroup
}```

TOCstyle
Changing for example the style for the section headers write in LaTeX preamble:
```\usepackage{tocloft}
...
\renewcommand\cftsecfont{}```
changes the sectionfont to normalfont (not in bold). Not very intelligent, but possible ... ;-)

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

```\usepackage{tocloft}