考虑一下这个MWE:
\documentclass[varwidth=4in, multi={my}, crop, ignorerest=true]{standalone}
\usepackage{polyglossia, forloop}
\usepackage[most]{tcolorbox}
\newcounter{loopcntr}
\newcommand{\rpt}[2][1]{%
\forloop{loopcntr}{1}{\value{loopcntr}<#1}{#2}}
\begin{document}
\begin{tcolorbox}[enhanced jigsaw, skin=enhancedmiddle, breakable, reset box array, store to box array]
First part\tcbbreak
Second part\tcbbreak
Third part
\end{tcolorbox}
\boxarraygetsize{\boxsize}
\expandafter\rpt\expandafter[\the\numexpr \boxsize +1 \relax]{
\begin{my}%
\useboxarray{\theloopcntr}%
\end{my}%
}
\end{document}
它应该生产三个盒子。但是它只生产了一个盒子。
我如何让独立类生产三个盒子?