这可能是一个愚蠢的问题,但是您将如何修改我的代码以便删除所指示的行的部分?
\documentclass[]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage{pgfplots}
\usepackage{caption}
\usepackage{multicol}
\usepackage{blkarray}
\usepackage{tikz}
\usepackage{amssymb}
\usetikzlibrary{patterns}
\usepackage{fancyhdr}
\usepackage{bigints}
\usepackage{color}
\usepackage{tcolorbox}
\usepackage{color,xcolor}
\usepackage{booktabs,array}
\usepackage{hyperref}
\usepackage{graphicx}
\usetikzlibrary{arrows}
\usepackage{polynom}
\usepackage{flexisym}
\usepackage{wallpaper}
\usepackage{blkarray}
\usepackage{caption}
\newenvironment{tightcenter}{
\setlength\topsep{0pt}
\setlength\parskip{0pt}
\begin{center}}{\end{center}}
\begin{document}
\begin{table}[htbp]
\begin{tabular}{lll|c|llll}
\multicolumn{3}{r}{\text{Group B}} & & \multicolumn{4}{r}{\text{Group A}}\\[0.124cm]
%\hline
& & 1 & 0 & & & & \\[0.024cm]
& 2 & 2 & 1 & 1 & 2 & 8 & \\[0.024cm]
7 & 5 & 3 & 2 & 2 & 3 & 9 & 4\\[0.024cm]
& 5 & 4 & 3 & 1 & 1 & 2 & 7\\[0.024cm]
& 2 & 5 & 4 & 4 & 6\\[0.024cm]
& & 2 & 5 & 1 & &\\[0.024cm]
& & & 6 & 2 & 4\\[0.024cm]
& & & 7 & 1 & \\[0.024cm]
%3 & 14 & 7 & 6\\
\end{tabular}
\centering
\caption*{$8|5$ means $8.5$ seconds}
\end{table}
\end{document}
答案1
只需在空单元格中添加\multicolumn
没有任何垂直线的即可。(我还剔除了许多这里不需要的包。)
\documentclass[]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage{amsmath}
\usepackage{caption}
\begin{document}
\begin{table}[htbp]
\begin{tabular}{lll|c|llll}
\multicolumn{3}{r}{\text{Group B}} & \multicolumn{1}{c}{} & \multicolumn{4}{r}{\text{Group A}}\\[0.124cm]
%\hline
& & 1 & 0 & & & & \\[0.024cm]
& 2 & 2 & 1 & 1 & 2 & 8 & \\[0.024cm]
7 & 5 & 3 & 2 & 2 & 3 & 9 & 4\\[0.024cm]
& 5 & 4 & 3 & 1 & 1 & 2 & 7\\[0.024cm]
& 2 & 5 & 4 & 4 & 6\\[0.024cm]
& & 2 & 5 & 1 & &\\[0.024cm]
& & & 6 & 2 & 4\\[0.024cm]
& & & 7 & 1 & \\[0.024cm]
%3 & 14 & 7 & 6\\
\end{tabular}
\centering
\caption*{$8|5$ means $8.5$ seconds}
\end{table}
\end{document}
答案2
如果用 替换,{tabular}
则只需输入密钥(根据设计, 中的规则不会绘制在所谓的“第一行”中)。{NiceTabular}
nicematrix
first-row
{NiceTabular}
\documentclass[]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage{nicematrix}
\usepackage{caption}
\begin{document}
\begin{table}[htbp]
\begin{NiceTabular}{lll|c|llll}[first-row]
\multicolumn{3}{r}{\text{Group B}} & & \multicolumn{4}{r}{\text{Group A}}\\[0.124cm]
%\hline
& & 1 & 0 & & & & \\[0.024cm]
& 2 & 2 & 1 & 1 & 2 & 8 & \\[0.024cm]
7 & 5 & 3 & 2 & 2 & 3 & 9 & 4\\[0.024cm]
& 5 & 4 & 3 & 1 & 1 & 2 & 7\\[0.024cm]
& 2 & 5 & 4 & 4 & 6\\[0.024cm]
& & 2 & 5 & 1 & &\\[0.024cm]
& & & 6 & 2 & 4\\[0.024cm]
& & & 7 & 1 & \\[0.024cm]
%3 & 14 & 7 & 6\\
\end{NiceTabular}
\centering
\caption*{$8|5$ means $8.5$ seconds}
\end{table}
\end{document}