2

Given the following minimal working example:

\documentclass{article}
\usepackage[many]{tcolorbox}
\begin{document}
\begin{tcolorbox} foobar \end{tcolorbox}
\end{document}

enter image description here

How would one change the bordersizes indicated in red?

2
  • 2
    What about taking a look a tcolorbox documentation? Section 4.7.4 Spacing explains what you need. You can also find it in your system through command "texdoc tcolorbox".
    – Ignasi
    Commented Dec 2, 2015 at 8:53
  • Thanks, I did skim through the manual but didn't find that section and didn't find easy Google-able results. I eventually did find it in one of the example (after I already asked here). At least now this question is Google-able. Commented Dec 2, 2015 at 15:02

1 Answer 1

5

You can adjust the spaces with the keys left, right, top and bottom.

Meaning you can do either \tcbset{top=1mm,left=1mm} or give the keys directly to the environment:

\documentclass{article}
\usepackage[many]{tcolorbox}
\begin{document}
\begin{tcolorbox}[left=1mm,top=1mm] foobar \end{tcolorbox}
\end{document}

Ouput

There is also the key boxsep which adds space to the left, right, top, bottom and middle where appropriate. The initial value for this key is 1mm, meaning that if you want the top margin to be exactly 1mm, the sum of top and boxsep should be 1mm and so on. Thus, in the above example, both the top and left margins are 2mm in total.

You must log in to answer this question.

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