You have an older version of the
tcolorbox
package on your computer. Perhaps your whole TeX installation is not up to date. Update at least tcolorbox
. Do you have MiKTeX or TeX Live? I would update that too.Stefan
tcolorbox
package on your computer. Perhaps your whole TeX installation is not up to date. Update at least tcolorbox
. Do you have MiKTeX or TeX Live? I would update that too.tcolorbox
from CTAN and put it into the TeX tree or just in your document folder.size=small
here in your \newtcolorbox
definition. Is this ok you do you need to adjust it in more detail?boxed title style={size=small, frame code={...
\parbox
commands or minipage
environments, possibly together with \fbox
or other line commands.tabular
or tabularx
. Or take TikZ, such as with a TikZ matrix of nodes and drawing lines there, or with nodes and the fitting
library.Code: Select all
\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{varwidth}
\usepackage{lipsum}
\newtcolorbox
{mybox}[2][]{enhanced,
before skip=2mm,after skip=2mm,
colback=black!5,colframe=black!50,boxrule=0.2mm,
attach boxed title to top left={xshift=1cm,yshift*=1mm-
\tcboxedtitleheight
},
varwidth boxed title*=-3cm,
boxed title style={frame code={
\path[fill=tcbcol@back!30!black]
([yshift=-1mm,xshift=-1mm]frame.north west)
arc[start angle=0,end angle=180,radius=1mm]
([yshift=-1mm,xshift=1mm]frame.north east)
arc[start angle=180,end angle=0,radius=1mm];
\path[left color=tcbcol@back!60!black,right color=tcbcol@back!60!black,
middle color=tcbcol@back!80!black]
([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
[rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
-- (frame.south east) -- (frame.south west)
-- ([xshift=-1mm,yshift=-1mm]frame.north west)
[sharp corners]-- cycle;
},interior engine=empty,
},
fonttitle=\bfseries,
title={#2},#1}
\begin{document}
\begin{mybox}[colbacktitle=green]{My title}
% t b c - parbox [] param
\parbox[]{7cm}{
\fbox{
\parbox[]{6.5cm}{Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 }
}
\fbox{
\parbox[]{6.5cm}{Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 }
}
}
\parbox[]{4cm}{
\fbox{
\parbox[]{3.5cm}{Some text 3 Some text 3 Some text 3 Some text 3 }
}
\fbox{
\parbox[]{3.5cm}{Some text 4 Some text 4 Some text 4 Some text 4 Some text 4 Some text 4 Some text 4 Some text 4}
}
}
\end{mybox}
\begin{mybox}[colbacktitle=red]{My title}
\fbox{
% t b c - parbox [] param
\parbox[]{4cm}{Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1}
}
\fbox{
\parbox[]{6cm}{Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2}
}
\fbox{
\parbox[]{7cm}{Some text 3 }
}
\fbox{
\parbox[]{3cm}{Some text 4 }
}
\end{mybox}
\end{document}