\documentclass{article}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{
vline{2-Z}={2-Z}{solid},
colspec={Q[$,r]*{2}{Q[$,c]}}
}
& C & D \\ \cline{2-Z}
C & 2,2 & 0,3 \\ \cline{2-Z}
D & 3,0 & 1,1 \\ \cline{2-Z}
\end{tblr}
\vspace{1cm}
\begin{tblr}{
vline{3-Z}={3-Z}{solid},
colspec={Q[$,r]*{2}{Q[$,c]}}
}
& & \SetCell[c=2]{c} \mbox{Player II} & \\
& & C & D \\ \cline{3-Z}
\SetCell[r=2]{m,c} \mbox{Player I} &
C & 2,2 & 0,3 \\ \cline{3-Z}
& D & 3,0 & 1,1 \\ \cline{3-Z}
\end{tblr}
\end{document}
표의 body를 가능한 깔끔하게 유지하기 위해서 (\SetCell 대신) key-value를 써서 그릴 수도 있음.
\documentclass{article}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{
vline{2-Z}={2-Z}{solid},
hline{2-Z}={2-Z}{solid},
colspec={Q[$,r]*{2}{Q[$,c]}}
}
& C & D \\
C & 2,2 & 0,3 \\
D & 3,0 & 1,1 \\
\end{tblr}
\vspace{1cm}
\begin{tblr}{
vline{3-Z}={3-Z}{solid},
hline{3-Z}={3-Z}{solid},
colspec={Q[r]Q[$,c]*{2}{Q[$,c]}},
% for players
cell{3}{1}={c=1,r=2}{mode=text}, % for Player I
cell{1}{3}={r=1,c=2}{mode=text}, % for Player II
}
& & Player II & \\
& & C & D \\
Player I & C & 2,2 & 0,3 \\
& D & 3,0 & 1,1 \\
\end{tblr}
\end{document}
요즘 대세인 tabularray로 그리기:
표의 body를 가능한 깔끔하게 유지하기 위해서 (\SetCell 대신) key-value를 써서 그릴 수도 있음.