We want to code the following system of aligned equations:
1.pdf
The signs before a and d are unary, while the others are binary. The signs before a, d, g and i must align precisely with each other and with j. Of course, = and +/- could represent any relations or binary operators, such as <= and times.
In LaTeX, the align environment requires the align command & to be placed before the relation. This necessitates the use of the phantom command, which leads to complex constructions (see https://tex.stackexchange.com/questions/423365/spacing-after-equals-sign-in-align-environment/482070#482070):
\begin{align}
& \mathrel{\phantom{=}} -a + b - c \\
& = -d + e - f \\
& \phantom{=}\ + g - h \\
& \phantom{=}\ + i \\
& = j - k + l
\end{align}
In contrast, Typst allows the align command & to be placed after the relation. All we have to do is insert an additional med space after the binary operator at the line break:
$
& -a + b - c \
= & -d + e - f \
& + med g - h \
& + med i \
= & j - k + l
$
However, it is also quite common to align the first line with the = sign:
2.pdf
In this case, we must place the align command & before the relation to achieve the desired result:
$
& -a + b - c \
& = -d + e - f \
& #h(1em/18) #hide[=] + g - h \
& #h(1em/18) #hide[=] + i \
& = j - k + l
$
or
$
& -a + b - c \
& = -d + e - f \
& #hide[$=$] + med g - h \
& #hide[$=$] + med i \
& = j - k + l
$