# Backslash in tables: end in corner

Is it possible to end the backslash in the left upper corner of the table?

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\begin{document}
\begin{table}
\centering
\begin{tabular}{c|cc}
$c\backslash a$&0&1\\\hline
0&&\\
1&&\\
\end{tabular}
\end{table}
\end{document}

• do the answers here: tex.stackexchange.com/questions/17745/… solve your problem? – Nico Boni Aug 16 '16 at 10:10
• So there is no solution without using TikZ? – user112042 Aug 16 '16 at 10:44
• You could use the makecell package. I think an example is already provided in one of the older answers. Take a look to tex.stackexchange.com/questions/7262/… for even another approach – Nico Boni Aug 16 '16 at 10:46
• IIRC there's the diagbox package… – clemens Aug 16 '16 at 11:07
• Your link give a possibility using the slashbox package. But if I do this, I get the error 'slachbox.sty not found'. Can you maybe post a little example using makecell or diagbox? – user112042 Aug 16 '16 at 11:10

Here it is:

\documentclass{scrartcl}
\usepackage{makecell}
\begin{document}
\begin{table}
\centering
\begin{tabular}{c|cc}

{b}{a}&
0&1\\\hline

0&&\\
1&&\\
\end{tabular}
\end{table}
\end{document}


syntax is: \diaghead(H ratio,V ratio){Text set for column widthi}{First head}{Second head} (makecell manual section 7)

(TikZ solutions look much better in my opinion)

• What is H ratio,V ratio meaning? Unclear. – pzorba75 Aug 16 '16 at 15:25
• @pzorba75 It changes the orientation of the diagonal line. Just try with different values or check the manual – Nico Boni Aug 16 '16 at 15:29