20

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?

  • Are you sure you want to center the equations? – egreg Jun 1 '12 at 19:36
  • Yes, to do the same task without centering, I use \item $\begin{aligned}[t] equations \end{aligned}$ – richtera Jun 1 '12 at 22:17
  • OK, but I'm still dubious about the result. – egreg Jun 1 '12 at 22:19
27
\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

11

It is my personal taste, you might not agree with me. Here is my rule of thumb.

  1. We know that the first line of all items of "list" (enumerate, itemize, etc) are left aligned.
  2. So if the item starts with a multi-line aligned equation, use aligned environment (plus t passed to its optional argument) rather than align*. See my the second item in my example below. Using align* makes the equations centered so it breaks the nature of "list".
  3. But if the item starts with a sentence, use align* environment. See my third item in the given example below. Using align* does not break the nature of "list".

Does it make sense?

\documentclass[preview,border=12pt,12pt]{standalone}% change it back to your own document class
\usepackage{amsmath}

\begin{document}
\begin{enumerate}
% number 1
\item $E\neq mc^2$ is the correct formula.
% number 2
\item
$
\!
\begin{aligned}[t]
 (a+b)^2 
    &= (a+b)(a+b) && \text{by definition} \\
    &= a^2 +ab +ab +b^2 && \text{using FOIL steps}\\
    &= a^2 +2ab +b^2 && \text{simplified}
\end{aligned}
$ 
% number 3
\item Consider the following equations,
\begin{align*}
    \vec \nabla \cdot \vec{B} &= 0\\
    \vec \nabla \times \vec{E} &= -\frac{\partial \vec{B}}{\partial t}
\end{align*}
% number
\item $y=mx+c$ is a street line.
\end{enumerate}
\end{document}

enter image description here

  • 1
    I use align* because it is possible break the alignment across the pages (with \allowdisplaybreaks) unlike aligned that produces unbreakable boxes. – skpblack Jul 29 '14 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.