
여러 행 테이블에서 규칙을 제거하려고 합니다.
\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}
출력은 다음과 같습니다.
그러나 이 상단의 작은 불필요한 수직선(열과 ABC의 왼쪽 수직선)을 제거할 수 없습니다.
그래서 1행, 2행, 3행을 포착하는 수직선만 얻으려고 노력합니다.
어떤 아이디어가 있나요? 감사해요!
답변1
이와 같이;
\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}