[Tex/LaTex] Equations inside enumerate aligned on item’s number

#enumeratealignamsmathmath-modevertical alignment

If I type

\begin{enumerate}    
    \item   
    \begin{align*}  
      eqn 1  
      eqn 2  
    \end{align*}  
\end{enumerate}

the label will appear on the first lines and the equations will appear on subsequent lines. How do I make it so that the equations begin on the same line as the enumerate label? Obviosly, I could manually adjust the location using \vspace and \rule, but is there a better way?

Best Answer

\listfiles
\documentclass{article}
\usepackage{amsmath}
\newcommand\Item[1][]{%
  \ifx\relax#1\relax  \item \else \item[#1] \fi
  \abovedisplayskip=0pt\abovedisplayshortskip=0pt~\vspace*{-\baselineskip}}
\begin{document}

\begin{enumerate}    
\item foo
\Item  
    \begin{align*}  
      eqn 1  \\
      eqn 2  
    \end{align*}  
\Item[a)]  
    \begin{align*}  
      eqn 1  \\
      eqn 2  
    \end{align*}  
\item bar
\end{enumerate}

\end{document}

enter image description here