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

  • Context: LaTeX 
  • Thread starter Thread starter benorin
  • Start date Start date
  • Tags Tags
    latex
Click For Summary
SUMMARY

The forum discussion centers on issues with rendering LaTeX tables, specifically using the array environment for trigonometric functions. Users encountered problems with Greek letters and fractions not displaying correctly, attributed to newline characters breaking MathJax rendering. A solution was identified: consolidating the LaTeX code into a single line resolves the formatting issues. The discussion also references an article titled "A Trick to Memorizing Trig Special Angle Values Table" submitted for review.

PREREQUISITES
  • Familiarity with LaTeX syntax and commands
  • Understanding of MathJax rendering in web environments
  • Knowledge of trigonometric functions and their representations
  • Experience with formatting tables in LaTeX
NEXT STEPS
  • Research LaTeX array environment for table creation
  • Learn about MathJax configuration and troubleshooting
  • Explore LaTeX commands for Greek letters and fractions
  • Investigate best practices for submitting LaTeX content in online forums
USEFUL FOR

Students, educators, and anyone involved in creating or formatting mathematical content using LaTeX, particularly in online platforms that utilize MathJax for rendering.

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   Reactions: 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   Reactions: 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   Reactions: 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   Reactions: 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   Reactions: benorin and Greg Bernhardt

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 15 ·
Replies
15
Views
25K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 9 ·
Replies
9
Views
3K