# Hypertext Help with LaTeX
Lengths

A length is a measure of distance. Many LaTeX commands take a length as an argument. A length of one inch is specified by typing `1in` or, to specify the same length using metric units, by typing `2.54cm`.

## Units

LaTeX knows about the following common units.

- `in` - inches
- `mm` - millimeters
- `cm` - centimeters
- `pt` - points (about 1/72 inch)
- `em` - approximately the width of an "M" in the current font
- `ex` - approximately the height of an "x" in the current font

And the following less common units

- `pc` - pica (12pt/pc)
- `bp` - big pt (72bp/in)
- `dd` - didôt (1157dd=1238pt)
- `cc` - cîcero (12dd/cc)
- `sp` - scaled point (65536sp/pt)

Lengths may also be negative, for example, `-1.5em`.
Note that the number `0` by itself is not a length; it must be specified as `0in` or `0pt`, for example.

## Length commands

A length may also be specified by a length command. An example is `\parindent` whose value specifies the current width of the indentation which begins paragraphs. Multiples of such length commands may be specified, for example by writing `2.5\parindent` or `-0.1\parindent`.

Some length commands are

- `\parindent` - normal paragraph indentation
- `\baselineskip` - normal vertical distance between lines in a paragraph
  - `\baselinestretch` - multiplies `\baselineskip`
- `\parskip` - the extra vertical space between paragraphs
- `\textwidth` - the width of text on the page
- `\linewidth` - width of a line in the local environment
- `\textheight` - the height of text on the page
- `\unitlength` - units of lenght in Picture Environment

All length commands are robust and should not be preceded by a `\protect` command.

## Rubber lengths

Most lengths have a fixed value. However, LaTeX also allows for "rubber" lengths; these have a natural length plus a degree of elasticity. For example, the `\fill` length command has a natural length of zero but is infinitely stretchable, so that a space of width `\fill` will try to stretch as much as possible. Multiplying a rubber length by a fixed factor destroys its elasticity: `0.5\fill` becomes a rigid length with a value of zero.

## Setting values for length commands

The following LaTeX commands define and manipulate the value of length commands

- `\newlength` - define a new length command

- `\setlength`
- `\addtolength`

- `\settowidth`
- `\settoheight`
- `\settodepth`

## Commands that add space

- Horizontal space
  - `\hfill`
  - `\hspace`
- Vertical Space
  - `\addvspace`
  - `\smallskip`
  - `\medskip`
  - `\bigskip`
  - `\vfill`
  - `\vspace`

Back to LaTeX Table of Contents