Preview LaTeX: Tips to Check Code Before Posting

  • Context: LaTeX 
  • Thread starter Thread starter topsquark
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary

Discussion Overview

The discussion revolves around the challenges of previewing LaTeX code on the forum before posting. Participants explore methods to ensure that their LaTeX renders correctly and share tips for managing the preview process.

Discussion Character

  • Technical explanation, Conceptual clarification, Debate/contested

Main Points Raised

  • Dan inquires about the ability to preview LaTeX code before posting.
  • One participant suggests using a button located at the top right of the page to preview LaTeX.
  • Another participant explains that the MathJax resource may not load if there is no LaTeX present on the page, and advises refreshing the page to ensure it loads correctly.
  • A participant warns about a bug that can garble LaTeX in the edit window after refreshing, recommending users to copy their text before doing so.
  • One user mentions using an external tool, mathb.in, for writing longer LaTeX content and suggests a method for replacing symbols to facilitate previewing.

Areas of Agreement / Disagreement

Participants express various methods for previewing LaTeX, but there is no consensus on a single solution. The discussion includes both tips and warnings about potential issues, indicating that multiple approaches exist.

Contextual Notes

Participants note limitations related to the loading of MathJax and the potential for bugs when refreshing the page, which may affect the previewing process.

topsquark
Science Advisor
Homework Helper
Insights Author
MHB
Messages
2,020
Reaction score
843
Just a quick question... I haven't been able to figure out a way to preview my posts before I post them. Is there a way to check my LaTeX code on site before I actually post?

Thanks!
-Dan
 
  • Like
Likes   Reactions: Hall
Physics news on Phys.org
This button to the top right

1660653379810.png


You probably have to reload the page if MathJax is not loaded (ie, nobody has yet used it on that page).
 
  • Like
Likes   Reactions: malawi_glenn, topsquark and FactChecker
The MathJax resource is not loaded if the page does not have any ##\LaTeX##. When you are creating a new thread, as @Orodruin has said above, you need to refresh the page once to load the resource, and thereafter the preview will render the ##\LaTeX##. Before refreshing the page, however, make sure you copy everything you have written. There is a bug that renders some of the ##\LaTeX## in the edit window itself after you refresh the page, and then if you click the Preview button, everything will be garbled.
 
  • Informative
  • Like
Likes   Reactions: topsquark and berkeman
When I want to write longer things, I use mathb.in
Then I do a search and replace all "$" with "##"
 
  • Like
Likes   Reactions: dextercioby and Wrichik Basu

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 23 ·
Replies
23
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 36 ·
2
Replies
36
Views
2K