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 currently use the \boxed{} command to place boxes around my equations. However, I would like to have more control of the style of the box. Is there a way to do this?

To take a specific example, the figure below shows both the standard \boxed{} out put (a) and the desired mock-up (b), where I have increased the box size and increased the border thickness slightly.

enter image description here

share|improve this question
    
Are you asking for automated features/parameters to increase border width, or are you asking for different line styles/thicknesses etc. around the box? –  Steven B. Segletes Mar 6 '13 at 14:37
    
My main aim is to increase the box size. Anything else (line thickness, line style, line colour, etc.) would be a bonus. –  User 17670 Mar 6 '13 at 14:44
    
You say increase box size. That might imply scaling the whole object to a larger size (see scalerel package) or your answer might imply keeping the equation the same size and adding border space. –  Steven B. Segletes Mar 6 '13 at 14:52
1  
@Steven: In my opinion, it's quite clear from the image that the OP wants to keep the equation the same size. –  Hendrik Vogt Mar 6 '13 at 14:56
1  
No one suggested the usual TikZ overkilling solution, so it's my turn; you may have a look to \boxed{}, TikZ and colored equation background and to hf-tikz doesn't box around equation (which shows some new option of the hf-tikz package). –  Claudio Fiandrino Mar 6 '13 at 19:49

1 Answer 1

up vote 9 down vote accepted

Someone is going to suggest a tikz box with multicoloured translucent rounded corners, but before they do I'll observe that \boxed is a thin wrapper around \fbox so you can use

\setlength\fboxsep{...}

to set the padding inside the box and

\setlength\fboxrule{...}

to set the line thickness.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.