align inside of tabular

When I enclose everything in paraphrases (like {\begin{align}.....\end{align}}) I'll get some other errors: "Missing \endgroup inserted." and multiple "Missing } inserted."

It works alright in the following examples.

Code

\documentclass[12pt,parskip=full]{scrbook}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage[pass,showframe]{geometry}
\begin{document}
\begin{tabular}{l|l|}
      A & B \\
        & {$\!\begin{aligned} % http://tex.stackexchange.com/q/98482/16595 
               A &= B \\    % http://tex.stackexchange.com/q/78788/16595
               C &= D \end{aligned}$}
\end{tabular}

\hrulefill

\begin{tabular}{l|p{5cm}|}
      A & B \\
        & {\begin{align}
               A &= B \\
               C &= D \end{align}}
\end{tabular}

\hrulefill 

\begin{tabularx}{\linewidth}{l|X|}
      A & B \\
        & {\begin{align}
               A &= B \\
               C &= D \end{align}}
\end{tabularx}
\end{document}

Output

enter image description here


An alternative to tabular is cals tables: enter image description here

\documentclass[12pt]{scrbook}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{cals}
\begin{document}

\begin{calstable}
\colwidths{{10mm}{40mm}}
\brow
\cell{A}
\cell{B}
\erow
\brow
\cell{}
\cell{
  \begin{align}
      A &= B \\
      C &= D
  \end{align}%
}
\erow
\end{calstable}
\end{document}

Tags:

Tables

Align