3
$\begingroup$

Tables of numbers

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:

XY_style

Thank you very much.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Najib Idrissi Dec 18 '15 at 14:31
2
$\begingroup$

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .