My following Latex code generated the table as shown in the image. I want the top, bottom and midrule to extend until the margin. Since I use resize option, the table is resized but not the rules. Without changing the existing code much, I would like to know how can I draw the rules, such that the table fits within the margin.
\newcommand\mcc[1]{\multicolumn{2}{>{\Centering}p{2.9cm}}{#1}}
\begin{table*}
% \centering
\setlength\tabcolsep{3pt}
\caption{Performance Summary}
\resizebox{0.73\textwidth}{!}{
\begin{tabularx}
{\textwidth}{@{}l *{8}{p{1.45cm}<{\centering}}@{}}
\toprule
Methodology Details & \mcc{Output prediction accuracy} & \mcc{Parameter estimation accuracy} & \mcc{Training time} & \mcc{Parameter count}\\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7} \cmidrule(lr){8-9}
& Sim. & Meas. & Sim. & Meas. & Sim. & Meas. & Sim. & Meas. \\
\midrule
Method 1 & \textcolor{purple}{$\approx$} & \textcolor{green}{\checkmark} & \textcolor{green}{\checkmark} & \textcolor{green}{\checkmark} & \textcolor{green}{\checkmark} & \textcolor{green}{\checkmark} & \textcolor{red}{$\times$} & \textcolor{red}{$\times$} \\
Method 2 & \textcolor{purple}{$\approx$} & \textcolor{green}{\checkmark} & \textcolor{green}{\checkmark} & \textcolor{green}{\checkmark} & \textcolor{green}{\checkmark} & \textcolor{green}{\checkmark} & \textcolor{purple}{$\approx$} & \textcolor{red}{$\times$} \\
\bottomrule
\end{tabularx}
}
\noindent\parbox{\textwidth}{
\vspace{1mm}
{\footnotesize
Legend (compared to baseline):
\textcolor{green}{\checkmark} = better,
\textcolor{purple}{$\approx$} = approximately equal,
\textcolor{red}{$\times$} = worse,
-- = not applicable.}
}
\end{table*}
X
column if you use tabularx. And don't scale elements which contain text, choose a suitable font size instead of change the table layout.\resizebox{0.73\textwidth}{!}{
(never scale tables that way) and use\tabularx{\textwidth}
so the rules are full width.p{1.45cm}<{\centering}
isn't right. Try>{\centering\arraybackslash}p{1.45cm}
instead. Better still, use>{\centering\arraybackslash}X
.