Given the following minimal working example:
\documentclass{article}
\usepackage[many]{tcolorbox}
\begin{document}
\begin{tcolorbox} foobar \end{tcolorbox}
\end{document}
How would one change the bordersizes indicated in red?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityGiven the following minimal working example:
\documentclass{article}
\usepackage[many]{tcolorbox}
\begin{document}
\begin{tcolorbox} foobar \end{tcolorbox}
\end{document}
How would one change the bordersizes indicated in red?
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}
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.