When I use {align*}
, it shifts the expressions on the right of the =
to the far right of the equation. But when I use {aligned}[t]
it works normally.
The following is the code:
\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{align*}
x + 3y + 4z &=& 2\\
3y - 4z &=& 5\\
3 &=& 4
\end{align*}\\
$ \! \begin{aligned}[t]
x + 3y + 4z &=& 2\\
3y - 4z &=& 5\\
3 &=& 4
\end{aligned}$
\end{document}
I've searched this question but the answers are usually about other ways of writing it without explanation.
So what is the purpose of \!
, [t]
and how is aligned
different from align
?
Best Answer
You're using the environments incorrectly. Here's how you could (should...) use them:
Some things to note:
The alignment around the relation
=
is made using a single&
on the left. This differs from theeqnarray
usage of&
other both sides of the relation.align*
sets an unnumbered alignment that is always centred with respect to the text block.aligned
sets a block with a similar interface toalign*
that can be used as inline math or within a display setting. The optional parameter allows you to specify a vertical alignment parameter with respect to the surrounding content. As an example, see