How can I create a table in a question ? I have tried HTML but it does not seem to work.
$\begin{tabular}{ l c r } 1 & 2 & 3 \ 4 & 5 & 6 \ 7 & 8 & 9 \ \end{tabular}$
AapNoot$$ \begin{array}{lcr} 1 & 2 & 3 \ 4 & x^2 & 6 \ 7 & 8 & 9 \ \end{array} $$
How can I create a table in a question ? I have tried HTML but it does not seem to work.
$\begin{tabular}{ l c r } 1 & 2 & 3 \ 4 & 5 & 6 \ 7 & 8 & 9 \ \end{tabular}$
AapNoot$$ \begin{array}{lcr} 1 & 2 & 3 \ 4 & x^2 & 6 \ 7 & 8 & 9 \ \end{array} $$
I suggest you use a code block, and hand format the table, taking advantage of the fixed width font. This is very easy to copy.
one two
------------
1.0 2.1
2.3 4.6
If you need mathematics in the table, you can use something like this:
$$
\begin{array}{lcr}
1 & 2 & 3 \\
4 & x^2 & 6 \\
7 & 8 & 9 \\
\end{array}
$$
This can't be copied, so I don't really recommend it unless your table is really a matrix, or must contain formulae
Or you can just post an image. Again, this can't be copied, so use it only if you really need the formatting to show something, but no one will want to re-enter it.
ToExpression[string, TeXForm]
or ImportString[StringReplace[string, clean_up_rules]]
. That said, a code block is easier - and can be copied straight from a TableForm
output in Mma.
– Simon
Jan 28 '12 at 4:32