0

I created a table using this code:

\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}

\begin{document}
\begin{table*}
\centering\ra{1.3}
\begin{tabular}{@{}rcccccc@{}}
\toprule &  \textit{Accuracy} & \phantom{abc}& \multicolumn{3}{c}{\textit{Time}} \\
\cmidrule{4-6} &&& $t=0$ & $t=1$ & $t=2$ 
\\ \midrule
$c$ & 9 && 1 & 1 & 3\\
$c$ & 9 && 1 & 1 & 3\\
$c$ & 9 && 1 & 1 & 3\\
\bottomrule
\end{tabular}
\caption{Caption}
\end{table*}

How can I align the heading "Accuracy" to middle of the row (the red text in the picture)?

enter image description here

1
  • Sorry, I'm trying to modify the code, here is the \ra code: \newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}
    – trminh89
    Jan 18 '16 at 14:40
0

One way is to use the multirow package and replace \textit{Accuracy} by \multirow{2}{*}[-3pt]{Accuracy} (args are: number of rows, width (* for natural width), fine tuning vertical position (optional), text).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.