I'm using tcolorbox
to document some commands, and I would like to have a slight background color on the body text of the command explanations. I have the below MWE to show this by wrapping the body in its own tcolorbox with a colback
value.
However, I would like to remove the white space between the head and the body, such that they are directly connected. I have tried adjusting the boxes via nobeforeafter
and before/after skip
s without luck.
I suspect that the body (and thus the tcolorbox that I create with the before/after doc body
keys in the preamble) is wrapped in something, but I don't know how to access and change it.
\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{documentation}
\tcbset{
doc head={
interior style={fill,color=blue!10},
boxsep=2pt,
after skip=0pt,
nobeforeafter,
%show bounding box,
},
before doc body={
\begin{tcolorbox}[
colback=blue!5,
colframe=blue!5,
arc=0pt,
outer arc=0pt,
before skip=0pt,
nobeforeafter,
]
},
after doc body={\end{tcolorbox}},
}
\begin{document}
\begin{docCommand}
{myCommand}
{\marg{argument}}
Some description of the command. Blah blah blah.
\end{docCommand}
\end{document}