Lengths, Spaces and Boxes
Author: Luc Maranget

## B.13 Lengths, Spaces and Boxes

- Length
- Space
- Boxes

### B.13.1 Length

All length commands are ignored, things go smoothly when LATEX syntax is used (using the `\newlength`, `\setlength`, etc. commands, which are null macros). Of course, if lengths are really important to the document, rendering will be poor.

Note that TEX length syntax is not at all recognised. As a consequence, writing things like `\textwidth=10cm` will clobber the output. Users can correct such misbehaviour by adopting LATEX syntax, here they should write `\setlength{\textwidth}{10cm}`.

### B.13.2 Space

The `\hspace`, `\vspace` and `\addvspace` spacing commands and their starred versions recognise positive explicit length arguments. Such arguments get converted to a number of non-breaking spaces or line breaks. Basically, the value of `1em` or `1ex` is one space or one line-break. For other length units, a simple conversion based upon a 12pt font is used.

HEVEA cannot interpret more complicated length arguments or perform negative spacing. In these situations, a warning is issued and no output is done.

Spacing commands without arguments are recognised. The `\enspace`, `\quad` and `\qquad` commands output one, two and four non-breaking spaces, while the `\smallskip`, `\medskip` and `\bigskip` output one, one, and two line breaks.

Stretchable lengths do not exist, thus the `\hfill` and `\vfill` macros are undefined.

### B.13.3 Boxes

Box contents is typeset in text mode (i.e. non-math, non-display mode). Both LATEX boxing commands `\mbox` and `\makebox` exist. The latter is associated with class `makebox`, which is empty by default and can be redefined by the user.

Similarly, the boxing-with-frame commands `\fbox` and `\framebox` are recognized. Here both, long and short forms refer to class `framebox`, which also can be redefined by the user.

Boxes can be saved for latter usage by storing them in bins. New bins are defined by `\newsavebox{`cmd`}`.

Then some text can be saved into cmd by `\sbox{`cmd`}{`text`}` or `\begin{lrbox}{`cmd`}` text `\end{lrbox}`. The text is translated to html, as if it was inside a `\mbox` and the resulting output is stored. It is retrieved (and outputted) by the command `\usebox{`cmd`}`. The `\savebox` command reduces to `\sbox`, ignoring its optional arguments.

No other box-related commands are implemented.