Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Martin Scharrer May 22 '12 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 May 23 '12 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. –  StrawberryFieldsForever May 3 '13 at 12:03
add comment

migrated from stackoverflow.com May 22 '12 at 11:04

This question came from our site for professional and enthusiast programmers.

1 Answer

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{0p}[<height>][<depth>]{...}

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.