请查看此代码的结果:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation} \begin{split}
X_1^{\lambda_3 n} = \\
\begin{cases*}
\sqrt{(1-\lambda_1) n P_1} \cdot (+1,0,0,...,0), \text{if } m_1 = \min\{ \hat{m}_1, \hat{m}_1' \}\\
\sqrt{(1-\lambda_1) n P_1} \cdot (-1,0,0,...,0), \text{if } m_1 = \max\{ \hat{m}_1, \hat{m}_1' \}\\
\end{cases*}
\end{split} \end{equation}
\end{document}
我希望 $X_1^{\lambda_3 n} =$ 位于左侧,但我将它放在了右上角。就像这样:
谢谢!
答案1
这里不需要split
。使用 mentalign
来设置方程式就足够了:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}
X_1^{\lambda_3 n} =
\begin{cases*}
\sqrt{(1 - \lambda_1) n P_1} \cdot (+1, 0, 0, \dots, 0) & if $m_1 = \min \{ \hat{m}_1, \hat{m}_1' \}$ \\
\sqrt{(1 - \lambda_1) n P_1} \cdot (-1, 0, 0, \dots, 0) & if $m_1 = \max \{ \hat{m}_1, \hat{m}_1' \}$
\end{cases*}
\end{equation}
\begin{align}
& X_1^{\lambda_3 n} = \notag \\
& \begin{cases*}
\sqrt{(1 - \lambda_1) n P_1} \cdot (+1, 0, 0, \dots, 0) & if $m_1 = \min \{ \hat{m}_1, \hat{m}_1' \}$ \\
\sqrt{(1 - \lambda_1) n P_1} \cdot (-1, 0, 0, \dots, 0) & if $m_1 = \max \{ \hat{m}_1, \hat{m}_1' \}$
\end{cases*}
\end{align}
\end{document}
答案2
cases*
设计为具有文本模式第二列,并且这里不需要,split
因为外部方程只有一行。
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}
X_1^{\lambda_3 n} =
\begin{cases*}
\sqrt{(1-\lambda_1) n P_1} \cdot (+1,0,0,\dots,0)&if $m_1 = \min\{ \hat{m}_1, \hat{m}_1' \}$\\
\sqrt{(1-\lambda_1) n P_1} \cdot (-1,0,0,\dots,0)&if $ m_1 = \max\{ \hat{m}_1, \hat{m}_1' \}$
\end{cases*}
\end{equation}
\end{document}
或者如果你想要两行:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{multline}
X_1^{\lambda_3 n} =\\
\begin{cases*}
\sqrt{(1-\lambda_1) n P_1} \cdot (+1,0,0,\dots,0)&if $m_1 = \min\{ \hat{m}_1, \hat{m}_1' \}$\\
\sqrt{(1-\lambda_1) n P_1} \cdot (-1,0,0,\dots,0)&if $ m_1 = \max\{ \hat{m}_1, \hat{m}_1' \}$
\end{cases*}
\end{multline}
\end{document}
答案3
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{flalign*}
&X_1^{\lambda_3 n} = &&\\
&\sqrt{(1-\lambda_1) n P_1} \cdot (+1,0,0,...,0), \: \text{if } m_1 = \min\{ \hat{m}_1, \hat{m}_1' \} &&\\
& \sqrt{(1-\lambda_1) n P_1} \cdot (-1,0,0,...,0), \: \text{if } m_1 = \max\{ \hat{m}_1, \hat{m}_1' \}\\&&
\end{flalign*}
\end{document}
这是您正在寻找的解决方案的更简单版本。当然,上面的其他建议与这个一样好。