Do LaTeX Tables Display Correctly in Forum Posts?

  • Context: LaTeX 
  • Thread starter Thread starter Stephen Tashi
  • Start date Start date
  • Tags Tags
    Forum Latex
Click For Summary

Discussion Overview

The discussion revolves around the functionality of LaTeX tables in forum posts, specifically whether the "tabular" environment is supported and how to create table-like structures using LaTeX in the context of MathJax rendering.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants express uncertainty about the use of LaTeX tables, noting that they have not used them before and are unsure if they work in forum posts.
  • One participant mentions that the "tabular" environment is not generally supported in the forum, suggesting that it may be an environment variable that is incompatible.
  • Another participant clarifies that MathJax accepts most LaTeX commands but does not support the "tabular" environment, proposing that "Arrays" can be used as an alternative to create a table-like appearance.
  • A later reply explains that input is interpreted in LaTeX "math mode," which restricts the use of environments like "tabular" that are designed for use outside of math mode.
  • One participant suggests using the "array" environment as a workaround to achieve the desired table effect, referencing the LaTeX FAQ for guidance.

Areas of Agreement / Disagreement

Participants generally agree that the "tabular" environment is not supported in the forum's MathJax implementation, but there is no consensus on the best alternative method for creating tables, as different approaches are proposed.

Contextual Notes

Limitations include the specific rendering capabilities of MathJax and the distinction between math mode and other LaTeX environments, which may affect how LaTeX code is interpreted.

Stephen Tashi
Science Advisor
Homework Helper
Education Advisor
Messages
7,864
Reaction score
1,605
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:

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

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:

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

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.
 
We use MathJax which accepts most LaTeX commands, but it does not accept the tabular environment. Some here have used Arrays to fake a table.
 
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:

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

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}
<br /> \begin{array}{| l | c | r |}<br /> \hline<br /> 1 &amp; 2 &amp; 3 \\<br /> \hline<br /> 4 &amp; 5 &amp; 6 \\<br /> \hline<br /> 7 &amp; 8 &amp; 9 \\<br /> \hline<br /> \end{array}
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K