5

When breaking a long equation over exactly two lines, the multiline allows doing so without adding spurious equation numbering and without manually placing \notag tags. It also right-aligns the second line.

When needing such a line break inside an align environment, a nested split environment can be used. But when using this to introduce a line-break into the right-hand side of the equation, it will be left-aligned.

Manually aligning the equation with \phantom{},\hspace{} and \qquad constructs is doable, but results in less readable and less maintainable source code, so I want to avoid it at least until final editing.

Is there any way to get it right-aligned instead? Is split even the correct environment for this usecase?

MWE

enter image description here

\documentclass[12pt]{article}
\usepackage{amsmath}
\textwidth = 10cm
\begin{document}
\begin{align}
  The =& First Equation Is Short Enough For One Line
  \\
  \begin{split}
    The =& Second Equation Is So Long That Splitting It
    \\   & Over Two Lines Is Desirable
  \end{split}
\end{align}
\begin{multline}
  But = How Do I get The Second Line To Be
  \\    Right-Aligned Like For A Multiline?
\end{multline}
\end{document}

Example from real-world document

enter image description here

  \documentclass[12pt]{article}
  \usepackage{amsmath}
  \usepackage{fouriernc}
  \begin{document}

  \begin{subequations}
  \begin{align}
  \Delta_1B(t)
  &=
  \sum_{\alpha}
  F_\alpha e^{-i\omega_\alpha t}
  \sum_{ij}
  -\frac{
    f_{ij} B_{ij} A^\alpha_{ji}
  }{
    \hbar(\omega_{ij}+\overline\omega_\alpha)
  }
  \\
  \begin{split}
  \Delta_2 B(t)
  &=
  \sum_{\alpha\beta} 
  F_\alpha F_\beta e^{-i(\omega_\alpha+\omega_\beta)t}
  \sum_{ijk}
  \Bigg(
  \frac{
    f_{ik} B_{ij} A^\alpha_{jk} A^{\beta}_{ki}
  }{
    \hbar^2
    (\omega_{ki}-\overline\omega_\beta)
    (\omega_{ji}-\overline\omega_\alpha-\overline\omega_\beta)
  }
  \\&
  +
  \frac{
    f_{jk} B_{ij} A^\beta_{jk} A^{\alpha}_{ki}
  }{
    \hbar^2
    (\omega_{jk}-\overline\omega_{\beta})
    (\omega_{ji}-\overline\omega_\alpha-\overline\omega_\beta)
  }
  \Bigg)
  \end{split}
  \end{align}
  \end{subequations}

  \end{document}
1
  • 1
    what about themultilined environment from the mathtools package? it is intended for nesting in math environments.
    – Zarko
    Oct 3, 2018 at 11:06

2 Answers 2

2

I can suggest a pretty hacky way with multlined from the mathtools package:

\documentclass[12pt]{article}
\usepackage{amsmath,mathtools}
\usepackage{fouriernc}
\begin{document}

\begin{subequations}
\begin{align}
\Delta_1B(t)
&=
\sum_{\alpha}
F_\alpha e^{-i\omega_\alpha t}
\sum_{ij}
-\frac{
  f_{ij} B_{ij} A^\alpha_{ji}
}{
  \hbar(\omega_{ij}+\overline\omega_\alpha)
}
\\
&\begin{multlined}
\mathllap{\Delta_2 B(t)}
=
\sum_{\alpha\beta} 
F_\alpha F_\beta e^{-i(\omega_\alpha+\omega_\beta)t}
\sum_{ijk}
\Bigg(
\frac{
  f_{ik} B_{ij} A^\alpha_{jk} A^{\beta}_{ki}
}{
  \hbar^2
  (\omega_{ki}-\overline\omega_\beta)
  (\omega_{ji}-\overline\omega_\alpha-\overline\omega_\beta)
}
\\
+
\frac{
  f_{jk} B_{ij} A^\beta_{jk} A^{\alpha}_{ki}
}{
  \hbar^2
  (\omega_{jk}-\overline\omega_{\beta})
  (\omega_{ji}-\overline\omega_\alpha-\overline\omega_\beta)
}
\Bigg)
\end{multlined}
\end{align}
\end{subequations}

\end{document}

Notice that you can't place & inside multlined, so in order to align on the equal sign, you'll have to pretend that \Delta_2 B(t) has zero width. Hence \mathllap (again, from mathtools).

The result looks fine to me:

enter image description here

4
  • The multlined environment does exactly what I want, but I found that you use it unnecessarily complicated :) Rather than the \mathllap construct, I just put B_2(t) &= to the left of the multlined, and used \begin{multlined}[t] for the correct vertical alignment.
    – kdb
    Oct 3, 2018 at 16:14
  • In that case the equation label also moves up. I'm not sure it's correct to label the first line of the multiline equation if the label is placed to the right. Oct 4, 2018 at 6:31
  • Personally, I prefer the number to be on the first line or on the last line. Whether this is "correct" is ultimately decided by the style guide / copy-editor, if any. Looking at the papers around me, centering it seems to be a common convention, when a group of equation has a single number. I somehow can't find any Journal-published right now, that use align-style multiple equations...
    – kdb
    Oct 4, 2018 at 8:38
  • As far as I know, the common convention in this case is to number the first line if numbers are on the left margin, and the last line if they are on the right margin. Unfortunately, the tbtags option doesn't work for multlined, but \begin{multlined}[b]...\end{multlined} lowers the number. Oct 4, 2018 at 8:42
1

Exploiting the fact that the two left-hand sides have the same width, you can use aligned for the second equation:

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{fouriernc}
\begin{document}

\begin{subequations}
\begin{align}
&\Delta_1B(t)
=
\sum_{\alpha}
F_\alpha e^{-i\omega_\alpha t}
\sum_{ij}
-\frac{
  f_{ij} B_{ij} A^\alpha_{ji}
}{
  \hbar(\omega_{ij}+\overline\omega_\alpha)
}
\\
&\begin{aligned}
\Delta_2 B(t)
=
\sum_{\alpha\beta} 
F_\alpha F_\beta e^{-i(\omega_\alpha+\omega_\beta)t}
\sum_{ijk}
\Biggl(
\frac{
  f_{ik} B_{ij} A^\alpha_{jk} A^{\beta}_{ki}
}{
  \hbar^2
  (\omega_{ki}-\overline\omega_\beta)
  (\omega_{ji}-\overline\omega_\alpha-\overline\omega_\beta)
}
\\
+
\frac{
  f_{jk} B_{ij} A^\beta_{jk} A^{\alpha}_{ki}
}{
  \hbar^2
  (\omega_{jk}-\overline\omega_{\beta})
  (\omega_{ji}-\overline\omega_\alpha-\overline\omega_\beta)
}
\Biggr)
\end{aligned}
\end{align}
\end{subequations}

\end{document}

Note that \Bigg is not the right command; you should distinguish between \Biggl and \Biggr, in order that the spacings are right.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .