
Ich versuche, eine Summe aus vielen Termen wie folgt auf mehrere Zeilen aufzuteilen:
\documentclass[12pt,a4paper]{book}
\usepackage{amsmath}
\begin{document}
\begin{align*}
L &= \sum { A && \text{This equation sums ABC} \\
\times B \\
\times C }
\end{align*}
\end{document}
aber ich verstehe Missing } inserted
. Die Motivation besteht darin, \text
nicht zu weit nach rechts gedrängt zu werden.
Antwort1
Wie bereits von @daleif in einem Kommentar angemerkt, müssen Sie das falsche Paar geschweifter Klammern entfernen, die das Material nach umschließen \sum
. Darüber hinaus sollten Sie mit ziemlicher Sicherheit Ausrichtungspunkte für das Material in den Zeilen 2 und 3 angeben.
\documentclass[12pt,a4paper]{book}
\usepackage{amsmath}
\begin{document}
\hrule % just to illustrate width of textblock
\begin{align*}
L &= \sum \text{A-stuff} \tag*{This equation sums ABC} \\
&\quad \times \text{B-stuff} \\
&\quad \times \text{C-stuff}
\end{align*}
\end{document}
Antwort2
Verwenden aligned
:
\documentclass[12pt,a4paper]{book}
\usepackage{amsmath}
\begin{document}
\begin{align*}
L &= \sum \Bigl( \begin{aligned}[t]
& A \\
& \times B \\
& \times C \Bigr)
\end{aligned}
&& \text{This text is not so far}
\\
M &= ABC && \text{This text is not so far}
\end{align*}
Just for a check:
\begin{align*}
M &= ABC && \text{This text is not so far} \\
K &= XYZ && \text{This text is not so far}
\end{align*}
\end{document}
Antwort3
Danke. Ich habe Klammern eingefügt und
\phantom
statt \quad
...
\documentclass[12pt,a4paper]{book}
\usepackage{amsmath}
\begin{document}
\begin{align*}
L &= \sum \big( A \\
& \phantom{= \sum \big(} \times B \\
& \phantom{= \sum \big(} \times C
\big)
\end{align*}
\end{document}
Gibt es eine Möglichkeit, so etwas zu tun:
L &\setphantom{= \sum \big(} A \\
& \getphantom \times B \\
& \getphantom \times C
\big)