我将主题中的 tcbposter 的代码更改为 tcbset:带线的样式框
但是这个转换后的代码失败了:“TeX 容量超出,抱歉 [输入堆栈大小=5000]
\documentclass[a4paper,8pt]{article}
\usepackage[left=1.0cm,right=0.3cm,top=0.5cm,bottom=0.5cm]{geometry}
\usepackage[most]{tcolorbox}
\usepackage{pgf,tikz}
\tcbset{
mystylebox/.style 2 args={%
enhanced,
top=0mm,left=2pt,right=2pt,
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
%title={#1},
overlay unbroken and first={%
\draw[fill=yellow]
([xshift=16pt,yshift=12pt]frame.north west) -| ++ (2,-2)
-- ++ (-1,0.3) -- ++ (-1,-0.3) -- cycle;
\node[anchor=north west,text width=2cm-4pt,align=center] at ([xshift=6pt,yshift=12pt]frame.north west)
{#2};
},
breakable,arc=4mm,
colframe=blue!80!red,colback=white,
width=\textwidth,
before upper ={\parshape 5
1.2cm \dimexpr \hsize-1.2cm\relax
1.2cm \dimexpr \hsize-1.2cm\relax
1.2cm \dimexpr \hsize-1.2cm\relax
1.2cm \dimexpr \hsize-1.2cm\relax
0pt \hsize}
title={#1},
}
}
\begin{document}
\begin{tcbposter}[poster = {columns=4, rows=7, width=0.5\textwidth, height=0.5\textheight,spacing=0.1mm}]
\posterbox[width=4.0cm,height=4.0cm,mystylebox={colframe=blue}{NAME}]{column=1, row=5, rowspan=0.7}{some text some text some text some text some text some text some text some text
some text some text some text some text some text some text some text some text
some text some text some text some text some text}
\end{tcbposter}
\end{document}
请帮忙
谢谢
答案1
您的语法\node
不正确:
\documentclass[a4paper,8pt]{article}
\usepackage[left=1.0cm,right=0.3cm,top=0.5cm,bottom=0.5cm]{geometry}
\usepackage[most]{tcolorbox}
\usepackage{pgf,tikz}
\tcbset{
mystylebox/.style 2 args={%
enhanced,
top=0mm,left=2pt,right=2pt,
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
title={#1},
overlay unbroken and first={%
\draw[fill=yellow]
([xshift=6pt,yshift=12pt]frame.north west) -| ++ (1,-2)
-- ++ (-0.5,0.3) -- ++ (-0.5,-0.3) -- cycle;
\node[anchor=north west,text width=1cm-4pt,align=center] at ([xshift=6pt,yshift=12pt]frame.north west)
{#2};
}
}
}
\begin{document}
\begin{tcbposter}[poster = {columns=4, rows=7, width=0.5\textwidth,
height=0.5\textheight,spacing=0.1mm}]
\posterbox[width=4.0cm,height=4.0cm,mystylebox={colframe=blue}{NAME}]{column=1, row=5,
rowspan=0.7}{xxx yyy}
\end{tcbposter}
\end{document}