5

Below, how would I move the first math-line left so that a^2 left-aligns with 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}

enter image description here

5

You need to add appropriate alignment points &.

Sample output

\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}

Additionally if you are using a version of amsmath from before 2017, the aligned starts with a thinspace, so you need to compensate with a negative thin space \!, i.e. writing

&\!\begin{aligned}

instead of just &\begin{aligned}.

  • the \! is not needed after the 2017 amsmath release (finally;-) – David Carlisle Mar 20 '17 at 21:58
2

Without PSTricks.

enter image description here

\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}
  • What's the \! stuff doing? It's a little hard to google for... – Ken Williams Jan 31 '18 at 21:27
1
\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

Or :-)

{\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}

enter image description here

  • Thanks. But it won't work if the first line is just a bit longer. The alignment is also not 100% – Frank Seifert Apr 22 '13 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.