This question already has an answer here:

I'm new to LaTeX. I'm trying to create a table where one of the cells contains aligned equations.

The naive approach of nesting an align environment inside the table environment does not work:

\begin{tabular}{l r}
A & B\\
x &= y+1\\
x &= (y+1) (y-1)

This gives the error 'Argument of \align has an extra }.'

I must admit I have no idea what that error message means... Why is it not possible to nest align and table environments? How do I put aligned equations in a table?


marked as duplicate by Werner, Christoph, Peter Jansson, Guido, barbara beeton Mar 3 '14 at 21:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Mar 3 '14 at 20:13

This question came from our site for professional and enthusiast programmers.


As you've discovered, you can't use an align (or align*) environment inside a tabular environment, unless you go to some lengths to "hide" the align environment.

A simple remedy is available: Use an aligned environment. Optionally, use a [t] or [b] placement specifier to specify if you want top- or bottom-alignment. If you don't provide a placement indicator, any adjacent material will be centered vertically relative to the material in the aligned environment.

enter image description here

A & B\\
$\begin{aligned}[t] % placement: default is "center", options are "top" and "bottom"
x &= y+1\\
x &= (y+1) (y-1)
\end{aligned}$ & abc xyz\\
  • +1 for option [t]. – IgotiT Jul 12 '17 at 6:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.