下面,我该如何将第一个数学行向左移动以便a^2
与左对齐where
?
\documentclass{article}
\usepackage[fleqn]{amsmath}
\begin{document}
\setlength{\parindent}{0pt}
Some text
\begin{equation}
\begin{split}
a^2+\lambda_\phi=\phi\\
\begin{aligned}
\text{where\qquad}
a &= \pm \sqrt{1-\cos^2\theta} \\
\lambda_\phi &= \cos\theta\cos\phi - \sin\theta\sin\phi
\end{aligned}
\end{split}
\end{equation}
Some more text
\end{document}
答案1
您需要添加适当的对齐点&
。
\documentclass{article}
\usepackage[fleqn]{amsmath}
\begin{document}
\setlength{\parindent}{0pt}
Some text
\begin{equation}
\begin{split}
&a^2+\lambda_\phi=\phi\\
&\begin{aligned}
\text{where\qquad}
a &= \pm \sqrt{1-\cos^2\theta} \\
\lambda_\phi &= \cos\theta\cos\phi - \sin\theta\sin\phi
\end{aligned}
\end{split}
\end{equation}
Some more text
\end{document}
amsmath
此外,如果你使用的是2017 年之前 的版本,aligned
则开头的空格较细,因此你需要用负较细空格进行补偿\!
,即写作
&\!\begin{aligned}
而不仅仅是&\begin{aligned}
。
答案2
没有 PSTricks。
\documentclass[preview,border=12pt]{standalone}
\usepackage[fleqn]{amsmath}
\begin{document}
\setlength{\parindent}{0pt}
Some text
\begin{equation}\!
\begin{aligned}
&a^2+\lambda_\phi=\phi\\
&\text{where}\ \!
\begin{aligned}[t]
a &= \pm \sqrt{1-\cos^2\theta} \\
\lambda_\phi &= \cos\theta\cos\phi - \sin\theta\sin\phi
\end{aligned}
\end{aligned}
\end{equation}
Some more text
\end{document}
答案3
\documentclass{article}
\usepackage[fleqn]{amsmath}
\begin{document}
\setlength{\parindent}{0pt}
Some text
\begin{equation}
\begin{split}
\begin{aligned}
a^2+\lambda_\phi=\phi\\
\text{where\qquad}
a &= \pm \sqrt{1-\cos^2\theta} \\
\lambda_\phi &= \cos\theta\cos\phi - \sin\theta\sin\phi
\end{aligned}
\end{split}
\end{equation}
Some more text
或者 :-)
{\arraycolsep0.6pt
\begin{equation}
\begin{array}{lrl}
\multicolumn{3}{l}
{a^2+\lambda_\phi=\phi}\\
\mbox{where\qquad}&
a &{}= \pm \sqrt{1-\cos^2\theta} \\
& \lambda_\phi &{}= \cos\theta\cos\phi - \sin\theta\sin\phi
\end{array}
\end{equation}}
\end{document}