Do LaTeX Tables Display Correctly in Forum Posts?

  • Context: LaTeX 
  • Thread starter Thread starter Stephen Tashi
  • Start date Start date
  • Tags Tags
    Forum Latex
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 3K views
Do LaTex tables work in forum posts? I've never used them before. Today I tried copying several examples from pages on the web such as:

[tex] \begin{tabular}{ l c r }<br /> 1 & 2 & 3 \\<br /> 4 & 5 & 6 \\<br /> 7 & 8 & 9 \\<br /> \end{tabular}[/tex]

which on my browser doesn't show up as a table. I tried using math renderers HTML-CSS and SVG.
I don't see any syntax error in that example, but, as I said, I've never tried to write tables in LaTex before.
 
Physics news on Phys.org
Stephen Tashi said:
Do LaTex tables work in forum posts? I've never used them before. Today I tried copying several examples from pages on the web such as:

[tex] \begin{tabular}{ l c r }<br /> 1 & 2 & 3 \\<br /> 4 & 5 & 6 \\<br /> 7 & 8 & 9 \\<br /> \end{tabular}[/tex]

which on my browser doesn't show up as a table. I tried using math renderers HTML-CSS and SVG.
I don't see any syntax error in that example, but, as I said, I've never tried to write tables in LaTex before.

That syntax is fine for a LaTeX document. I'm no expert on this, but I think "tabular" is an environment variable, and they aren't generally supported here.

Disclaimer: Someone who knows what they are talking about may correct me.
 
On PF (and presumably any MathJax application) your input is interpreted in LaTex "math mode", as if it were between ##\$ \dots \$## or ##\$\$ \dots \$\$## in "standard" LaTeX.

So you can't use environments like "tabular" that are meant to be used outside of math mode.
 
Stephen Tashi said:
Do LaTex tables work in forum posts? I've never used them before. Today I tried copying several examples from pages on the web such as:

[tex] \begin{tabular}{ l c r }<br /> 1 & 2 & 3 \\<br /> 4 & 5 & 6 \\<br /> 7 & 8 & 9 \\<br /> \end{tabular}[/tex]

which on my browser doesn't show up as a table. I tried using math renderers HTML-CSS and SVG.
I don't see any syntax error in that example, but, as I said, I've never tried to write tables in LaTex before.
Consulting our LaTeX FAQ, you can get the effect you want via
Code:
\begin{array}{| l | c | r |}
\hline
  1 & 2 & 3 \\
\hline
  4 & 5 & 6 \\
\hline
  7 & 8 & 9 \\
\hline
\end{array}
[tex] \begin{array}{| l | c | r |}<br /> \hline<br /> 1 & 2 & 3 \\<br /> \hline<br /> 4 & 5 & 6 \\<br /> \hline<br /> 7 & 8 & 9 \\<br /> \hline<br /> \end{array}[/tex]