2

This could be a silly question, but how would you modify my code so that the portion of the line indicated is removed?

Current output

  \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}
2

Just add a \multicolumn that does not have any vertical bar in the empty cell. (I also kicked out a lot of packages that are not needed here.)

\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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.