# How to call the content of \tcbitem of tcbitemize environment in tcolorbox

How to call the content of \tcbitem of tcbitemize environment in tcolorbox in its option part. Example code like this:

\documentclass{article}
\usepackage[most]{tcolorbox}

\begin{document}
\tcbset{figure/.style={...} % or figure/.code
\begin{tcbitemize}
\tcbitem[figure] myfigure.jpg % This will typeout a figure as the content of this \tcbitem
\end{tcbitemize}

\end{document}


If you want to type less, just create a macro (here I've called it \myinc):

\documentclass{article}
\usepackage[most]{tcolorbox}

\newcommand{\myinc}[1]{\includegraphics[width=\textwidth]{#1}}

\begin{document}
\begin{tcbitemize}
\tcbitem \myinc{example-image-a.jpg}
\tcbitem \myinc{example-image-b.jpg}
\end{tcbitemize}
\end{document}


• Thank you @CarLa. I konw the way to add a figure as shown in your answer. Yet this is not convinient(many letters input for just insert a figure). I'm looking for a way by which a predesined style is used to complete the job as shown in my example code. – lyl Nov 1 '18 at 0:33
• @lyl See my renewed answer – CarLaTeX Nov 1 '18 at 6:13