LaTex - how to create boxes with fixed heights and widths, with enclosed text that is vertically and horizontally aligned?

ARV picture ARV · Jan 9, 2010 · Viewed 34.9k times · Source

This is for creating flashcards in LaTeX. My printer doesn't support duplex printing - which packages like flashcards and flacards seem to require - so I am trying to create a two-column arrangement as follows on each page:

[Col1: Front side of the card] [Col2: Back side of the card]

Each row would correspond to a single flashcard. The plan is to cut each row up, fold them along the middle and staple them to create a "card".

The question: how best can I create a single box with a specified height and width, and with the text in it aligned vertically?

I am relatively new to Latex, so this cripples my options. I don't need full, detailed answers necessarily - any pointers at all in the right direction would help immensely! Any suggestions on alternative methods to achieve what I'm shooting for would also be helpful.

Many thanks!

Answer

Alexey Malistov picture Alexey Malistov · Jan 9, 2010

Suppose you want to create the box of 40pt height and 3cm width:

\vbox to 40pt {\vfil
\hbox to 3cm{Some info}%
\vfil
}