\setlength (LaTeX2e unofficial reference manual (November 2018))

Next: \addtolength, Previous: Units of length, Up: Lengths [Contents][Index]

### 14.2 `\setlength`

Synopsis:

    \setlength{len}{amount}

Set the length len to amount. The length name len must begin with a backslash, `\`. The `amount` can be a rubber length (see Lengths). It can be positive, negative or zero, and can be in any units that LaTeX understands (see Units of length).

Below, with LaTeX’s defaults the first paragraph will be indented while the second will not.

    I told the doctor I broke my leg in two places.

    \setlength{\parindent}{0em}
    He said stop going to those places.

If you did not declare len with `\newlength`, for example if you mistype the above as `\newlength{\specparindent}\setlength{\sepcparindent}{...}`, then you get an error like ‘`Undefined control sequence. <argument> \sepcindent`’. If you omit the backslash at the start of the length name then you get an error like ‘`Missing number, treated as zero. <to be read again> \relax l.19 \setlength{specparindent}{0.6\parindent}`’

Unofficial LaTeX2e reference manual