[Tex/LaTex] tcolorbox: three tcbitemize boxes

tcolorbox

With the following example code, using tcolorbox, I expected three boxes next to each other. But in fact, the third box appears under the first. How can this happen and how can it be solved?

\documentclass{article}
\usepackage[raster,most]{tcolorbox}
\begin{document}
\begin{minipage}{\linewidth}%
    \begin{tcbitemize}[size=fbox,sharp corners,
        colframe=black,colback=white,boxrule=1.0pt,
        raster equal height,raster force size=false,
        raster equal skip=0pt,raster column skip=2mm]
        \tcbitem[width=0.3\linewidth]
            A
        \tcbitem[width=0.3\linewidth]
            B
        \tcbitem[width=0.3\linewidth]
            C
    \end{tcbitemize}%
\end{minipage}
\end{document}

Best Answer

tcbitemize is a tcbraster environment and uses the default number of columns, which is 2, unless specified otherwise.

Say raster columns=3 and there will be three columns.

\documentclass{article}
\usepackage[most]{tcolorbox}
\begin{document}
\begin{minipage}{\linewidth}%
    \begin{tcbitemize}[size=fbox,sharp corners,
        colframe=black,colback=white,boxrule=1.0pt,
        raster equal height,raster force size=false,
        raster equal skip=0pt,raster column skip=2mm,raster columns=3]
        \tcbitem[width=0.3\linewidth]
            A
        \tcbitem[width=0.3\linewidth]
            B
        \tcbitem[width=0.3\linewidth]
            C
    \end{tcbitemize}%
\end{minipage}
\end{document}

enter image description here

Related Question