I hope that the following question is not a duplicate but I could not find a definite answer.
I'm trying to obtain the the same result as Formula (1) in the picture next, but I feel that my approach is not optimal and somewhat dirty.
I produced the output with the following code:
\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{aligned}
X & = \{ x \mid \text{a very very very long condition} \} \cup \\
& \phantom{{}={}} \{ y \mid \text{another very very very long condition} \}
\end{aligned}
\end{equation}
\begin{equation}
\begin{split}
X & = \{ x \mid \text{a very very very long condition} \} \cup \\
& \quad \{ y \mid \text{another very very very long condition} \}
\end{split}
\end{equation}
\begin{equation}
\begin{aligned}
X = & \{ x \mid \text{a very very very long condition} \} \cup \\
& \{ y \mid \text{another very very very long condition} \}
\end{aligned}
\end{equation}
\begin{equation}
X =
\begin{array}[t]{l}
\{ x \mid \text{a very very very long condition} \} \cup \\
\{ y \mid \text{another very very very long condition} \}
\end{array}
\end{equation}
\end{document}
Formula (1) is the output I desire. However, I can't imagine that using \phantom
is the right way to go.
Formula (2) is according to the examples in the amsmath package documentation. And it looks ugly.
Formula (3) is better, but the kerning is wrong. However, I somehow feel that using the alignment in this way is the right approach.
Finally, Formula (4) uses an array, but also here the kerning is screwed.
Can anyone hint me in the right direction? Thanx!
aligned
is:\begin{aligned} X = {} & \{ x \mid \text{a very very very long condition} \} \cup \\ & \{ y \mid \text{another very very very long condition} \} \end{aligned}
\phantom
isn't all that hacky---this might be legitimate use. (For laziness' sake, something tells me you can add an empty group after=
in #3 to achieve the effect---it's less typing.)