The following is my MWE, inspired from the answer to this question (where my query seemed to merit a separate question, so here it is!):
\documentclass{article}
\usepackage{caption}
\usepackage{amsmath}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows,shapes,calc,intersections,through,backgrounds}
\begin{document}
\begin{figure}[b]
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm]
% More stuff here - not relevant I think...
\end{tikzpicture}
\caption{\label{q}\leavevmode\\\begin{minipage}{\linewidth}
\begin{align*}
a &= b \\ c &= d
\end{align*}
\end{minipage}
}
\end{figure}
\end{document}
With the above, I'm getting the following error:
! Argument of \@caption has an extra }.
<inserted text>
\par
l.19 }
I'm not sure how to debug this!
\leavevmode, and the second\begin{align*}probably should be an\end{align*}and you needamsmathand don’t forget to include a short version of that (or do you want the equations in the List of Figures?):\caption[A formula]{…}. – Qrrbrbirlbel Aug 24 '13 at 00:57