5

Using tcbitemize I created three columns of boxes. But for one of them I want to remove the frame and resize the inner boxes to the outer frame.

This is the code I have so far:

\documentclass{article}
\usepackage[raster,most]{tcolorbox}
\begin{document}
    \begin{tcbitemize}[size=fbox,sharp corners,
        colframe=black,colback=white,boxrule=1.0pt,
        raster equal height,raster force size=false,
        raster equal skip=0.2pt,raster column skip=1mm,
        raster columns=3]
        \tcbitem[width=0.30\linewidth]
        \vspace{2cm}
        ABC
        \vspace{2cm}
        \tcbitem[width=0.40\linewidth]
        \vspace{2cm}
        DEF
        \vspace{2cm}
        \tcbitem[width=0.30\linewidth]
        \begin{tcbitemize}[size=fbox,sharp corners,
            colframe=black,colback=white,boxrule=1.0pt,
            raster equal height,raster force size=false,
            raster equal skip=1pt,raster column skip=-1mm,
            raster columns=2]
            \tcbitem[width=0.5\linewidth+0.5mm]
            \centering
            GHI
            \vspace{0.9cm}
            \tcbitem[width=0.5\linewidth+0.5mm]
            \centering
            JKL
            \vspace{.1cm}
            \tcbitem[width=1.0\linewidth]
            \centering
            \vspace{0.1cm}
            MNO
            \tcbitem[width=0.0\linewidth]
            \tcbitem[width=1.0\linewidth]
            \centering
            PQR
            \vspace{0.1cm}\\
        \end{tcbitemize}
    \end{tcbitemize}
\end{document}

Figure underneath shows what I would like to have.enter image description here

7

Something like that?

enter image description here

This is the code:

\documentclass{article}
\usepackage[raster,most]{tcolorbox}
\begin{document}
\centering\mbox{
\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=0.2pt,raster column skip=1mm,
        raster columns=3]
            \tcbitem[width=0.30\linewidth]
                \vspace{2cm}
                ABC
                \vspace{2cm}
            \tcbitem[width=0.40\linewidth]
                \vspace{2cm}
                DEF
                \vspace{2cm}
            \tcbitem[width=0.30\linewidth,blanker,space to=\myspace]
                \begin{tcbitemize}[
                    raster height=\myspace,
                    size=fbox,sharp corners,
                    colframe=black,colback=white,boxrule=1.0pt,
                    raster force size=true,
                    raster equal skip=1pt,raster column skip=-1pt,
                    raster columns=2,raster rows=3]
                    \tcbitem
                      \centering
                      GHI
                      \vspace{0.9cm}
                    \tcbitem
                      \centering
                      JKL
                      \vspace{.1cm}
                    \tcbitem[raster multicolumn=2]
                      \centering
                      \vspace{0.1cm}
                      MNO
                    \tcbitem[raster multicolumn=2]
                      \centering
                      PQR
                      \vspace{0.1cm}
                \end{tcbitemize}
    \end{tcbitemize}
\end{minipage}}
\end{document}

I tried to keep the original code as unchanged as possible, but one would not need the enclosing \mbox and minipage.

Note that several compilations are needed for the final output.

2
  • \myspace is not recognized. Don't you need to define it first? Oh, and I removed the \mbox and minipage, thanks – Joost Döbken Apr 22 '16 at 11:24
  • 1
    @API \myspace is defined by space to=\myspace. This is a quite new option. Therefore, you should check, if you are using the current version 3.90 (2016/02/29) of tcolorbox (ctan.org/tex-archive/macros/latex/contrib/tcolorbox). – Thomas F. Sturm Apr 22 '16 at 13:51

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.