1

I've been trying to make a table using the \booktabs pagackage and following this model with some tweaks. However, the merged cells end up in the wrong column, namely the first column and not the third as I intend.

I'd appreciate your help! Working example is below:

\documentclass{article}
\usepackage{booktabs}
\newcommand{\head}[1]{\textnormal{\textbf{#1}}}
\begin{document}
\begin{tabular}{@{}*4l@{}}
    \toprule[1.5pt]
    \multicolumn{1}{c}{\head{Group}} & 
    \multicolumn{1}{c}{\head{1st round}} & 
    \multicolumn{2}{c}{\head{2nt round}}\\
    \head{New Interview Partners} & \head{Follow-Up Interviews} & \\
    \cmidrule(r){1-2}\cmidrule(l){3-3}
    Group 1 & 4 & 0 & 4\\
    Group 2 & 5 & 3 & 3\\
    Group 3 & 2 & 1 & 2 \\
    Total & 11 & 4 & 9 \\
    \bottomrule[1.5pt]
\end{tabular}
\end{document}

And here what it looks like when I compile: table showing merged cells under the wrong column

And this is a rough sketch of what it should look like (but in booktabs style): sketch of table as it should look like, namely with last column with merged cells

Thank you for your help!

deb
  • 13

1 Answers1

0

I have removed the & after \head{Follow-Up... and added & & in the beginning of this line. Also, I have split up the three words over two rows. Lastly, I have changed the use of \cmidrule and added a \midrule (as well as corrected the typo in the last column of the first row).

\documentclass{article}
\usepackage{booktabs}
\newcommand{\head}[1]{\textnormal{\textbf{#1}}}
\begin{document}
\begin{tabular}{@{}*4l@{}}
    \toprule[1.5pt]
    \multicolumn{1}{c}{\head{Group}} & 
    \multicolumn{1}{c}{\head{1st round}} & 
    \multicolumn{2}{c}{\head{2nd round}}\\
    \cmidrule(l){3-4}
   & & \head{New Interview } & \head{Follow-Up }  \\
   & & \head{Partners} & \head{Interviews}  \\
    \midrule
    Group 1 & 4 & 0 & 4\\
    Group 2 & 5 & 3 & 3\\
    Group 3 & 2 & 1 & 2 \\
    Total & 11 & 4 & 9 \\
    \bottomrule[1.5pt]
\end{tabular}

\end{document}

enter image description here

leandriis
  • 62,593
  • Wow, thank you! This worked perfectly! Cheers :) – deb Jun 17 '19 at 18:32
  • @deb: You're welcome. If you like my answer and it was helpful, please consider upvoting (by clicking on the arrows next to the score) and/or marking it as the accepted answer (by clicking on the checkmark ✓). – leandriis Jun 17 '19 at 18:38
  • 1
    Thanks for the tips, didn't know about that! Will upvote as soon as I get more reputation points. For now, marked as accepted answer – deb Jun 17 '19 at 19:00