\setlength
¶Synopsis:
\setlength{\len}{amount}
Set the length \len to amount. The length name
\len
has to be a control sequence (see Control sequence, control word and control symbol), and as such must begin with a backslash, \
under
normal circumstances. 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 it as in
\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.’.