2

I’m trying to remove a rule from my multirow table:

\begin{table}[ht]
\centering
\begin{tabular}{@{}cl|cll@{}}
 & & \multicolumn{3}{c}{\textsc{Columns}} \\
 & & A & B & C \\ \cmidrule(l){3-5} 
\multirow{3}{*}{\rotatebox[origin=c]{90}{\textsc{Rows}}}
    & 1 & A1 & B1 & C1 \\
    & 2 & A2 & B2 & C2 \\
    & 3 & A3 & B3 & C3 \\
\end{tabular}
\caption{Caption}
\label{tab:my-table}
\end{table}

The output looks like so:

enter image description here

However, I’m unable to remove this top small unnecessary vertical line (the vertical line left of Columns and A B C).

So I only try to achieve a vertical line that captures the Rows 1, 2, and 3.

Any ideas? thanks!

1 Answer 1

2

Like this;

enter image description here

\documentclass{article}

\usepackage{booktabs, multirow}
\usepackage{graphicx}

\begin{document}
    \begin{table}[ht]
    \centering
\begin{tabular}{ cl|cll}
\multicolumn{2}{c}{} % remove vertical lines in this cell
        & \multicolumn{3}{c}{\textsc{Columns}}  \\
\multicolumn{2}{c}{} % remove vertical lines in this cell
        &   A   &   B   &   C                   \\ 
    \cmidrule(l){3-5}
\multirow{3}{*}{\rotatebox[origin=c]{90}{\textsc{Rows}}}
    & 1 & A1 & B1 & C1 \\
    & 2 & A2 & B2 & C2 \\
    & 3 & A3 & B3 & C3 \\
\end{tabular}
    \caption{Caption}
    \label{tab:my-table}
\end{table}
\end{document}
1
  • Nicely done! Thank you!
    – Kalaschnik
    Dec 24, 2019 at 13:55

You must log in to answer this question.

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