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


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

\usepackage{array} % Improves `tabular` and `array` environments
\usepackage{pict2e} % Allows \linethickness{...} in diagonal lines
\usepackage{slashbox} % Defines \backslashbox{..}{..}
    \backslashbox{Group}{Name} & Henry & John \\ \hline
                G1             &   1   &  0   \\ \hline
                G2             &   1   &  1   \\ \hline

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.