This question already has an answer here:

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.


marked as duplicate by Martin Sleziak, Jonas Meyer, user147263, hardmath, draks ... Aug 27 '14 at 11:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


$$\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}$$


x & y \\\hline
-2 & -8\\\hline
-1 & -6.5\\\hline
0 & -5\\\hline
1 & -3.5\\\hline
2 & -2\\\hline
  • $\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$ – J. W. Perry Aug 25 '14 at 0:54
  • $\begingroup$ Any ideas on coloring the first row? $\endgroup$ – jdoicj Aug 25 '14 at 12:26
  • 2
    $\begingroup$ @boywholived: I try to avoid using colors. So no idea about that. $\endgroup$ – Asaf Karagila Aug 25 '14 at 12:29

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