LaTeX tips and tricks

Squeezing vertical spaces

Narrowing vertical spaces between paragraphs:

\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
\setlength{\headsep}{0pt}
\setlength{\topskip}{0pt}
\setlength{\topmargin}{0pt}
\setlength{\topsep}{0pt}
\setlength{\partopsep}{0pt}
\setlength{\baselineskip}{0cm}

If you you multicol package for typesetting into multiple columns, you may use as well

\setlength{\multicolsep}{\parskip}

For narrowing spaces around section titles is useful titlesec package with option compact turned on. Detailed spacing settings are available via \titlespacing commands (for details view documentation).

\usepackage[compact]{titlesec}
...
\titlespacing{\section}{0pt}{0.2cm}{*0}
\titlespacing{\subsection}{0pt}{*0}{*0}
\titlespacing{\subsubsection}{0pt}{*0}{*0}

Spaces between list items are easily changed with enumitem package. No further changes to original text are needed. Package allows changes at one place only or changing layout of all lists in text. Following turns off all useless spaces around (and inside) list.

\usepackage{enumitem}
...
\setlist{topsep=0pt,partopsep=0pt,parsep=0pt,itemsep=0pt}

Page was last changed on September 18, 2008 at 12:20 am

Created by Vojtech HorkyXHTML & CSS valid •