Tables – Steps to Reproduce a Simple Table

tables

How can I reproduce this table using Latex?

enter image description here

Best Answer

The idea is to use a combination of \multicolumn command (to add vertical lines in the table) together with the \cline command (to add horizontal lines):

\documentclass{article}
\usepackage{multirow}

\begin{document}

 \begin{tabular}{ c c c c }
    & & \multicolumn{2}{c}{Giocatore 2} \\ 
    & &  Sinistra & Centro \\ \cline{3-4}
    \multirow{2}{*}{Giocatore 1} & Su & \multicolumn{1}{|c|}{1, 0} & \multicolumn{1}{|c|}{1, 2} \\ \cline{3-4}
    & Giu &  \multicolumn{1}{|c|}{0, 3}  & \multicolumn{1}{|c|}{0, 1}\\ \cline{3-4}
\end{tabular}

\end{document}

The code produces the following table:

enter image description here

This Overleaf link is extremely useful when dealing with LaTex table formatting: https://www.overleaf.com/learn/latex/Tables

Related Question