I want to insert a figure as a item of tcbitemize enviroment in tcolorbox. The following code does work:
\newcommand{\ff}[2][]{%
\tcbitem[#1]\includegraphics[width=1.0\textwidth]{#2}
}
usage example: \ff[colback=red]{myfigure.jpg}
But, the figure document name has to be enclosed in a pair of braces. Is there a better way to use \ff like this:
\ff[colback=red] myfigure.jpg
MWE below:
\documentclass{article}
\usepackage[most]{tcolorbox}
\begin{document}
\begin{tcbitemize}
\tcbitem some text
\ff[colback=red] myfigure.jpg % directly document name without braces
\tcbitem some text
\tcbitem some text
\end{tcbitemize}
\end{document}
\tcbitemdoes internally\end{tcolorbox}\begin{tcolorbox}, it doesn't grab the following text as argument. And yes it is possible. But don't do it. – Ulrike Fischer Oct 27 '18 at 12:48