Troubleshooting Latex Tables in Threads

  • #1

anorlunda

Staff Emeritus
Insights Author
11,211
8,623
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}
$$
 

Answers and Replies

  • #2
Have you tried two hashes instead of two dollars?
 
  • #3
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}
##
 
  • #4
apparently, Tabular is not implemented in Mathjax.
 
  • #6
Maybe html?
 
  • #7
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!)
 
  • #8
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}
##
 
  • #9
\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 Greg Bernhardt
  • #10
Double thanks @Shyan. Got it.
 

Suggested for: Troubleshooting Latex Tables in Threads

Replies
7
Views
519
LaTeX Latex link
Replies
7
Views
214
Replies
8
Views
544
Replies
3
Views
331
Replies
1
Views
630
Replies
1
Views
192
Replies
10
Views
737
Replies
7
Views
728
LaTeX LaTeX help
Replies
5
Views
469
Back
Top