Exploring LaTeX Tables in Forum Posts

  • LaTeX
  • Thread starter Stephen Tashi
  • Start date
  • Tags
    Forum Latex
In summary, the conversation discusses the use of LaTex tables in forum posts. The speaker has never used them before and has attempted to copy examples from the web, but they do not show up as tables. They also mention trying to use math renderers HTML-CSS and SVG, but have not had success. It is noted that the "tabular" environment is not supported in the forum, but it is possible to achieve a similar effect using the "array" environment. Further information and suggestions are provided by other participants in the conversation.
  • #1
Stephen Tashi
Science Advisor
7,861
1,598
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 }
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\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
  • #2
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 }
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
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 }
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\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 |}
\hline
1 & 2 & 3 \\
\hline
4 & 5 & 6 \\
\hline
7 & 8 & 9 \\
\hline
\end{array}[/tex]
 

1. What is LaTeX and why is it useful for creating tables in forum posts?

LaTeX is a typesetting language commonly used in academia for creating high-quality documents. It is particularly useful for creating complex mathematical and scientific equations, as well as tables and figures. Using LaTeX in forum posts allows for more professional and visually appealing tables.

2. How do I create a table in LaTeX for a forum post?

To create a table in LaTeX for a forum post, you will need to use the "table" environment and specify the number of columns and alignment for each column. Then, you can use the "tabular" command to input the data for your table. It is also helpful to use the "booktabs" package for better formatting options.

3. Can I customize the appearance of my LaTeX table in a forum post?

Yes, you can customize the appearance of your LaTeX table in a forum post by changing the font, color, borders, and alignment. This can be done by using various commands and packages in LaTeX, such as "array," "colortbl," and "multirow." It is also possible to add captions and labels to your table for better organization.

4. Is there a way to import data from an external source into a LaTeX table for a forum post?

Yes, you can import data from an external source into a LaTeX table for a forum post by using the "pgfplotstable" package. This package allows you to import data from CSV or Excel files and automatically generate a table in LaTeX. It also has options for formatting and customizing the appearance of the table.

5. Are there any limitations to using LaTeX tables in forum posts?

One limitation of using LaTeX tables in forum posts is that not all forum platforms support the use of LaTeX. Therefore, it is important to check beforehand if the forum platform you are using allows for LaTeX formatting. Additionally, creating complex and multi-page tables in LaTeX can be time-consuming and may require some knowledge of the language.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
350
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
272
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
16
Views
3K
Back
Top