code options key
DESCRIPTION
latexTRANSCRIPT
9.2 Code Option Keys
The following code options are applicable for all skins. The used 〈graphical code〉 can be anypgf code. For all skins with exception of standardÕP. 193 and standard jigsawÕP. 194, the〈graphical code〉 can also be any TikZ code.
/tcb/frame code=〈graphical code〉 (code, default from standard)The given 〈graphical code〉 is used for drawing the frame of the box.
\tcbset{colback=red!5!white,colframe=red!75!black}
\begin{tcolorbox}[enhanced,frame code={\foreach \n in {north east,north west,south east,south west}{\path [fill=red!75!black] (interior.\n) circle (3mm); }; }]
This is a \textbf{tcolorbox}.\tcblowerThis is the lower part.\end{tcolorbox}
This is a tcolorbox.
This is the lower part.
/tcb/frame empty (style, no value)This is a shortcut for setting /tcb/frame code to empty. This option removes the drawingof the frame. Alternatively, use /tcb/frame hiddenÕP. 140.
/tcb/interior titled code=〈graphical code〉 (code, default from standard)The given 〈graphical code〉 is used for drawing the interior of the box, if the box comes witha title.
\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
\begin{tcolorbox}[enhanced,title=My title,interior titled code={\path[draw=red!5!white,line width=5mm,line cap=round]
([xshift=3mm,yshift=-3mm]interior.north west)--([xshift=-3mm,yshift=3mm]interior.south east)([xshift=3mm,yshift=3mm]interior.south west)--([xshift=-3mm,yshift=-3mm]interior.north east);}]
This is a \textbf{tcolorbox}.\tcblowerThis is the lower part.\end{tcolorbox}
My title
This is a tcolorbox.
This is the lower part.
/tcb/interior titled empty (style, no value)This is a shortcut for setting /tcb/interior titled code to empty. This option removesthe drawing of the untitled interior. Alternatively, use /tcb/interior hiddenÕP. 141.
129
/tcb/interior code=〈graphical code〉 (code, default from standard)The given 〈graphical code〉 is used for drawing the interior of the box, if the box is withouta title.
\tcbset{colback=red!5!white,colframe=red!75!black}
\begin{tcolorbox}[enhanced,interior code={\path[draw=red!5!white,line width=5mm,line cap=round]
([xshift=3mm,yshift=-3mm]interior.north west)--([xshift=-3mm,yshift=3mm]interior.south east)([xshift=3mm,yshift=3mm]interior.south west)--([xshift=-3mm,yshift=-3mm]interior.north east);}]
This is a \textbf{tcolorbox}.\tcblowerThis is the lower part.\end{tcolorbox}
This is a tcolorbox.
This is the lower part.
/tcb/interior empty (style, no value)This is a shortcut for setting /tcb/interior code to empty. This option removes thedrawing of the interior. Alternatively, use /tcb/interior hiddenÕP. 141.
/tcb/segmentation code=〈graphical code〉 (code, default from standard)The given 〈graphical code〉 is used for drawing the segmentation area of the box.
\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
\begin{tcolorbox}[enhanced,title=My title,segmentation code={\path[top color=red!5!white,bottom color=red!5!white,middle color=blue](segmentation.south west) rectangle (segmentation.north east);}]
This is a \textbf{tcolorbox}.\tcblowerThis is the lower part.\end{tcolorbox}
My title
This is a tcolorbox.
This is the lower part.
/tcb/segmentation empty (style, no value)This is a shortcut for setting /tcb/segmentation code to empty. This option removes thedrawing of the segmentation line. Alternatively, use /tcb/segmentation hiddenÕP. 142.
130