Troubleshooting Latex Tables in Threads

Click For Summary

Discussion Overview

The discussion revolves around troubleshooting the use of LaTeX tables in forum threads, specifically focusing on the compatibility of LaTeX code with the forum's formatting system. Participants explore various methods to display tables correctly, including the use of different delimiters and alternative environments.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant reports an issue with LaTeX code generated from a table generator site not displaying correctly when enclosed in dollar dollar delimiters.
  • Another participant suggests using two hashes instead of two dollar signs for formatting.
  • A participant notes that the Tabular environment is not implemented in Mathjax, raising concerns about displaying tables.
  • There is a suggestion to use HTML as an alternative for creating tables in posts.
  • One participant proposes using the array environment as a workaround for the table issue.
  • Another participant confirms that using the array environment helped them, although they are still trying to adjust the cell alignment.
  • A later reply questions the syntax of the array environment, specifically regarding the alignment of text.

Areas of Agreement / Disagreement

Participants express varying opinions on the best method to display tables, with no consensus on a single solution. Some methods are proposed, but the effectiveness of each remains uncertain.

Contextual Notes

Limitations include the lack of support for certain LaTeX environments in the forum's formatting system, and unresolved issues regarding the correct syntax for the array environment.

anorlunda
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Messages
11,326
Reaction score
8,755
I used a table generator site http://www.tablesgenerator.com/ to create this latex code, but it doesn't work in a thread when I paste it in between dollar dollar delimiters.

Help please.

$$
\begin{table}[]
\centering
\caption{My caption}
\label{my-label}
\begin{tabular}{ll}
1 & TW base \\
1 & TW reserves \\
2 & TW total \\
3 & \$/watt utility \\
6 & \$/watt rooftop \\
6.5 & \$trillion storage \\
\$14 & \$trillion total
\end{tabular}
\end{table}
$$
 
Physics news on Phys.org
Have you tried two hashes instead of two dollars?
 
Here it is with hashes.

##
\begin{table}[]
\centering
\caption{My caption}
\label{my-label}
\begin{tabular}{ll}
1 & TW base \\
1 & TW reserves \\
2 & TW total \\
3 & \$/watt utility \\
6 & \$/watt rooftop \\
6.5 & \$trillion storage \\
\$14 & \$trillion total
\end{tabular}
\end{table}
##
 
apparently, Tabular is not implemented in Mathjax.
 
DrDu said:
apparently, Tabular is not implemented in Mathjax.

Darn. Is there any way to get tables into a PF post?
 
Maybe html?
 
Use
Code:
\ begin{array}{ll}

\ end{array}

(With no space after \, I put it their because it becomes invisible when I write it the correct way!)
 
Yes, thank you @Shyan That got me closer, now I'll try to get rid of centering the cells.

##
\begin{array}{7}
1 & TW base \\
1 & TW reserves \\
2 & TW total \\
3 & \$/watt utility \\
6 & \$/watt rooftop \\
6.5 & \$trillion storage \\
\$14 & \$trillion total
\end{array}
##
 
\begin{array}{ll} 1 & TWbase \\ 1 & TWreserves \\ 2 & TWtotal \\ 3 & \$wattutility \\ 6 & \$wattrooftop \\ 6.5 & \$trillionstorage \\ 14 & \$trilliontotal \end{array}

Do you exactly write \ begin{array}{ll} ? The second l is supposed to align the text to the left!

P.S.
This may be helpful.
 
  • Like
Likes   Reactions: Greg Bernhardt
  • #10
Double thanks @Shyan. Got it.
 

Similar threads

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