I'm wondering how to add paddings in a frame (as you can see, left and right paddings are the same, but not the same as top and bottom paddings). I know it can be done using mdframed, but sometimes, I get parts of it not showing (eg top or left line not showing). I was told it can be done using \fbox and minipage, but I'm not sure if its possible to add paddings like this.
Thanks for your help. frame

  • Welcome to TeX.SX! I am sure, this can be done better without \fbox, but I am no mdframed expert. With tcolorbox this is very easy however. Please show us what you have done so far... – user31729 Jun 21 '15 at 18:48
  • I didnt do much, i was just trying \fbox together with minipage, but couldnt make it, so i used framed (but also couldnt set those paddings), and finally mdframed (but I dont like it because of that mistake) – Ivan Jun 22 '15 at 13:52

Here is a tcolorbox approach -- one exaggerated example and (another) exaggerated example, to show the effects of the top etc. options.





\begin{tcolorbox}[boxsep=0pt,top=20pt,left=50pt,right=40pt, bottom=30pt,arc=0pt,auto outer arc,colback=white,colframe=black]

A tight box
\begin{tcolorbox}[boxsep=0pt,top=0pt,left=0pt,right=0pt, bottom=0pt,arc=0pt,auto outer arc,colback=white,colframe=black]


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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