4

I have a problem regarding alignment for my equations. This dummy program shows the problem:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{enumerate}
    \item First do this
    \begin{align}
    c^2 &= a^2 + b^2
    \end{align}

    \item Then do this

    \begin{align}
    variable &= c^2
    \end{align}
\end{enumerate}

\end{document}

Example

I would like the = to be aligned under each other, but still be able to list them inside the enumerate.

Any suggestions?

1 Answers1

4

One item has to be in the enumerate. The rest can be wrapped into mathtools' \interext commands.

% arara: pdflatex

\documentclass{article}
\usepackage{mathtools}

\begin{document}    
\begin{enumerate}   
    \item First do this 
    \begin{align}
        c^2 &= a^2 + b^2
        \shortintertext{\item Then do this}
        \text{variable} &= c^2
        \intertext{\item Theeeeeennnnnn doooooooo thisssssss!!!}
        \text{variable} &= c^2
    \end{align}
\end{enumerate} 
\end{document}

enter image description here

LaRiFaRi
  • 43,807