我想知道是否有一个好的解决方案来对齐列表中由文本项分隔的数学方程式。以下是我的尝试。
谢谢。
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{itemize}
\item Text1:
\begin{align*}
C &= \begin{Bmatrix} \langle a_0,x \rangle\\ \vdots\\ \langle a_p,x\rangle \end{Bmatrix}_{\big| x \in \mathcal{H}}, & D &= \begin{pmatrix} 1 \\ 1 \\ \vdots \\ 1 \end{pmatrix}. \\ \\
\shortintertext{\item Text2: \bigskip}
C &= \begin{Bmatrix} \langle a_0,x\rangle\\\langle c_1,x\rangle\\ \vdots\\ \langle c_{r},x\rangle \end{Bmatrix}_{\big| x \in \mathcal{H}}, & D &= \begin{pmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix} \\ \\
\shortintertext{\item Text3: \bigskip}
C &= \begin{Bmatrix} \langle a_0,x\rangle\\\langle b_1,x\rangle\\ \vdots\\ \langle b_{p},x\rangle \end{Bmatrix}_{\big| x \in \mathcal{H}}, & D &= \begin{pmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix} \cdot
\end{align*}
\end{itemize}
\end{document}
答案1
我只会删除多余的行终止(\\
),而不是\shortintertext
使用\intertext
:
\documentclass{article}
%--------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%
\usepackage{lipsum} % for dummy text
%---------------------------------------------------------------%
\usepackage{mathtools}
\begin{document}
\begin{itemize}
\item Text 1:
\begin{align*}
C & = \begin{Bmatrix}
\langle a_0,x \rangle\\
\vdots\\
\langle a_p,x\rangle
\end{Bmatrix}_{\big| x \in \mathcal{H}},
&
D & = \begin{pmatrix}
1 \\ 1 \\ \vdots \\ 1
\end{pmatrix}.
\intertext{\item Text 2:}
C & = \begin{Bmatrix}
\langle a_0,x\rangle\\
\langle c_1,x\rangle\\
\vdots\\
\langle c_{r},x\rangle
\end{Bmatrix}_{\big| x \in \mathcal{H}},
&
D & = \begin{pmatrix}
1 \\ 0 \\ \vdots \\ 0
\end{pmatrix}
\intertext{\item \lipsum[66]}
C &= \begin{Bmatrix}
\langle a_0,x\rangle\\
\langle b_1,x\rangle\\
\vdots\\ \langle b_{p},x\rangle
\end{Bmatrix}_{\big| x \in \mathcal{H}},
&
D & = \begin{pmatrix}
1 \\ 0 \\ \vdots \\ 0
\end{pmatrix} \cdot
\end{align*}
\end{itemize}
\end{document}