Whole document tree
    

Whole document tree

Help On LaTeX \makebox

Hypertext Help with LaTeX
\makebox

Normal use

\makebox[width][position]{text}

The \makebox command creates a box to contain the specified text. The width of the box may be specified by the optional width argument. The text in the box is set in LR mode.

If the optional width argument is used, the optional position argument may also be used to specify the position of text within the box as follows:

  • l - flushleft
  • r - flushright
  • s - interword space adjusted so text fills box exactly
The default horizontal and vertical positioning (if the second optional argument is omitted) is to center text in the box.

Note that text may overflow the box, in which case it is typeset on top of the adjacent text. While this is generally undesirable, it can also be used to create special effects.

The \makebox command is fragile.

See \mbox, \framebox
See also: Spaces and Boxes.

In picture environment

\makebox(width,height)[position]{ ... }

The \makebox command for the picture environment is similar to the normal \makebox command except that you must specify a width and height (note that these are in parentheses) in multiples of \unitlength.

The optional argument, position, specifies the quadrant that your text appears in. You may select up to two of the following:

  • t Moves the item to the top of the rectangle
  • b Moves the item to the bottom
  • l Moves the item to the left
  • r Moves the item to the right
The default horizontal and vertical positioning is to center text in the box.
See also Spaces and Boxes, Picture Environment
Return to LaTeX Table of Contents
Revised: Sheldon Green, 5 Dec 1995.