2

I have a table as shown below and the first column is too wide, as shown in the figure. I would like to make it less wide because as you can see there is not too much text in the cell. I think this behavior is due to the \multirow command, but I don't know how to fix it. Any idea?

enter image description here

Here is a minimal working example.

\documentclass[10pt]{article}

\usepackage[letterpaper]{geometry}

\usepackage{rotating}
\usepackage{multirow}

\begin{document}
\begin{table}[t]
\caption{Performance }
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|}
\cline{2-7}
\multicolumn{1}{c|}{}& $\alpha$ & 0 & 0.1 & 0.2 & 0.5 & 1\\ \cline{2-7}\hline
\multirow{4}{*}{
\begin{turn}{90}Case A\end{turn}
    }& KPI1  &  1234 & 1234  & 1234 & 1234 &  1234  \\\cline{2-7} 
& KPI2   & 1234  &  1234 & 1234 & 1234 & 1234  \\\cline{2-7}
& KPI3   &  1234 & 1234 & 1234 & 1234 & 1234  \\\cline{2-7}
& KPI4  & 1234  & 1234  & 1234 & 1234 & 1234  \\\hline\hline
\multirow{4}{*}{
\begin{turn}{90}Case B\end{turn}
    } & KPI1  &  1234 & 1234  & 1234 & 1234 &  1234  \\\cline{2-7} 
& KPI2   & 1234  &  1234 & 1234 & 1234 & 1234  \\\cline{2-7}
& KPI3   &  1234 & 1234 & 1234 & 1234 & 1234  \\\cline{2-7}
& KPI4  & 1234  & 1234  & 1234 & 1234 & 1234\\\hline
\end{tabular}
\end{center}
\end{table}
\end{document}

2 Answers 2

2

I suggest you use the \rotatebox macro instead of the turn environment. The result of this change is shown in the first table in the following screenshot.

I'd also like to encourage you to get rid of all vertical lines and to use fewer, but well-spaced horizontal lines in order to give the table a much more open "look" and to "invite" your readers to actually spend some time looking at the table. See the second table in the following screenshot.

enter image description here

\documentclass[10pt]{article}
\usepackage[letterpaper]{geometry}
\usepackage{graphicx,multirow,booktabs}
\usepackage[skip=0.333\baselineskip]{caption}
\begin{document}

\begin{table}[t]
\centering

\caption{Performance }
\begin{tabular}{|c|c|c|c|c|c|c|}
\cline{2-7}
\multicolumn{1}{c|}{}& $\alpha$ & 0 & 0.1 & 0.2 & 0.5 & 1\\ \cline{2-7}\hline
\multirow{4.3}{*}{\rotatebox{90}{Case A}}
& KPI1  & 1234  & 1234  & 1234 & 1234 & 1234  \\\cline{2-7} 
& KPI2  & 1234  & 1234  & 1234 & 1234 & 1234  \\\cline{2-7}
& KPI3  & 1234  & 1234  & 1234 & 1234 & 1234  \\\cline{2-7}
& KPI4  & 1234  & 1234  & 1234 & 1234 & 1234  \\\hline\hline
\multirow{4.3}{*}{\rotatebox{90}{Case B}} 
& KPI1  & 1234  & 1234  & 1234 & 1234 & 1234  \\\cline{2-7} 
& KPI2  & 1234  & 1234  & 1234 & 1234 & 1234  \\\cline{2-7}
& KPI3  & 1234  & 1234  & 1234 & 1234 & 1234  \\\cline{2-7}
& KPI4  & 1234  & 1234  & 1234 & 1234 & 1234  \\\hline
\end{tabular}

\bigskip
\caption{No vertical lines; fewer horizontal lines}
\begin{tabular}{@{}ccccccc@{}}
\toprule
& $\alpha$ & 0.0 & 0.1 & 0.2 & 0.5 & 1.0\\ 
\midrule
\multirow{4.3}{*}{\rotatebox{90}{Case A}}
& KPI1  & 1234  & 1234  & 1234 & 1234 & 1234  \\ 
& KPI2  & 1234  & 1234  & 1234 & 1234 & 1234  \\
& KPI3  & 1234  & 1234  & 1234 & 1234 & 1234  \\
& KPI4  & 1234  & 1234  & 1234 & 1234 & 1234  \\
\midrule
\multirow{4.3}{*}{\rotatebox{90}{Case B}} 
& KPI1  & 1234  & 1234  & 1234 & 1234 & 1234  \\ 
& KPI2  & 1234  & 1234  & 1234 & 1234 & 1234  \\
& KPI3  & 1234  & 1234  & 1234 & 1234 & 1234  \\
& KPI4  & 1234  & 1234  & 1234 & 1234 & 1234  \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
2
  • 1
    as usual -- a very neat table
    – js bibra
    Commented Jul 10, 2020 at 9:56
  • @jsbibra - Thanks!
    – Mico
    Commented Jul 10, 2020 at 9:58
1

enter image description here

just change---

\begin{tabular}{|@{}c@{}|c|c|c|c|c|c|}

EDIT

Optionally you could also use --

\begin{tabular}{|@{\hspace{-2pt}}c@{\hspace{-2pt}}|c|c|c|c|c|c|}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .