Using enumerate environment in a figure caption
1,788
Try as
\caption[]{
Here I want the enumerate
\begin{enumerate*}
\item Item X
\item Item Y and
\item Item Z
\end{enumerate*}
}
Related videos on Youtube
Author by
Daniel Valencia C.
Updated on July 12, 2020Comments
-
Daniel Valencia C. over 3 years
I'm trying to create an inline list into a figure caption like this:
\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}
I use this answer, but I got the following error:
Argument of \caption@ydblarg has an extra }. }
How can I solve it?
-
Bernard over 6 yearsNo problem if you add an optional argument of
\caption
without the list. -
gusbrs over 6 yearsThis is precisely the same issue as the one in the question you linked to. And, as Bernard's comment says, has also the same solution. Did you get the point of Leo Liu's answer?
-
cfr over 6 yearsYou really don't need
\subfloat
orsubfig
here. If you're using a single caption, you don't need sub-figures. -
cfr over 6 yearsMake sure that you delete generated files before recompiling after adding the optional argument e.g.
.lof
,.aux
etc.
-
-
TeXnician over 6 yearsPlease elaborate on what you've done here and why it works. That should not take too long, but improves the answer a lot.
-
Dr Krishnakumar Gopalakrishnan over 5 yearsThe side effects of this must be mentioned by the community member who answered this. This removes the corresponding figure's entry from the list of figures for the document.
-
MadyYuvi over 5 years@Krishna Yes, it affects the "LOF", thanks for pointing out...