I would like a vertical equivalent to \mbox{}
that somehow takes a sequence of boxes and stacks them on top of each other.
I'd like the resulting width to be the width of the widest box, and I'd like it to have the following options:
- either no vertical space between the boxes or standard inter-line spacing
- left, right, or center alignment
the baseline of the resulting box goes through one of the following:
- top: the baseline of the first box (like
\vtop
) - middle: in the middle of the box
- bottom: the baseline of the last box (like
\vbox
)
- top: the baseline of the first box (like
For example:
surrounding text
\fbox{\stack[align=rt]{something}{something else}{foo}}
surrounding text
would produce:
+----------------+
surrounding text | something | surrounding text
| something else |
| foo |
+----------------+
Does something like this already exist? If not, does anyone have any pointers about how to make it?
Edit: I'm using LaTeX