defining equation variables as a caption [duplicate]

I want to define a couple of variables in a list alongside a equation. Here's my current code

\begin{figure}
$e = m c^2$
\begin{description}
\item[e] energy
\item[m] mass
\item[c] light speed
\end{description}
\end{figure}


This mostly works, but the text doesn't align with the figure, and the font is too big compared to the equation.

Adapting the code from this question mostly works, but I can't use \description and text is interpreted as a formula.

Is there a better way to do this?

marked as duplicate by Andrew Swann, Xavier, Guido, clemens, ThorstenJun 29 '13 at 12:30

I would use a simple table (environment tabular), then it is easier to control the alignment. Also the line spacing is more compact and can be controlled by redefining \arraystretch.

\documentclass{article}
\usepackage{array}

\begin{document}
\begin{figure}
\centering
$e = m c^2$
\begin{tabular}{@{}>{$}l<{$}l@{}}
e & energy\\
m & mass \\
c & light speed\\
\end{tabular}
\end{figure}
\end{document}


Remarks:

• @{} suppresses the \tabcol spacing, here at the left and right side of the table.
• >{$} and <{$} is a feature of package array that allows to add $s for the first column automatically. • The font size is the same as in the formula. If you want to have a smaller font, then you can add \small, for instance. \documentclass[preview,border=12pt,varwidth]{standalone}% change it to your own document class \usepackage{array,tabularx} \newenvironment{conditions*} {\par\vspace{\abovedisplayskip}\noindent \tabularx{\columnwidth}{>{$}l<{\$} @{\ : } >{\raggedright\arraybackslash}X}}
{\endtabularx\par\vspace{\belowdisplayskip}}

\begin{document}
Most people know the formula
$E \ne mc^2$
where
\begin{conditions*}
E  &  energy produced by drinking 5 gallons of bear and eating 10 kilograms of sausage (just to show multiline description)\\
m  &  mass of the food \\
c  &  speed of light
\end{conditions*}

\end{document}