[texhax] using align, array, eqnarry within tabular environment

Stephen Tucker brown_emu at yahoo.com
Thu Apr 9 09:47:26 CEST 2009


Hi list,

I have a question regarding the use of align, array, or eqnarray within a table created by tabular. Align works fine by itself, or within a minipage. For example:

===================================
\documentclass{article}
\usepackage{amsmath}
\begin{document}

 \begin{align*}
      x \protect & = y+1  \\
      z \protect & = 2 x
   \end{align*} 

\end{document}
===================================

However, the following (- align nested within tabular -) gives
! LaTeX Error: \begin{document} ended by \end{tabular}.
! Missing $ inserted.
and so on...
===================================
\documentclass{article}
\usepackage{amsmath}
\begin{document}
  \begin{tabular}{cc}
   \begin{minipage}{2in}
     \flushleft text
   \end{minipage} &
     \begin{align*}
       x & = y+1  \\
       z & = 2 x
   \end{align*} 
 \end{tabular}
 
\end{document}
==================================

Even if I try to put \protect in front of & and \\, it still has problems, and putting 
\protect{\begin{align*}...\end{align*}}
will put the statement on the next line rather than in the second column of the table, as I desire.

Does anyone know how to get around this behavior? Thanks very much in advance,

Stephen



      


More information about the texhax mailing list