[Tex/LaTex] Align in Multicolumn tabular

alignequationsmulticolumntables

I'm trying to write a table with two columns which is filled with align*-equations. But on one row, I'd like to put a single align*-eq spanning the whole tabular.
But somehow this won't work as intended.

Am minimal example would be something like this:

\begin{table}[H]
\centering
\begin{tabular}{p{7cm} | p{7cm} }
 Equation 1  & Equation 2\\ \hline
 \begin{align*}
     a^2+b^2 = c^2
 \end{align*}
 &
 \begin{align*}
     E=m\cdot c^2
 \end{align*}\\ \hline
 \multicolumn{2}{c}{
 \begin{align*}
    R=\dfrac{U}{I}
 \end{align*} }\\ \hline
\end{tabular}

\end{table}

If I comment out the multicolumn-part it compiles just fine.
I'm thankful for any help.

Kind regards.

Best Answer

I would use short displayskips in a table. So I define a newcolumn type which incorporates them:

\documentclass{article}

\usepackage[margin=2.3cm, showframe]{geometry} %
\usepackage{amsmath}

\usepackage{enumitem, etoolbox, tabularx, makecell, booktabs, float, nccmath}
\newcolumntype{P}[1]{>{\abovedisplayskip=\abovedisplayshortskip \belowdisplayskip=\belowdisplayshortskip}p{#1}}

\begin{document}

\begin{table}[H]
  \centering
  \begin{tabular}{P{7cm} |P{7cm} }
    Equation 1 & Equation 2 \\ \hline
    \begin{align*}
      a²+b² = c²
    \end{align*}
               &
    \begin{align*}
      E=m · c²
    \end{align*} \\ \hline
    \multicolumn{2}{P{\dimexpr14cm + 2\tabcolsep}}{
      \begin{align*}
        R=\dfrac{U}{I}
      \end{align*} } \\ \hline
  \end{tabular}
\end{table}

\end{document} 

enter image description here

Related Question