
Ich habe folgende Gleichung:
\begin{equation}
\begin{split}
f_a(w_1,\ldots,w_m,&z_{w_1pa},\ldots,z_{w_mpa},a) = \\
&\prod_{j\in \{1,\ldots,m\} \mid z_{w_jpa} \neq \emptyset} \left( \left|z_{w_jpa} - a\right| + \left(-1\right)^{|z_{w_jpa} - a|} w_j\right)\\
\end{split}
\end{equation}
Das Ergebnis dieses Codes ist, dass
ich die zweite Zeile der Gleichung nach links verschieben möchte, damit die Gleichungsbeschriftung keine andere Zeile verwendet.
Antwort1
Fügen Sie \hspace*{-15pt}
danach &
Folgendes hinzu:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{split}
f_a(w_1,\ldots,w_m,&z_{w_1pa},\ldots,z_{w_mpa},a) = \\
&\hspace*{-15pt}\prod_{j\in \{1,\ldots,m\} \mid z_{w_jpa} \neq \emptyset} \left( \left|z_{w_jpa} - a\right| + \left(-1\right)^{|z_{w_jpa} - a|} w_j\right)
\end{split}
\end{equation}
\end{document}
\hspace* ensures that the space is given unlike other
\hspace, \hskip commands especially when given at the
beginning of the line.
Antwort2
Löschen Sie das letzte \\
. Ich schlage vier weitere Varianten vor, von denen anstelle von multlined
das Laden erforderlich ist ; eine hat die gesamte Gleichung in einer Zeile:mathtools
amsmath
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage[showframe]{geometry}
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
\begin{document}
\begin{multline}
f_a(w_1,\ldots,w_m,z_{w_1pa},\ldots,z_{w_mpa},a) =\\%
\prod _{j \in \{1,\ldots,m\} ∣z_{w_jpa} \neq \emptyset} \bigl( \abs{z_{w_jpa} - a} + \left(-1\right)^{\abs{z_{w_jpa} - a}} w_j\bigr)
\end{multline}
\vskip 0.5cm
\begin{equation}
\begin{split}
f_a(w_1,\ldots,w_m,{}&z_{w_1pa},\ldots,z_{w_mpa},a) = \\
&\prod _{j \in \{1,\ldots,m\} ∣z_{w_jpa} \neq \emptyset} \left( \abs{z_{w_jpa} - a} + \left(-1\right)^{\abs{z_{w_jpa} - a}} w_j\right)
\end{split}
\end{equation}
\vskip 0.5cm
\begin{equation}
\begin{multlined}
f_a(w_1,\ldots,w_m, z_{w_1pa},\ldots,z_{w_mpa},a) = \\
\prod _{j \in \{1,\ldots,m\} ∣z_{w_jpa} \neq \emptyset} \left( \abs{z_{w_jpa} - a} + \left(-1\right)^{\abs{z_{w_jpa} - a}} w_j\right)
\end{multlined}
\end{equation}%
\vskip 0.5cm
\begin{equation}
\begin{aligned}
\MoveEqLeft f_a(w_1,\ldots,w_m, z_{w_1pa},\ldots,z_{w_mpa},a) = \\
& \prod _{j \in \{1,\ldots,m\} ∣z_{w_jpa} \neq \emptyset} \left( \abs{z_{w_jpa} - a} + \left(-1\right)^{\abs{z_{w_jpa} - a}} w_j\right)
\end{aligned}
\end{equation}%
\vskip 0.5cm
\begin{equation}
f_a(w_1,\ldots,w_m,{}z_{w_1pa},\ldots,z_{w_mpa},a) = \\
\prod _{\mathclap{\substack{j \in \{1,\ldots,m\} \\ z_{w_jpa} \neq \emptyset}}}\!\left( \abs{z_{w_jpa} - a} + \left(-1\right)^{\abs{z_{w_jpa} - a}} w_j\right)
\end{equation}
\end{document}
Antwort3
Sie können dies durch die Platzierung des Align-Befehls definieren &
. Im Moment richten Sie die linke Seite Ihres Produkts an der z
oberen Zeile aus. Probieren Sie einfach mit diesen Platzierungen herum.
Zwei Anmerkungen: Schreiben Sie nicht \\
in die letzte Zeile. Wenn Sie ,z
in der ersten Zeile am ausrichten, deaktivieren Sie die automatische Leerzeichensetzung nach dem Komma. Tun Sie dies ,{}&z
stattdessen bitte.
% arara: pdflatex
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\setcounter{equation}{7}
% without any alignment.
\begin{equation}
\begin{split}
f_a(w_1,\ldots,w_m,z_{w_{1\mathrm{pa}}},\ldots,z_{w_{m\mathrm{pa}}},a) = \\
\prod_{\mathclap{j\in \{1,\ldots,m\} \mid z_{w_{j\mathrm{pa}}} \neq \emptyset}} \bigl( |z_{w_{j\mathrm{pa}}} - a| + (-1)^{|z_{w_{j\mathrm{pa}}} - a|} w_j\bigr)
\end{split}
\end{equation}
% aligned left
\begin{equation}
\begin{split}
&f_a(w_1,\ldots,w_m,z_{w_{1\mathrm{pa}}},\ldots,z_{w_{m\mathrm{pa}}},a) = \\
&\prod_{\mathrlap{j\in \{1,\ldots,m\} \mid z_{w_{j\mathrm{pa}}} \neq \emptyset}} \bigl( |z_{w_{j\mathrm{pa}}} - a| + (-1)^{|z_{w_{j\mathrm{pa}}} - a|} w_j\bigr)
\end{split}
\end{equation}
% aligned to the z as in your MWE
\begin{equation}
\begin{split}
f_a(w_1,\ldots,w_m,{}&z_{w_{1\mathrm{pa}}},\ldots,z_{w_{m\mathrm{pa}}},a) = \\
&\prod_{\mathclap{j\in \{1,\ldots,m\} \mid z_{w_{j\mathrm{pa}}} \neq \emptyset}} \bigl( |z_{w_{j\mathrm{pa}}} - a| + (-1)^{|z_{w_{j\mathrm{pa}}} - a|} w_j\bigr)
\end{split}
\end{equation}
\end{document}
Off-Topic: Ich würde empfehlen, das = in die zweite Zeile zu schreiben. Siehehttps://tex.stackexchange.com/a/172110
Antwort4
Dies ist eine Aufgabe für multline
; ich habe den komplizierten Index geändert, indem ich verwendet \substack
habe, wodurch er nicht zu lang wird. Beachten Sie, dass ich die erste, nicht angepasste Version vorziehen würde.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
This is the default rendering
\begin{multline}
f_a(w_1,\ldots,w_m,z_{w_1pa},\ldots,z_{w_mpa},a) = \\
\prod_{\substack{j\in \{1,\ldots,m\} \\ z_{w_jpa} \neq \emptyset}}
\Bigl( \lvert z_{w_jpa} - a\rvert + (-1)^{|z_{w_jpa} - a|} w_j\Bigr)
\end{multline}
and this happens if you add some balanced spaces
\begin{multline}
\hspace{4em}
f_a(w_1,\ldots,w_m,z_{w_1pa},\ldots,z_{w_mpa},a) = \\
\prod_{\substack{j\in \{1,\ldots,m\} \\ z_{w_jpa} \neq \emptyset}}
\Bigl( \lvert z_{w_jpa} - a\rvert + (-1)^{|z_{w_jpa} - a|} w_j\Bigr)
\hspace{4em}
\end{multline}
\end{document}