I have defined 2 Boxes:
\documentclass{article}
\usepackage[most]{tcolorbox}
\newtcolorbox{one}{}
\newtcolorbox{two}{}
\begin{document}
\begin{one}
The new command works fine
\end{one}
\begin{two}
The new command works fine
\end{two}
\end{document}
But with \foreach
result error:
\foreach \i in {one,two}{
\newtcolorbox{\i}{}
}
Approach:
\foreach \i in {one,two}{
\expandafter\newtcolorbox{\csname\i\endcsname}{ }}
Any hint would be appreciated.