8.18.1 minipage arguments

Let’s repeat the full synopsis of the minipage environment, with all its possible optional arguments:

\begin{minipage}[position][height][inner-pos]{width}
  contents
\end{minipage}

The one required argument width to the minipage environment is a rigid length (see Lengths). It gives the width of the box into which contents are typeset.

There are three optional arguments, position, height, and inner-pos. You need not include all three. For example, you can use the default position and set the height to one inch, while using the current column width, with:
\begin{minipage}[c][1in]{\columnwidth} contents \end{minipage}

position argument to minipage (optional)

The optional argument position governs how the minipage vertically aligns with the surrounding material, when the minipage is used within a paragraph. If any optional arguments are present, this one must be specified, and it must not be empty.

c

(synonym m) Default. Positions the minipage so its vertical center lines up with the center of an adjacent text line.

t

Align the baseline of the top line in the minipage with the baseline of the surrounding text (plain TeX’s \vtop).

b

Align the baseline of the bottom line in the minipage with the baseline of the surrounding text (plain TeX’s \vbox).

To see the effects of these, contrast the output of running this

---\begin{minipage}[c]{0.25in}
  first\\ second\\ third
\end{minipage}

with the results of changing c to b and t.

Although LaTeX does not complain about other values of position, the behavior of any but the above is undefined.

If the minipage is a paragraph of its own in the source, the position value usually makes a visible difference only at the top of a page; there, for the minipage’s first baseline to be at the usual place for the first baseline on a page, position needs to be set to t.

height argument to minipage (optional)

The optional argument height is a rigid length (see Lengths). It sets the desired height of the minipage. You can enter any value larger than, or equal to, or smaller than the minipage’s natural height and LaTeX will not give an error or warning.

You can use the same special lengths \width, \depth, \height, \totalheight as with \makebox to reference the original size of the box (see box dimension commands).

You can also set it to a height of zero or a negative value. LaTeX will typeset the contents as usual and then assign the specified height to the result, so that following typeset material will typically overwrite the box contents.

inner-pos argument to minipage (optional)

The final optional argument inner-pos controls the placement of contents inside the box. These are the possible values are (the default is the value of position).

t

Place contents at the top of the box.

c

Place it in the vertical center.

b

Place it at the box bottom.

s

Stretch contents out vertically; it must contain vertically stretchable space.

The inner-pos argument makes sense when the height option is set to a value larger than the minipage’s natural height.

To see the effect of the options, run this example with the various choices in place of b.

Text before
\begin{center}
  ---\begin{minipage}[c][3in][b]{0.25\textwidth}
       first\\ second\\ third
  \end{minipage}
\end{center}
Text after

Unofficial LaTeX2e reference manual