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

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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