3

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}

misaligned equation in 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?

3

1 Answer 1

5
\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.

4
  • This actually works perfectly if you take out the \vspace to leave just \parbox{\linewidth}{\[ ... \]}. (I'm not sure why). Jan 20, 2011 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, 2011 at 22:19
  • This actually turned out not to work as well as I thought it did; see tex.stackexchange.com/questions/9394/…. Jan 21, 2011 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. Feb 7, 2013 at 23:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .