
\documentclass[a4paper, 12pt, fleqn]{book}
\usepackage[utf8,ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{siunitx}
\usepackage[fleqn,centertags]{mathtools}
\begin{document}
This is ordinary text and below 3 blocks of equations. The first one without using subequations.
\begin{alignat}{2}
&a &&=b ~,\label{1a}\\[1ex]
&alpha &&=beta~,\label{1b} \\[1ex]
&c &&=\frac{\num{72000}\cdot\num{50000}\,(1 - \num{0.30})}{\num{50000}\,(1 - \num{0.30}) -
2\cdot\num{72000}\cdot\num{0.25}^2} = \SI{96923}{kN/m^2} \label{1c} \\[1ex]
&cc &&=\frac{\num{72000}\cdot\num{50000}\,(1 - \num{0.30})}{\num{50000}\,(1 - \num{0.30}) -
2\cdot\num{72000}\cdot\num{0.25}^2} = \SI{96923.08}{kN/m^2} \label{1d}
\end{alignat}%
The second block uses the subequation environment.
{\allowdisplaybreaks [4]
\begin{subequations}\label{1}
%\noeqref{1a,1b,1c,1d}
\begin{alignat}{2}
&a &&=b ~,\label{1a}\\[1ex]
&alpha &&=beta~,\label{1b} \\[1ex]
&c &&=\frac{\num{72000}\cdot\num{50000}\,(1 - \num{0.30})}{\num{50000}\,(1 - \num{0.30}) -
2\cdot\num{72000}\cdot\num{0.25}^2} = \SI{96923}{kN/m^2} \label{1c} \\[1ex]
&cc &&=\frac{\num{72000}\cdot\num{50000}\,(1 - \num{0.30})}{\num{50000}\,(1 - \num{0.30}) -
2\cdot\num{72000}\cdot\num{0.25}^2} = \SI{96923.08}{kN/m^2} \label{1d}
\end{alignat}
\end{subequations}}%
The alignment on the left side is fine in both cases. However, in the second case there is too much horizontal space left of the "=" sign. When the equation (5d) is removed, or if I reduce the length of (5d) by deleting one or more digits again, the alignment is fine, as can be seen below.
{\allowdisplaybreaks [4]
\begin{subequations}\label{1}
%\noeqref{1a,1b,1c,1d}
\begin{alignat}{2}
&a &&=b ~,\label{1a}\\[1ex]
&alpha &&=beta~,\label{1b} \\[1ex]
&c &&=\frac{\num{72000}\cdot\num{50000}\,(1 - \num{0.30})}{\num{50000}\,(1 - \num{0.30}) -
2\cdot\num{72000}\cdot\num{0.25}^2} = \SI{96923}{kN/m^2} \label{1c} \\[1ex]
&cc &&=\frac{\num{72000}\cdot\num{50000}\,(1 - \num{0.30})}{\num{50000}\,(1 - \num{0.30}) -
2\cdot\num{72000}\cdot\num{0.25}^2} = \SI{96923}{kN/m^2} \label{1d}
\end{alignat}
\end{subequations}}
\end{document}
Das ist, was ich bekomme:
Antwort1
Du hast Pech. Wie du siehst, sind die Tags in der zweiten Anzeige falsch ausgerichtet: amsmath
In diesem Fall sollte man es wahrscheinlich besser machen und zumindest eine Warnung ausgeben, dass die Ausrichtung zu weit ist.
Da Sie verwenden fleqn
, können Sie das Problem lösen, indem Sie so tun, als sei die lange Gleichung tatsächlich etwas kürzer.
\documentclass[a4paper, 12pt, fleqn]{book}
\usepackage[T1]{fontenc}
\usepackage{siunitx}
\usepackage[fleqn,centertags]{mathtools}
\usepackage{amsmath}
\begin{document}
This is ordinary text and below 3 blocks of equations. The first one without using subequations.
\begin{alignat}{2}
&a &&=b ~,\label{1a}\\[1ex]
&alpha &&=beta~,\label{1b} \\[1ex]
&c &&=\frac{\num{72000}\cdot\num{50000}\,(1 - \num{0.30})}{\num{50000}\,(1 - \num{0.30}) -
2\cdot\num{72000}\cdot\num{0.25}^2} = \SI{96923}{kN/m^2} \label{1c} \\[1ex]
&cc &&=\frac{\num{72000}\cdot\num{50000}\,(1 - \num{0.30})}{\num{50000}\,(1 - \num{0.30}) -
2\cdot\num{72000}\cdot\num{0.25}^2} = \SI{96923.08}{kN/m^2} \label{1d}
\end{alignat}
The second block uses the subequation environment.
\begin{subequations}\label{1}
\begin{alignat}{2}
&a &&=b ~,\label{x1a}\\[1ex]
&alpha &&=beta~,\label{x1b} \\[1ex]
&c &&=\frac{\num{72000}\cdot\num{50000}\,(1 - \num{0.30})}{\num{50000}\,(1 - \num{0.30}) -
2\cdot\num{72000}\cdot\num{0.25}^2} = \SI{96923}{kN/m^2} \label{x1c} \\[1ex]
&cc &&=\frac{\num{72000}\cdot\num{50000}\,(1 - \num{0.30})}{\num{50000}\,(1 - \num{0.30}) -
2\cdot\num{72000}\cdot\num{0.25}^2} = \SI{96923.08}{kN/m^2}
\hspace{-2em}
\label{x1d}
\end{alignat}
\end{subequations}
\end{document}
Verwenden Sie es niemals
\allowdisplaybreaks
in der endgültigen Version eines Dokuments. Sie können es beim Schreiben des Dokuments in der Präambel verwenden, aber am Ende müssen die Seitenumbrüche in den Anzeigen sorgfältig ausgewählt werden.Das Laden macht keinen Sinn
ansinew
. Entfernen Sie deninputenc
Anruf.Warum Linksbündigung der linken Seiten?