I want to write a set of equations in a caption of a figure. I implemented the answer of this question but it did not work out. The error I got is:
! Argument of \Hy@tempa has an extra }.
For example I want to write:
\begin{figure}
\includegraphics[scale=1]{test.pdf}
\caption{\leavevmode\\\begin{minipage}{\linewidth}
\begin{align}
a &= b \\ c &= d
\end{align}
\end{minipage}
}
\end{figure}
How can I do this? Thanks!
EDIT
I want to write a text, and then write the equations.
For example:
The equations are:
a = b
c = d
Best Answer
You need to either
\protect
theminipage
and thealign
or to use the optional argument for caption (which is a good idea if you are going to generate a list of figures to give an entry for the LoF without the equation); loading the caption package also gives you line breaks: