I am writing a sequence of inequalities in math mode, where the first line defines the first object. To be clear, I have something like
\documentclass[12pt]{amsart}
\usepackage{amsfonts,graphics,amsmath,amsthm}
\usepackage{amsfonts,amscd, amssymb,amsmath,latexsym}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\begin{split}
A &:= B - C \\
&= U + V \\
&\geq Z.
\end{split}
\end{equation}
\end{document}
I would like the =
from the :=
in the first line to be aligned with the =
in the second line. If I use the code above, it does not happen. Similarly, if I use \coloneqq
in place of :=
, the same misplacement happen. On the other hand, if I write :&=
, I get the alignment I want; yet, in this way the column gets too far from the equal sign and it renders in an unpleasant way.
How can I get the alignment I want without having :
too far from =
?
&\mathrel{\phantom{:}}= U + V
=
in:=
aligned with the=
below ?\phantom
to all subsequent lines, don't you ? Maybe it is more simple to have :A:&= B-C
and then leave all further lines unchanged ? An even better solution probably involves themathtools
command\coloneqq
\colonalign
and use that every instance you need. Or may be:\joinrel\joinrel&=
works if you put it just in the first line? (Can't test right now.)