# Using \\ in environments inside the \begin{tabularx}

I have the following code:

\begin{table}[h]
\begin{tabularx}{0.75\textwidth}{ m{4cm}  X }
& \textbf{Derivations} \\
$v=v_0+at$              & line 1\hrule \\
$x=x_0+v_0t+½at^2$      & \begin{align*}
v=&equation 1 \\
=&equation 2 \\
=&equation 3
\end{align*} \hrule \\
$v^2-v_0^2=2a(x-x_0)$   & line 3 \hrule \\
$x-x_0=½t(v_0-v)$       & line 4
\end{tabularx}
\end{table}

The tabularx environment allows further sub-environments like the \begin{align*}.... I use the align* environment to make line breaks between equations and have them aligned along the equal-signs.

The problem is now that I use \\ to make the equation line breaks inside this sub-environment. Apparently the tabularx environment still detects this and responds to it. Since \\ is already a signal for the end-of-row for the table, this is not tolerated.

How can I get around this? Is there another method that I can use for the same purpose (multiple aligned equation lines) where this \\ can be avoided?

• what about \par and \newline – touhami May 1 '15 at 15:46
• @touhami I have to use \ for the linebreak in that environment. – Steeven May 1 '15 at 15:56

I think this has come up before, it's a "feature" of amsmath, but you can hide the environment in {}

\documentclass{article}
\usepackage{amsmath,tabularx}
\begin{document}

\begin{table}[htp]% never just [h]
\begin{tabularx}{0.75\textwidth}{ m{4cm}  X }
& \textbf{Derivations} \\
$v=v_0+at$              & line 1\hrule \\
$x=x_0+v_0t+½at^2$      & {\begin{align*}
v=&equation 1 \\
=&equation 2 \\
=&equation 3
\end{align*}} \hrule \\
$v^2-v_0^2=2a(x-x_0)$   & line 3 \hrule \\
$x-x_0=½t(v_0-v)$       & line 4
\end{tabularx}
\end{table}

\end{document}