I often use aligned
inside other math environments like equation, align, gather
, but there's sometimes (always?) an extra white space in front of the aligned
block, no matter where the aligned
block is: at the very beginning of a line, or right after an equal sign.
Here's My Question, explanation comes after the figure:
What is the proper way of dealing with this extra white space? If I shouldn't use
aligned
to achieve such layout (shown below), what is the proper alternative?
There seems to be a split
approach that works in certain cases, but not for me most of the time.
The extra white space seems to have exactly the same width as the negative space \! like shown below:
Please note the misaligned F_H( eta ).
The same aligned
block appears twice, as Eq.(39) and Eq.(40). The first time (tagged with red) is the whole line being the aligned
block, whereas Eq.(40) is the effect I want but I had to cheat a bit by inserting a single \! in front of aligned
.
Here I want to align all the equations at the beginning, but in many other cases the desired alignment point is in the middle.
Now, this tiny extra white space is an issue because
- I often use
aligned
block right around the&
inside analign
environment. - In the example shown above, I cannot start
aligned
around the equal sign at the integral but have to do the whole line as analigned
because this is the only way to use theoptional [b]
to allow the equation numbering appear at the right place (last line of thealigned
block).
The posts I found here that address aligned
issues are not helpful to me, since they are mostly about what I already know very well: the alternating right-left alignment and the additional n-1 &
one should place in-between the n &
align points as column divider.
I hope I have stated my question in a comprehensive way, and any input would be appreciated. Thank you.
Here's the code to generate the equations above:
\begin{align}
& F_{XH}(x, \eta) = F_p(x) \cdot p + F_q(x) \cdot ( 1 - p ) \\
& F_X(x) = \sum_{\eta = -1}^{1} F_{XH}(x, \eta) = p F_p(x) + (1 - p) F_q(x) \\
& \begin{aligned}[b]% plain version
F_H(\eta) = \Pr{ H = \eta } &= \int F_{XH}(x, \eta) \dd x \\
&= p + ( 1 - p )
\end{aligned} \quad \text{\color{red}without \textbackslash !} \\
& \!\begin{aligned}[b]% with negative space
F_H(\eta) = \Pr{ H = \eta } &= \int F_{XH}(x, \eta) \dd x \\
&= p + ( 1 - p )
\end{aligned} \quad \text{\color{blue}with \textbackslash !} \\
& F_{X \mid H}(x\, ;\, \eta_0) = \frac{ p F_p(x) }{ F_X(x) }
+ \frac{ (1-p) F_q(x) }{ F_X(x) }
\end{align}
\,
space at the beginning of thealigned
environment?2016/11/05
????