4

I want to create a table like the below picture in LaTeX. Does anyone tried this before? Can you introduce how to create such a table?

The problem is that I don't know to how create the slash line separating "Name" and "Group" fields.

enter image description here

2

If you don't need cells strictly squares you can try

\documentclass[border=2mm]{standalone}
\usepackage{array} % Improves `tabular` and `array` environments
\usepackage{pict2e} % Allows \linethickness{...} in diagonal lines
\usepackage{slashbox} % Defines \backslashbox{..}{..}
\begin{document}
\linethickness{1pt}
\setlength{\arrayrulewidth}{1pt}
\begin{tabular}{|c|c|c|}
    \hline
    \backslashbox{Group}{Name} & Henry & John \\ \hline
                G1             &   1   &  0   \\ \hline
                G2             &   1   &  1   \\ \hline
\end{tabular} 
\end{document}

And you gets

enter image description here

If you wants something like your image can try tikz.

| improve this answer | |

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