Math & ScienceAligning equation in tabular cell

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
mahmutuc
Posts: 4
Joined: Thu Mar 10, 2011 11:28 am

Aligning equation in tabular cell

Post by mahmutuc »

I want to write aligned some equations in table cells. But I cannot use {align}, {split} etc. How can I use these blocks or alternative one.

Example:

Code: Select all

\begin{tabular}{|c|c|}
\hline
%%%%%%%1. cell
\begin{align}
x&=a+b\\
y&=c+d
\end{align}  &
%%%%%%%2. cell
\begin{align}
x&=a+b\\
y&=c+d
\end{align}\\ \hline
\end{tabular}
Last edited by mahmutuc on Thu Mar 10, 2011 8:40 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Aligning equation in tabular cell

Post by gmedina »

Hi,

you can use \parbox to enclose your equations:

Code: Select all

\documentclass{article} 
\usepackage{amsmath}

\begin{document}    

\begin{tabular}{|c|c|}
  \hline
  \parbox{3cm}{\begin{align}
    x &= a+b\\
    y &= c+d
  \end{align}} &
  \parbox{3cm}{\begin{align}
    x &= a+b\\
    y &= c+d
  \end{align}}\\ \hline
\end{tabular}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
mahmutuc
Posts: 4
Joined: Thu Mar 10, 2011 11:28 am

Re: Aligning equation in tabular cell

Post by mahmutuc »

Thank you very much
Post Reply