3

Following multirow array insertion in a tabular cell (code below) produces the error: Missing $ inserted

\begin{tabular}{ | c || c | c| c |}
 \hline
 A & B & C & D \\
 \hline
 conv1 & $112\times112$ &\multicolumn{2}{c|}{7x7, 64, stride 2} \\
 \hline
 \multirow{5}{*}{conv2\textunderscore x} & \multirow{5}{*}{$56\times56$}  & \multicolumn{2}{c|}{3x3 maxpool, stride 2} \\
 \cline{3-4}
  &      &    \multirow{4}{*}{\[\left \{ \begin{array}{c} 1\times1, 64 \\ 3\times3, 64\\
  1\times1, 256 \end{array} \right \} \times3 \] }  &  \\
    &      &    & \\
    &      &   & \\
    &      &   & \\
 \hline
\end{tabular}

The problem comes at the \multirow{4}{*}{... part.

ERROR MESSAGE:

<inserted text> 
                $
l.331 ...1, 256 \end{array} \right \} \times3 \] }
                                                    &  \\
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.

The fact is, that the compiler renders the very table I want to see, so I don't understand why the error comes out. Moreover, I do not see where should an $ come in place, since it is an array, so math mode should be on. If I put the expressions inside the array in brackets, no improvement is shown.

I've been dealing with this issue for a while, so any help will be great! Thanks all.

2 Answers 2

3

You cannot have a displayed formula with \[ ...\] inside multirow:

\begin{tabular}{ | c || c | c| c |}\hline
    A & B & C & D \\\hline
    conv1 & $112\times112$ &\multicolumn{2}{c|}{7x7, 64, stride 2} \\
    \hline
    \multirow{5}{*}{conv2\textunderscore x} & \multirow{5}{*}{$56\times56$}  & 
        \multicolumn{2}{c|}{3x3 maxpool, stride 2} \\\cline{3-4}    &      &    \multirow{4}{*}{$\left \{ 
        \begin{array}{c} 1\times1, 64 \\ 3\times3, 64\\
        1\times1, 256 \end{array} \right \} \times3 $ }  &  \\
    &      &    & \\
    &      &   & \\
    &      &   & \\\hline
\end{tabular}

enter image description here

1

inline math instead of equation:

\documentclass{article}

\usepackage{multirow}
\usepackage{mathtools}

\begin{document}

\begin{tabular}{ | c || c | c| c |}
 \hline
 A & B & C & D \\
 \hline
 conv1 & $112\times112$ &\multicolumn{2}{c|}{7x7, 64, stride 2} \\
 \hline
 \multirow{5}{*}{conv2\textunderscore x} & \multirow{5}{*}{$56\times56$}  & \multicolumn{2}{c|}{3x3 maxpool, stride 2} \\
 \cline{3-4}
  &      &    \multirow{4}{*}{$\displaystyle\left \{ \begin{array}{c} 1\times1, 64 \\ 3\times3, 64\\
  1\times1, 256 \end{array} \right \} \times3 $ }  &  \\
    &      &    & \\
    &      &   & \\
    &      &   & \\
 \hline
\end{tabular}

\end{document}

You must log in to answer this question.

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