2

I would like to produce a table in Latex that looks like the one below. Basically, I don't know how to not put a border around the first column.

enter image description here

2 Answers 2

2

I will assume that you're familiar with the basics of creating a table with a tabular environment.

Taking the example of a five-column table, you may achieve your formatting objective by (a) not specifying | to the left of the first column type specifier (here: c for centering) and (b) using \cline{2-5} instead of \hline.

enter image description here

\documentclass{article} % or some other suitable document class
\usepackage{array}
\setlength\extrarowheight{2pt} % optional, for a less-cramped "look"
\begin{document}

\begin{table}[ht]
\centering % horizontal centering inside text block
\begin{tabular}{c|c|c|c|c|}
\cline{2-5}
Alice   & Test 1 & Test 1 & Test 1 & Test 1 \\ \cline{2-5}
Cooper  & Test 2 & Test 2 & Test 2 & Test 2 \\ \cline{2-5}
Eric    & Test 3 & Test 3 & Test 3 & Test 3 \\ \cline{2-5}
Clapton & Test 4 & Test 4 & Test 4 & Test 4 \\ \cline{2-5}
\end{tabular}
\end{table}

\end{document}
1
  • Many thanks - perfect, it was the cline I didn't know about.
    – Gary Horan
    Commented Apr 30, 2023 at 2:28
2

Just to inform you for another possibilities how to write your table. By use of tabularray package he code for table is quite simple:

\documentclass{article} 
\usepackage{tabularray}

\begin{document}
    \begin{table}[ht]
\centering 
\begin{tblr}{hline{1-Z}={2-Z}{solid}, vline{2-Z}={1-Z}{solid},
             colspec={ccccc}
             }
Alice   & Test 1 & Test 1 & Test 1 & Test 1 \\ 
Cooper  & Test 2 & Test 2 & Test 2 & Test 2 \\
Eric    & Test 3 & Test 3 & Test 3 & Test 3 \\ 
Clapton & Test 4 & Test 4 & Test 4 & Test 4 \\ 
\end{tblr}
    \end{table}
\end{document}

enter image description here

2
  • Thanks @Zarko - that is another good solution.
    – Gary Horan
    Commented Apr 30, 2023 at 11:25
  • @GaryHoran, instead said "thanks", you can upvote answer :-)
    – Zarko
    Commented Apr 30, 2023 at 11:32

You must log in to answer this question.

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