15

I would like to create boxes where I can control the height of the boxes. Right now I have used the command.

\colorbox{calcclr}\makebox[\textwidth-2\fboxsep][l]{#1}}}

This gives me a box that stretches vertically how I want. Depending on the content of the box however the box vertical size is adjusted accordingly. Fractions for example will automatically make the box vertical height larger (as it needs to contain a fraction), while linear equations makes the height smaller

How can I solve this problem?

3
  • 1
    Welcome to TeX.sx! You code snippet is wrong, you miss a {. Usually it is good if you add a full compilable, but minimal working example (MWE) that illustrates your problem. Commented May 22, 2012 at 11:09
  • Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question.
    – Werner
    Commented May 23, 2012 at 23:14
  • Actually your miss two {... Besides from that you could obviously have formulated the code snippet better, the question itself was quite good. Commented May 3, 2013 at 12:03

1 Answer 1

17

You can use the {minipage}[<vertical alignment>][<height>]{<width>} environment to specify the width of the content. Here <vertical alignment> should be top, bottom or centered. Just give a constant <height> for all your framed equations.

If you instead want to set the height or depth you can use \raisebox{0pt}[<height>][<depth>]{...}

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .