0

I have a table with some data. At the bottom, I would like to include two sets of aligned equations.

I can do this as follows:

\documentclass{report}
\usepackage{amsmath}
\begin{document}

 \begin{table}
  \centering
    \begin{tabular}{l c c}
        \textbf{Column 1}   & \textbf{Column 2} & \textbf{Column 3} \\
        Row 1           & 1                 & 4 \\
        Row 2           & 2                 & 5 \\
        Row 3           & 3                 & 6 \\
      $\begin{aligned}
      a &=   5 \\
      b &=   7 \\
      c &=   9 \\
      \end{aligned}$ 
      &
      $\begin{aligned}
      d &=   3 \\
      e &=   3 \\
      f &=   3 \\
      \end{aligned}$ \\
    \end{tabular}
\end{table}

\end{document}

However, the output is that the equations are left justified. I would like to centre them across the width of the table.

I have tried using the \multicolumn feature but that throws an error:

Missing } inserted

\documentclass{report}
\usepackage{amsmath}

\begin{document}

 \begin{table}
  \centering
    \begin{tabular}{l c c}
        \textbf{Column 1}   & \textbf{Column 2} & \textbf{Column 3} \\
        Row 1           & 1                 & 4 \\
        Row 2           & 2                 & 5 \\
        Row 3           & 3                 & 6 \\
    \multicolumn{3}{c}{
      $\begin{aligned}
      a &=   5 \\
      b &=   7 \\
      c &=   9 \\
      \end{aligned}$ 
      &
      $\begin{aligned}
      d &=   3 \\
      e &=   3 \\
      f &=   3 \\
      \end{aligned}$ \\
      }
    \end{tabular}
\end{table}

\end{document}

The error seems to be related to \multicolumn and the use of }, but I can't resolve by inserting or removing them (it also doesn't make sense as there appear to be the correct number of curly braces).

1 Answer 1

2

Here is a code that compile :

\documentclass{report}
\usepackage{amsmath}

\begin{document}

 \begin{table}
  \centering
    \begin{tabular}{l c c}
        \textbf{Column 1}   & \textbf{Column 2} & \textbf{Column 3} \\
        Row 1           & 1                 & 4 \\
        Row 2           & 2                 & 5 \\
        Row 3           & 3                 & 6 \\
    \multicolumn{3}{c}{
      $\begin{aligned}
      a &=   5 \\
      b &=   7 \\
      c &=   9 \\
      \end{aligned}$ 

      $\begin{aligned}
      d &=   3 \\
      e &=   3 \\
      f &=   3 \\
      \end{aligned}$ 
      } \\
    \end{tabular}
\end{table}

\end{document}

The problems where :

  1. A & between the two aligned environment, even if they were in the same column
  2. The last \\ was placed inside the multicolumn environment, but it needs to be placed outside of it...

I hope it may help.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .