# Is it possible to create a table with two entries in one cell separated by 45 degree line? [duplicate]

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.

## marked as duplicate by egreg tables StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Aug 3 '14 at 19:54

• – Torbjørn T. Aug 3 '14 at 7:06
• You have the slashbox and diagbox packages for that. – Bernard Aug 3 '14 at 8:25

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

If you wants something like your image can try tikz.