Help Posting LaTeX on the Forums

  • #1
Ascendant0
64
15
I'm trying to learn LaTeX, and to use it here on the forums, but having a problem posting it. In TeXworks, I'm figuring it out, no problem, pretty simple. However, I apply LaTeX here, and when I hit "Preview", it just shows up as whatever I write, rather than the math symbols.

I went to a couple links on these forums, and neither helped. One link (https://www.physicsforums.com/help/latexhelp/) says to simply put $$ or ## before and after the code. I do that, doesn't work.

Another link from the forums (https://www.physicsforums.com/misc/howtolatex.pdf) indicates instead to use [tex] before and after. Tried that as well, hit preview, and still doesn't show up correctly.

What am I missing here? I'm trying to do what is indicated in the links on these forums, but none of it seems to work correctly. Some help would be greatly appreciated, as I'm sure it's something really basic that I'm overlooking.
 
Physics news on Phys.org
  • #2
If your LaTex does not get interpreted, you might need to reload the tab. LaTex often does not get loaded if there was no need for it in the original tab. Then try to Preview again.
 
  • Like
Likes Ascendant0
  • #3
The web server version of LaTeX is MathJax because we need an interpreter, not a compiler on the internet. That's why @FactChecker said that you might need to reload your page at times to force the interpreter to interpret.

MathJax can differ from LaTeX, depending on which version is implemented. E.g. we use ## for inline LaTeX tags instead of $, whereas $$ is used the same way for separated formulas. Other websites have other transitions. StackExchange for instance is rather close to the original LaTeX syntax, others are even further away. So https://www.physicsforums.com/help/latexhelp/ and https://detexify.kirelabs.org/symbols.html are actually a good start to writing formulas here. You can also use the reply button to look at how others wrote their posts, but a) don't mess up threads by mistakenly hitting the post reply button, and b) clear the cache (delete draft button, or manually delete the edit box).

If you want to learn LaTeX then I recommend (point 5):

https://www.physicsforums.com/threads/how-to-use-the-w-in-www.1062388/

E.g. I write my texts in TexStudio with the help of a large AHK script. If I want it posted on PF, I mark my entire text, copy it in a text editor (https://www.textpad.com/home), replace $ by ##, and then #### by $$. This does 90% of necessary reformatting and leaves only things like section commands, typeset changes like italics or item lists un-reformatted.
 
Last edited:
  • Like
Likes dextercioby, Ascendant0 and FactChecker
  • #4
Ascendant0 said:
Another link from the forums (https://www.physicsforums.com/misc/howtolatex.pdf) indicates instead to use [tex] before and after. Tried that as well, hit preview, and still doesn't show up correctly.
You can use [tex] and [/tex] delimiters (for standalone math expressions) or [itex] and [/itex] (for inline) delimiters, but I prefer to use pairs of $$ or ## delimiters since they're quicker to type. As already mentioned, if there are no other LaTeX (really MathJax) expressions on the page, you'll need to refresh the page to get them interpreted.
 
  • Like
Likes Ascendant0
  • #5
Thanks so much guys, I appreciate the help. I'm trying it again, and now it's working like it should. I knew it had to be something really simple, lol $$ stuff/overotherstuff $$
 
  • #6
Short version: it should work if there's already LaTeX on the page. If there isn't any, enter some LaTeX, preview, and reload the page while in preview mode and the parser should wake up. That didn't used to work if you were writing a new thread, so I recommended drafting your post as a reply to some random thread and then pasting it into a new thread - I think this has now been fixed and the reload-in-preview trick works, but just in case.
 
  • Like
Likes mfb, Ascendant0 and fresh_42

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
999
  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
908
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
Back
Top