overleaf equation caption code example Example: equation with captionlatex \begin{figure} \[ E = m c^2 \] \caption{A famous equation} \end{figure}