我使用tcbitemize
创建了三列框。但对于其中一列,我想删除框架并将内部框的大小调整为外部框架。
这是我目前拥有的代码:
\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}
答案1
类似这样的事?
这是代码:
\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}
我尝试尽可能保持原始代码不变,但不需要括起来的\mbox
和minipage
。
请注意,最终的输出需要多次编译。