1
$\begingroup$

Is it possible to do a simple x-y table in MathJax for Math StackExchange questions? Something like this:

enter image description here

I admit it would probably be a waste of time for most questions, but I'm sure it could have some applications.

$\endgroup$
1

1 Answer 1

5
$\begingroup$

$$\begin{array}{|c|c|} \hline x & y \\\hline -2 & -8\\\hline -1 & -6.5\\\hline 0 & -5\\\hline 1 & -3.5\\\hline 2 & -2\\\hline \end{array}$$

Code:

$$\begin{array}{|c|c|}
\hline
x & y \\\hline
-2 & -8\\\hline
-1 & -6.5\\\hline
0 & -5\\\hline
1 & -3.5\\\hline
2 & -2\\\hline
\end{array}$$
$\endgroup$
3
  • $\begingroup$ @Zack: As a purely cosmetic note, replacing |c|c| with |r|l| in this markup duplicates the alignment in your image. There are many other options as you might imagine. $\endgroup$ Aug 25, 2014 at 0:54
  • $\begingroup$ Any ideas on coloring the first row? $\endgroup$
    – hrkrshnn
    Aug 25, 2014 at 12:26
  • 2
    $\begingroup$ @boywholived: I try to avoid using colors. So no idea about that. $\endgroup$
    – Asaf Karagila Mod
    Aug 25, 2014 at 12:29

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