3

I want to align equations in an align* environment, that are on different \items of an itemize environment. Here is my MWE:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{itemize}
\item First item with equation:
   \begin{align*}
      a+b+c+d &= e,\\
      1+2+3+4 &= 5.
   \end{align*}
\item Second item without equation.
\item Third item with equation, that should be aligned with the equation
   of the first item:
   \begin{align*}
      x &= x, \\
      3 &= 3.
   \end{align*}
\end{itemize}

\end{document}
Wauzl
  • 1,037
  • 1
  • 9
  • 15
  • While the duplicate effectively would have answered my question, I'd like to remark that it was unintuitive for me that \item may appear in \intertext or even \shortintertext. – Wauzl Dec 07 '15 at 21:47

2 Answers2

2

You can use \shortintertext from mathtools:

\documentclass{article}

\usepackage{amsmath,mathtools}

\begin{document}

\begin{itemize}
\item First item with equation:
   \begin{align*}
      a+b+c+d &= e,\\
      1+2+3+4 &= 5.\\
\shortintertext{%
  \item Second item without equation.
  \item Third item with equation, that should be aligned with the equation
   of the first item:%
}
      x &= x, \\
      3 &= 3.
   \end{align*}
\end{itemize}

\end{document}

enter image description here

egreg
  • 1,121,712
0

It can be done using \intertext. Here is, again the MWE:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{itemize}
\item First item with equation:
   \begin{align*}
      a+b+c+d &= e,\\
      1+2+3+4 &= 5.
   \end{align*}
\item Second item without equation.
\item Third item with equation, that should be aligned with the equation
   of the first item:
   \begin{align*}
      x &= x, \\
      3 &= 3.
   \end{align*}
\end{itemize}

Some other test for seraration.

\begin{itemize}
\item First item with equation:
   \begin{align*}
      a+b+c+d &= e,\\
      1+2+3+4 &= 5.
\intertext{      
\item Second item without equation.
\item Third item with equation, that should be aligned with the equation
   of the first item:
}
      x &= x, \\
      3 &= 3.
   \end{align*}
\end{itemize}

\end{document}

Yielding the following:


Output of the above MWE


It can be seen that, unfortunately, the spaces at the beginning and at the end of the \intertext seem to be a little too big.

Wauzl
  • 1,037
  • 1
  • 9
  • 15