LaTeX Need LaTeX commands for tables, I've looked up some but not working

  • Thread starter Thread starter benorin
  • Start date Start date
  • Tags Tags
    latex
AI Thread Summary
The discussion centers around issues with rendering LaTeX tables, specifically related to Greek letters and fractions not displaying correctly. A user attempted to create a trigonometric table using LaTeX but encountered problems where the commands were shown instead of the intended output. It was identified that the newline after the \begin{array} command caused the issue, as the Insights editor interprets it as a paragraph break, disrupting MathJax rendering. The solution proposed is to keep the entire table code on a single line to avoid this problem. Additionally, there is mention of an article submission titled "A Trick to Memorizing Trig Special Angle Values Table," but the user faced difficulties in confirming the submission status.
benorin
Science Advisor
Insights Author
Messages
1,442
Reaction score
191
I've looked up two different LaTeX references for Table commands and have been lead to believe that this might work but not only does it not appear as a table it doesn't even display greek letters or fractions just spits out commands. Help please?

Code:
|render=<math>
\begin{array}{ l| |c|c|c|c|c }

\theta & 0 & \tfrac{\pi}{6} & \tfrac{\pi}{4} & \tfrac{\pi}{3} & \tfrac{\pi}{2} \\ \sin\theta & 1  & 2  &  3 & 4  & 5   \\ \cos\theta & 6  & 7   & 8   & 9   & 10   \\ \tan\theta & 11   & 12   & 13   & 14  & 15   \\ \end{array} </math>
 
Physics news on Phys.org
$$\begin{array}{ l| |c|c|c|c|c }

\theta & 0 & \tfrac{\pi}{6} & \tfrac{\pi}{4} & \tfrac{\pi}{3} & \tfrac{\pi}{2} \\ \sin\theta & 1 & 2 & 3 & 4 & 5 \\ \cos\theta & 6 & 7 & 8 & 9 & 10 \\ \tan\theta & 11 & 12 & 13 & 14 & 15 \\ \end{array}$$

Copied and pasted, only replacing the HTML <math> tags with two dollars, and it seems to work ok here. So your LaTeX is fine. I take it this is an Insight you are writing?
 
  • Like
Likes berkeman and vanhees71
I thought it might be appropriate to make it an insight, was just a memory trick for the trig table. My students in Calc always loved it
 
  • Love
Likes Greg Bernhardt
So I just tried creating a new Insight and pasting your code in, and sure enough it doesn't work. The problem seems to be the newline after the begin{array} line. The Insights editor treats a newline as a paragraph end and inserts a </p><p>, and that's breaking MathJax, I think. So simply putting the whole table code on to one line fixes it.
 
  • Like
Likes vanhees71, Greg Bernhardt and benorin
@Ibix I submitted my article for review but don't see the Request for review post in insight and Blog Development sub forum, I submitted it twice, my bad

edit: it's called "A Trick to Memorizing Trig Special Angle Values Table"
 
  • Like
Likes vanhees71 and Greg Bernhardt
Can't help with that, I'm afraid - I'm just a normal user, but was at a bit of a loose end today so played around with your code. See what @Greg Bernhardt says.
 
  • Like
Likes benorin and Greg Bernhardt

Similar threads

Replies
7
Views
3K
Replies
3
Views
2K
Replies
4
Views
3K
Replies
15
Views
25K
Replies
4
Views
4K
Replies
9
Views
3K
Back
Top