[Tex/LaTex] difficulty formatting with multirow and multicolumn

makecellmulticolumnmultirow

I've created a table that (I think) needs \makecell{}, \multirow{}, and multicolumn{} to be displayed properly. The issue is that the spatial arrangement of my elements is not so great.

  • The lower and upper subheadings (columns 5 & 6) are not aligned properly.
  • Columns 1-4 are not placed sensibly (centered or bottom aligned would work).
  • I have to use a hack (\B) to space my \hline so that it does not overlap text of columns 3 & 4.

Any advice On what I might be doing wrong or a better approach (apologies for the single use nature of the question)?

\documentclass{article}
\usepackage{makecell, multirow, ctable}

\newcommand\B{\rule[-2.5ex]{0pt}{0pt}}

\begin{document}

\begin{table}[h]
\centering
\caption{title}
\small
\begin{tabular}{cccccc}

\specialrule{.2em}{.1em}{.1em} 
\multirow{2}{*}{Condition} & \multirow{2}{*}{\textit{N}} & \multirow{2}{*}{\makecell{Mean Proportion \\ Taxonomic  \\ Responses}} & \multirow{2}{*}{\makecell{Taxonomic \\ Responding Exact \\ Binomial Test \textit{p}}} & \multicolumn{2}{c}{\makecell{95\% Binomial \\ Confidence Intervals}} \\
\cline{5-6}
& & & & Lower & Upper \B \\ 
\hline
Alien & \textit{n} = 65 & .74 & \\ 
Alike & \textit{n} = 63 & .68 & \\
Similar & \textit{n} = 50 & .68 & \\
No Reminder & \textit{n} = 59 & .40 & \\
\hline
\end{tabular}
\label{table:e1rt}
\end{table}

\end{document}

enter image description here

Best Answer

Some improvements with booktabs and code simplification with \multirowcell command, since you load makecell:

\documentclass{article}
\usepackage{array}
\usepackage{makecell, multirow, booktabs}
\usepackage{caption}

\begin{document}

\begin{table}[h]
    \centering
    \caption{title}
    \footnotesize\setlength{\extrarowheight}{2pt}
    \begin{tabular}{c>{$}c<{$}cccc}
        \toprule
        \multirowcell{3}[-1pt]{Condition} & \multirowcell{3}[-1pt]{$N$} & \multirowcell{3}[-1pt]{Mean Proportion \\ Taxonomic \\ Responses}& \multirowcell{3}[-1pt]{Taxonomic \\\strut Responding Exact \\ Binomial Test $p$} & \multicolumn{2}{c}{\makecell{95\% Binomial \\ Confidence Intervals}} \\
        \cmidrule(lr){5-6}
        & & & & \multicolumn{1}{c}{Lower} & \multicolumn{1}{c}{Upper} \\
        \midrule
        Alien & n = 65 & .74 & \\
        Alike & n = 63 & .68 & \\
        Similar & n = 50 & .68 & \\
        No Reminder & n = 59 & .40 & \\
        \bottomrule
    \end{tabular}
    \label{table:e1rt}
\end{table}

\end{document} 

enter image description here