3

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}
1
  • most option includes raster by the way
    – user31729
    Commented Apr 20, 2016 at 11:43

1 Answer 1

6

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

1
  • I don't know why there's a minipage -- I decided to keep it
    – user31729
    Commented Apr 20, 2016 at 11:44

You must log in to answer this question.

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