[Tex/LaTex] span two rows but wrap the text in one row (!)

multirowtables

In the following table, the left most column should span two mini rows. As you can see although the text is wrapped, it is fit in the first mini row.

I want to wrap the text so that all two mini rows are occupied.

How can I fix that?

\documentclass{article}
\usepackage{array}
\begin{document}
  This is my table~\ref{t1}.

  \begin{table*}
    \centering
    \small
    \caption{my table}
    \label{t1}
    \begin{tabular}{ |>{\raggedright\centering\arraybackslash} p{2.5cm} |>{\raggedright\centering\arraybackslash} p{2.2cm} 
                     |>{\raggedright\centering\arraybackslash} p{1.3cm} |>{\raggedright\centering\arraybackslash} p  {1.3cm}
                     |>{\raggedright\centering\arraybackslash} p{1.3cm} |>{\raggedright\centering\arraybackslash} p{1.3cm} 
                     |>{\raggedright\centering\arraybackslash} p{1.3cm} |>{\raggedright\centering\arraybackslash} p{1.3cm} |}
        \cline{3-8}
        \multicolumn{2}{c|}{}                      & bench s1 & bench s2 & bench s3 & bench s4 & bench s5 & bench s6  \\ 
        \hline
        my\_method\_1 (degree 2)  &  coverage (\%) &   11.15  &  12.57   &  2.78    &   -17.74 &  11.52  &  8.97 \\
        \cline{2-8}
                                  &  memread (\%)  &   16.48  & 13.74    &  173.61  &   181.48 &  110.55 & 20.40  \\
        \hline
        my\_method\_2 (on miss)   &  coverage (\%) & 23.48    &  16.1    &  12.52   &   11.95  &  23.16  &  10.7  \\
        \cline{2-8}
                                  &  memread (\%)  & 44.55    &  60      &  52.91   &   55.32  &  36.58  &  52.19 \\
        \hline
    \end{tabular}
  \end{table*}    
\end{document}

enter image description here

Best Answer

You can use multirow package and do

\multirow{2}{2.2cm}{my\_method\_2 (on miss)}

for both the rows.

\documentclass{article}
\usepackage{array,multirow}
\begin{document}
  \begin{table}
    \centering
    \small
    \caption{my table}
    \label{t1}
    \begin{tabular}{ *{8}{|c}|}
        \cline{3-8}
        \multicolumn{2}{c|}{}                      & bench s1 & bench s2 & bench s3 & bench s4 & bench s5 & bench s6  \\
        \hline
       \multirow{2}{2.2cm}{\centering my\_method\_1 (degree 2)}  &  coverage (\%) &   11.15  &  12.57   &  2.78    &   -17.74 &  11.52  &  8.97 \\
        \cline{2-8}
                                  &  memread (\%)  &   16.48  & 13.74    &  173.61  &   181.48 &  110.55 & 20.40  \\
        \hline
        \multirow{2}{2.2cm}{\centering my\_method\_2 (on miss)}   &  coverage (\%) & 23.48    &  16.1    &  12.52   &   11.95  &  23.16  &  10.7  \\
        \cline{2-8}
                                  &  memread (\%)  & 44.55    &  60      &  52.91   &   55.32  &  36.58  &  52.19 \\
        \hline
    \end{tabular}
\end{table}
\end{document}