Reputation: 309
My Latex tabular looks like this
\begin{table}
\centering
\begin{tabular}{clll}
\toprule
\multirow{2}*{Name} & \multirow{2}*{Description} & \multicolumn{2}{c}
{Time} \\
\cline{3-4}
& & Item1 & Item2 \\
\midrule
App1 & Good & 1000ms & 1000ms \\
\bottomrule
\end{tabular}
\end{table}
I wonder how can I make Item1
and Item2
in the above table vertically-centered. Thank you!
Upvotes: 1
Views: 3877
Reputation: 1137
You can use the command \cmidrule{3-4}
: it is equivalent to \cline{3-4}
, but it improves the looking of the table.
\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{table}
\begin{center}
\begin{tabular}{clll}
\toprule
\multirow{2}*{Name} & \multirow{2}*{Description} & \multicolumn{2}{c} {Time} \\
\cmidrule{3-4}
& & Item1 & Item2 \\
\midrule
App1 & Good & 1000ms & 1000ms \\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\end{document}
Upvotes: 2