Usando ambiente enumerado em uma legenda de figura

Usando ambiente enumerado em uma legenda de figura

Estou tentando criar uma lista embutida em uma legenda de figura como esta:

\documentclass{article}
\usepackage[inline]{enumitem}
\usepackage{caption}
\usepackage{subfig}
\begin{document}

\begin{enumerate*}
\item Item X
\item Item Y and
\item Item Z
\end{enumerate*}

\begin{figure}
\captionsetup{singlelinecheck=off}
\centering
\subfloat{}
\subfloat{}
\subfloat{}
\caption{
Here I want the enumerate
\begin{enumerate*}
\item Item X
\item Item Y and
\item Item Z
\end{enumerate*}
}
\end{figure}

\end{document}

eu usoesta resposta, mas recebi o seguinte erro:

Argument of \caption@ydblarg has an extra }. }

Como posso resolver isso?

Responder1

Tente como

\caption[]{
Here I want the enumerate
\begin{enumerate*}
\item Item X
\item Item Y and
\item Item Z
\end{enumerate*}
}

informação relacionada