我想对齐align*
环境中位于不同\item
环境中的方程式itemize
。这是我的 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}
答案1
您可以\shortintertext
使用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}
答案2
可以使用 来完成\intertext
。以下是 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}
得到以下结果:
可以看到,遗憾的是,开头和结尾的空格\intertext
似乎有点太大了。