3

The following code

\documentclass{amsart}


\begin{document}

\[
\begin{aligned}
[E^dx,y]&=E^k[E^{d-k}x,y]-kE^{k-1}[E^{d-k}x,Ey]\\
&+\binom k2E^{k-2}[E^{d-k}x,E^2y]-...\\
&+(-1)^j\binom kjE^{k-j}[E^{d-k}x,E^jy]+...\\
&+(-1)^{k-1}kE[E^{d-k}x,E^{k-1}y]+(-1)^k[E^{d-k}x,E^ky].
\end{aligned}
\]

\end{document} 

produces (for me)

enter image description here

As you see, the left-hand side [E^dx,y] of aligned has disappeared.

Does anybody know the reason, and how to prevent it from happening?

12
  • 1
    put \relax after \begin{aligned} to stop the [ being taken as an optional argument Commented Apr 27, 2019 at 7:56
  • 1
    why use \[\begin{aligned} here rather than \begin{align*} ? Commented Apr 27, 2019 at 7:57
  • 1
    also help to add \usepackage{mathtools} in preamble of your document.
    – Zarko
    Commented Apr 27, 2019 at 7:59
  • 1
    OK if you'd used \begin{equation} rather than \[ so the equation number appeared I wouldn't have asked:-) Commented Apr 27, 2019 at 8:02
  • 1
    doesn't matter really, the issue is just with aligned (we have considered fixing this, but there are some compatibility issues your [E^dx,y] is "clearly" intended to be part of the formula, but if it had been [t] then it may have been intended to specify top alignment and if we change things to make it typeset [t] then documents may break.... Commented Apr 27, 2019 at 8:06

1 Answer 1

5

This is documented behaviour but not that great and may change in a future release see

https://github.com/latex3/latex2e/issues/5

The [...] is taken as an optional argument, so you can "hide" it with \relax

\documentclass{amsart}


\begin{document}

\[
\begin{aligned}\relax
[E^dx,y]&=E^k[E^{d-k}x,y]-kE^{k-1}[E^{d-k}x,Ey]\\
&+\binom k2E^{k-2}[E^{d-k}x,E^2y]-...\\
&+(-1)^j\binom kjE^{k-j}[E^{d-k}x,E^jy]+...\\
&+(-1)^{k-1}kE[E^{d-k}x,E^{k-1}y]+(-1)^k[E^{d-k}x,E^ky].
\end{aligned}
\]

\end{document} 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .