# Diagonal lines in table cell on mathjax

Is it possible to put a "x\y" style legend in one cell (maybe be made up of several cells) of a table? It would be great to make the 'x' slightly lower while the 'y' slight higher.

Please see the picture below for illustration:

Thank you very much.

• No, it is not possible. Maybe you can produce some hack to have something that looks similar, but MathJaX is not designed for this, and you're better off using a dedicated program to produce something like that. And in fact you probably need to consider very seriously whether it's indispensable to produce a table like that -- I honestly doubt it. – Najib Idrissi Dec 18 '15 at 14:31

Update. Changed \stackrel to \overset.

To get

\begin{array}{|c|c|c|c|} \hline x\overset{\LARGE\setminus}{\phantom{.}}\overset{\Large y}{\phantom{l}} & 1 & 2 & 3 \\ \hline 4 & 4 & 8 & 12 \\ \hline 5 & 5 & 10 & 15 \\ \hline \end{array}

insert $x\overset{\LARGE\setminus}{\phantom{.}}\overset{\Large y}{\phantom{l}}$ in the table top left corner, whose code is

x\overset{\LARGE\setminus}{\phantom{.}}\overset{\Large y}{\phantom{l}}.

The table code is

\begin{array}{|c|c|c|c|}
\hline
x\overset{\LARGE\setminus}{\phantom{.}}\overset{\Large y}{\phantom{l}}
& 1 & 2 & 3 \\
\hline
4 & 4 & 8 & 12 \\
\hline
5 & 5 & 10 & 15 \\
\hline
\end{array}

• It is a tricky answer, but It's better then nothing – 3SAT Dec 17 '15 at 22:03
• Just btw.: has stackrel advantages over overset ? – Gottfried Helms Dec 18 '15 at 11:01
• @GottfriedHelms No, I don't think so. In this respect I've adapted from a question and an answer from TEX.stackexchange. – Américo Tavares Dec 18 '15 at 11:18
• @GottfriedHelms \stackrel is obsolete, one should always use \overset and \underset, at least in LaTeX. Maybe in MathJaX they are implemented identically though. – Najib Idrissi Dec 18 '15 at 14:29
• @NajibIdrissi I've changed \stackrel to \overset. – Américo Tavares Dec 18 '15 at 18:26
• @Nehorai I've changed \stackrel to \overset. – Américo Tavares Dec 18 '15 at 18:30