I am using cmidrule as I have used it before, but it's giving me strange errors. Below the MWE reproduces them. What is going on?
\documentclass{beamer}
\usepackage{booktabs}
\usepackage{multicol}
\usepackage{multirow}
\begin{document}
\begin{frame}{MWE}
\begin{table}[tbh!]
\centering
\footnotesize
\begin{tabular}{lccccccc}
\toprule
& \multicolumn{3}{c}{(1)} && \multicolumn{3}{c}{(2)} \\
& \multicolumn{3}{c}{\textbf{OUTCOME}} && \multicolumn{3}{c}{\textbf{OUTCOME}} \\
& \cmidrule{2-4} \cmidrule{6-8} \\
& I & II & III && I & II & III \\
\midrule
\bottomrule
\end{tabular}
\end{table}
\end{frame}
\end{document}
Best Answer
The line
contains a syntax error (
&
) and a typographical error (\\
).There also seems to be no need for 8 columns when 6 will do just fine. For visual balance, I'd also omit the bold-facing of some of the header cells. Since we're dealing with a
beamer
document, there's no point in using atable
float to encase the tabular material. To finish things off, here's an excerpt from section 2 of the user guide of thebooktabs
package (emphasis added by me):Thus, use either
\midrule
or\bottomrule
, but not both.Here's how I would be tempted to reconfigure your table -- note the absence of whitespace padding on the left- and right-hand sides.