# Numbering equations with figures

I need to asign a number to equation which contains figure. My code is

\documentclass[12pt,a4paper]{article}
\usepackage[slovak]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{palatino,verbatim}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{float}

\begin{document}
\begin{itemize}
\item Self-energy:
\raisebox{-3mm}{\includegraphics[width=0.8cm]{SelfEnergyAll.pdf}} \qquad \begin{aligned} = -i\Sigma(p,\mathring{m},\mathring{g})(2\pi)^4 \delta(p_f - p_i) \end{aligned}

\end{itemize}
\end{document}


Is there any way how to do that? By the way, is there a better way how to write this type of equations (I need to use them very often). Thanks.

-
Why not just use and in place of $ and $? Then the equation will be numbered. –  Ian Thompson Apr 25 '14 at 13:25
Well, good point, thank you. I didn´t think that would work. Anyway, is it possible to place the figure in front of the equation in any smarter way? Because now, if the equation becomes longer, I need to raise the figure more. I would like to have the figure always at the same position in front of the first =. –  Suzie Apr 25 '14 at 13:35

You can just use an equation environment instead of $...$:

\documentclass[12pt,a4paper]{article}

\usepackage{amsmath}
\usepackage{graphicx}

\begin{document}

\begin{itemize}
\item Self-energy:
$$\vcenter{\hbox{\includegraphics[width=0.8cm]{example-image-a}}} = -i\Sigma(p,\mathring{m},\mathring{g})(2\pi)^4 \delta(p_f - p_i)$$
\end{itemize}

\end{document}


\vcenter will center the box vertically with respect to the x-axis of the equation.

-
Yes, that looks fantastic! Thank you. –  Suzie Apr 25 '14 at 13:39
With \usepackage[export]{adjustbox} you can do \includegraphics[width=0.8cm,valign=c]{file} –  egreg Apr 25 '14 at 13:41
@egreg That's a nice alternative –  Andrew Swann Apr 25 '14 at 17:48

Andrew's answer probably is what you are looking for. If you want to share numbering with figures I think you should use the figure environment:

\documentclass[12pt,a4paper]{article}
\usepackage[slovak]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{palatino,verbatim}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{float}

\usepackage{todonotes}

\begin{document}

\begin{figure}
\caption{}
\label{a fig}
\begin{itemize}
\item Self-energy:

%\raisebox{-3mm}[0cm][0cm]{\missingfigure[figwidth=0.8cm]{testing}}
\missingfigure[figwidth=0.8cm]{testing}
\qquad \begin{aligned} = -i\Sigma(p,\mathring{m},\mathring{g})(2\pi)^4 \delta(p_f - p_i) \end{aligned}

\end{itemize}
\end{figure}
\end{document}

-
Note that figures float... –  Andrew Swann Jun 5 '14 at 8:03