2

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}
  • most option includes raster by the way – user31729 Apr 20 '16 at 11:43
5

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.