Set height of a minipage

The width of a minipage is a mandatory parameter. But hidden in the optional parameters is a way to set a specific height for a minipage.

The first parameter is the position of the minipage relative to the baseline. Possible values are ‘t’ (top of the minipage is level with the line), ‘c’ (center of the minipage is level with the line) or ‘b’ (bottom of the minipage is level with the line).

The second parameter is the height. The minipage will have exactly this height. If the text inside the minipage is longer, it will spill out of the box, the height is not adjusted. If the text is shorter, the remainder of the box will be empty.

The last parameter is the vertical position of the text inside the minibox. Possible values are ‘t’ (top-aligned), ‘c’ (centered), and ‘b’ (bottom-aligned).

\begin{minipage}[t][5cm][t]{0.5\textwidth}
test
\end{minipage}
This entry was posted in LaTeX and tagged , , by swk. Bookmark the permalink.

About swk

I am a computational linguist, teacher of computer science and above all a huge fan of LaTeX. I use LaTeX for everything, including things you never wanted to do with LaTeX. My latest love is lilypond, aka LaTeX for music. I'll post at irregular intervals about cool stuff, stupid hacks and annoying settings I want to remember for the future.