Tables in latex?

  • LaTeX
  • Thread starter anorlunda
  • Start date
  • #1
anorlunda
Staff Emeritus
Insights Author
9,156
6,154
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
DrDu
Science Advisor
6,107
807
Have you tried two hashes instead of two dollars?
 
  • #3
anorlunda
Staff Emeritus
Insights Author
9,156
6,154
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
DrDu
Science Advisor
6,107
807
apparently, Tabular is not implemented in Mathjax.
 
  • #5
anorlunda
Staff Emeritus
Insights Author
9,156
6,154
apparently, Tabular is not implemented in Mathjax.
Darn. Is there any way to get tables into a PF post?
 
  • #6
DrDu
Science Advisor
6,107
807
Maybe html?
 
  • #7
2,793
594
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
anorlunda
Staff Emeritus
Insights Author
9,156
6,154
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
2,793
594
\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
anorlunda
Staff Emeritus
Insights Author
9,156
6,154
Double thanks @Shyan. Got it.
 

Related Threads on Tables in latex?

  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
9
Views
6K
  • Last Post
Replies
5
Views
912
  • Last Post
Replies
5
Views
5K
Replies
1
Views
7K
  • Last Post
Replies
18
Views
22K
  • Last Post
Replies
2
Views
40K
Replies
3
Views
14K
Top