I'm trying to create the following table. This is the code which I wrote.
\begin{table}[!htb]
\centering
\caption{"table1"}
\begin{tabular}{|c|c|c|c|c|c|c|c|}
System & \multicolumn{2}{c}{Interaction} & \multicolumn{2}{c}{Commit} & Ver & LOC & terms \\\hline \multirow{3}{c}{System1} & \multicolumn{2}{c}{3272 traces} & \multicolumn{2}{c}{5093 revisions} & \multirow{3}{c}{3.4} & \multirow{3}{c}{1700} & \multirow{3}{c}{2400} \\\hline
& File & Method & File & Method & & & \\\hline
& 12 & 13 & 14 & 15 & & & \\\hline
\end{tabular}
\end{table}
and this the error that Latex shows:! Missing number, treated as zero.!
Best Answer
The second argument for
\multirow
should be a length (representing the width to which the text is to be set) or*
to indicate that the text argument’s natural width is to be used.By the way, using vertical rules in tables might be frown upon. The
booktabs
package offers you features to increase the quality of your tables.Here's a version using
booktabs
(andcaption
); notice that (at least, in my opinion) the table looks better without the\multirows
: