删除 TAB 中表格左上角单元格的边框

删除 TAB 中表格左上角单元格的边框

我正在使用 TAB 环境,我需要删除表格左上角单元格的边框,我使用了针对tabular环境推荐的解决方案,但没有效果。

附言:我宁愿不变成tabular,而坚持下去TAB

% \usepackage[thinlines]{easytable}
\begin{table}[htbp] 
\begin{TAB}(c,1cm,1cm)[10pt]{|c|c|c|c|}{|c|c|c|c|}
& Mathematics (M) & Physics (P)   & Language (L)\\
Student A & 16    & 16    & B  \\ 
Student B & 18    & 18    & C \\
Student C & 16    & 15    & B \\
\end{TAB}
\end{table}

答案1

这里有几个解决方案,一个是TAB环境解决方案,一个是普通解决方案tabular

\documentclass{article}
\usepackage{geometry}
\usepackage[thinlines]{easytable}
\usepackage{array}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\newcommand{\myrule}{\rule[-.4cm]{0pt}{1.05cm}}

\usepackage{caption}

\begin{document}
\begin{table}[htbp]\centering
\caption{With TAB and some hacking, but the solution is not perfect}
\begin{tabular}{@{}c@{}c@{}}
\begin{TAB}(c,3.4cm,1.4cm)[10pt]{|c}{|c|c|c|}
Student A \\ 
Student B \\
Student C \\
\end{TAB}&
\begin{TAB}(c,3.4cm,1.4cm)[10pt]{|c|c|c|}{|c|c|c|c|}
Mathematics (M) & Physics (P)   & Language (L)\\
 16    & 16    & B  \\ 
 18    & 18    & C \\
 16    & 15    & B \\
\end{TAB}
\end{tabular}
\end{table}

\begin{table}[htbp]\centering
\caption{Much better with a \texttt{tabular}}
\begin{tabular}{|*4{M{3cm}|}}
\cline{2-4}
\multicolumn{1}{c|}{\myrule}& Mathematics (M) & Physics (P)   & Language (L)\\
\hline
\myrule Student A & 16    & 16    & B  \\ 
\hline
\myrule Student B & 18    & 18    & C \\
\hline
\myrule Student C & 16    & 15    & B \\
\hline
\end{tabular}
\end{table}
\end{document}

在此处输入图片描述

相关内容