# Align number from enumerate with equation

I'm trying to have an equation as the first line of one of my items in an enumerate environment.

Example:

\begin{enumerate}
\item $x$
\end{enumerate}


I want the $x$ to have the same baseline as the 1., but it's appearing lower. How can I make the two line up properly?

-
then use it this way: $x$ –  Herbert Jan 20 '11 at 21:23
I want a displayed equation that needs to be centered; using text-mode math doesn't actually help me. –  Ben Alpert Jan 20 '11 at 21:24
I guess this is a duplicate: tex.stackexchange.com/questions/3109/… –  Hendrik Vogt Jan 20 '11 at 22:20

\documentclass[12pt]{article}

\begin{document}

\begin{enumerate}
\item \parbox{\linewidth}{\vspace{-\abovedisplayskip}%
$x$}
\item \hfill $x$ \hfill~
\end{enumerate}

\end{document}


doesn't really make sense, from my point of view.

-
This actually works perfectly if you take out the \vspace to leave just \parbox{\linewidth}{$...$}. (I'm not sure why). –  Ben Alpert Jan 20 '11 at 21:40
@Ben Alpert: If you think of a \parbox as a self-contained paragraph-making environment (in effect, a mini page, though not a minipage), you will see that the displayed equation need not start a new line at the top of one. –  Ryan Reich Jan 20 '11 at 22:19
This actually turned out not to work as well as I thought it did; see tex.stackexchange.com/questions/9394/…. –  Ben Alpert Jan 21 '11 at 3:44
I assume the hfill for the second \item was to show the horizontal placement of the x, in which case \item ~\hfill $x$ \hfill~ is slightly better. Not a big deal, but I was initially confused as to why the two x were not horizontally aligned. –  Peter Grill Feb 7 '13 at 23:05