I am trying to build a table like this in Latex but I am new to this program and, even though I have read many blogs, I cannot understand how to build a table like this Thank you in advance for your time
2 Answers
your question is for sure duplicate ... but now I'm to lazy to find the same question here ;-). So, an example of use of multirow
package is:
\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{tabular}{|*{6}{l|} }
\hline
& & aaaa & bbbb & cccc & dddd \\
\hline
\multirow{3}{*}{LR}
& 1 & & & & \\ \cline{2-6}
& 2 & & & & \\ \cline{2-6}
& 2 & & & & \\
\hline
\multirow{3}{*}{SV}
& 1 & & & & \\ \cline{2-6}
& 2 & & & & \\ \cline{2-6}
& 2 & & & & \\
\hline
\end{tabular}
\end{document}
With {NiceTabular}
of nicematrix
, it's easy.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\begin{NiceTabular}{*{6}{l}}[hvlines]
& & aaaa & bbbb & cccc & dddd \\
\Block{3-1}{LR}
& 1 \\
& 2 \\
& 2 \\
\Block{3-1}{SV}
& 1 \\
& 2 \\
& 2 \\
\end{NiceTabular}
\end{document}