Graphics, Figures & Tables/begin{align} in tabular

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
nico
Posts: 20
Joined: Tue Jun 08, 2010 10:13 am

/begin{align} in tabular

Post by nico »

Hi,

i'm trying to use the align-environment in a tabular.

Code: Select all

\documentclass[10pt,a4paper]{scrartcl}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{\textwidth}{XX}
	\begin{minipage}{\textwidth}
	\begin{align*}
		 x & = y \\
		 u & = i 	\\
		 l & = c } 
	\end{align*}
	\end{minipage}	&	\\
\end{tabularx}
\end{document}
I get several errors with this. Could you help me?
Last edited by nico on Tue Jul 20, 2010 5:50 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.

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

/begin{align} in tabular

Post by Stefan Kottwitz »

Hi nico!
  • align belongs to the package amsmath, load it:

    Code: Select all

    \usepackage{amsmath}
  • check this line:

    Code: Select all

    l & = c }
    There's no matching opening brace.
  • align may cause problems in tables, the aligned environment could work with less problems.
Stefan
LaTeX.org admin
nico
Posts: 20
Joined: Tue Jun 08, 2010 10:13 am

/begin{align} in tabular

Post by nico »

Thank you, Stefan!!

The brake was a mistake on deleting the real content.

I got it working this way now:

Code: Select all

\documentclass[10pt,a4paper]{scrartcl}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{\textwidth}{XX}
   \begin{minipage}{\textwidth}
   \( \begin{aligned}
       x & = y \\
       u & = i    \\
       l & = c 
   \end{aligned} \)
   \end{minipage}   &   \\
\end{tabularx}
\end{document}
Post Reply