Troubleshooting LaTeX Code Display Issues: Resolving Garbled Code on Page Reload

  • Context: LaTeX 
  • Thread starter Thread starter epovo
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around issues with LaTeX code rendering on a forum platform, specifically focusing on problems encountered when reloading pages or using the preview feature. Participants share their experiences and troubleshooting steps related to LaTeX display issues in various web browsers.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Meta-discussion

Main Points Raised

  • One participant reports that LaTeX code becomes garbled upon page reload, affecting their ability to post.
  • Another participant confirms experiencing the same issue across different browsers (Chrome and Edge), noting it used to work fine.
  • A participant mentions a known issue where LaTeX does not render if there is no existing LaTeX on the page, but suggests that refreshing should resolve it.
  • There is a suggestion that using the highlight-and-reply feature also leads to similar garbled output.
  • Participants discuss the potential impact of using the WYSIWYG editor versus plain text for entering LaTeX code.
  • One participant shares a successful attempt at previewing LaTeX code after following troubleshooting advice.
  • Another participant emphasizes that while the issue may need attention, it could be related to the user's specific computer or browser settings, suggesting clearing cache and cookies as a potential fix.
  • A participant references previous threads discussing the same bug and requests better documentation of the issue and workarounds for new users.

Areas of Agreement / Disagreement

Participants express a mix of agreement on the existence of the rendering issue but do not reach a consensus on its cause or a definitive solution. Multiple competing views on the nature of the problem and potential fixes remain present.

Contextual Notes

Participants note limitations in the current documentation regarding LaTeX issues, suggesting that new users may not be adequately informed about the problems and workarounds available.

Who May Find This Useful

This discussion may be useful for forum users who frequently utilize LaTeX for posting and are experiencing similar rendering issues, as well as for developers or moderators looking to improve user experience related to LaTeX functionality.

epovo
Messages
114
Reaction score
21
TL;DR Summary: Every time I reload the page most of LaTeX code becomes garbled, so I can't really post

This happens also when I preview, so something like
$$g_{,\mu} = g g^{\alpha\beta} g_{\alpha\beta,\mu}$$
becomes
g,μ=ggαβgβα,μ
 
Physics news on Phys.org
I tried this with Chrome and Edge. It's the same. It used to work fine :mad:
 
epovo said:
I tried this with Chrome and Edge. It's the same. It used to work fine :mad:
The LaTeX in your OP looks fine to me:
Screenshot_20221231-200902.png
There's a known issue that LaTeX doesn't render if there isn't already LaTeX on the page - but a refresh should fix that. You seem to be saying that your post initially renders, but gets garbled when you refresh?
 
Exactly. So unless I write all the LaTeX code and post it without not even once previewing it or saving it as a draft, it will get garbled.
 
Similar happens if you use the highlight-and-reply feature on LaTeX - you get the characters but not the formatting.

Are you using the WYSIWYG editor or the text only? Could you try the text only editor if you haven't done?
 
I am just typing the LaTeX code in plain text.
 
Yes, you have no choice. But we used to have an issue with LaTeX accidentally rendering in the WYSIWYG editor, which had a similar end product to what uou are describing. I was wondering if that bug was back.

Somewhere in the toolbar there's a button labelled with a pair of square brackets - it's either over on the right somewhere or in one of the ##\vdots## submenus on the right. Tap/click it and all the other buttons should go red and unresponsive. Then try typing and previewing some LaTeX and see if the bug happens.
 
  • Love
Likes   Reactions: epovo
This is my attempt:
$$ g_{,\mu} = g g^{\alpha\beta} g_{\alpha\beta,\mu}$$
I previewed a couple of times and it seems to work! thank you very much, Ibix.
 
  • Like
Likes   Reactions: Ibix
No problem. However, @Greg Bernhardt may want to know that you're getting this. You mentioned Chrome and Edge so I guess you're on Windows. If you could say the browser versions that might be of interest.
 
  • #10
LaTeX is rendered client side, so while it is not impossible something got broken and requires Greg's attention, as long as there is no wave of reports I am ready to assume problem is related to the OP computer/browser and there is not much that can be done server side.

But definitely reporting such things helps keep track of what is going on. Just keep in mind your computer is the first suspect. Often just emptying cache and resetting cookies helps.
 
  • #11
epovo said:
TL;DR Summary: Every time I reload the page most of LaTeX code becomes garbled, so I can't really post
This bug has been reported again and again. In the last thread reporting this bug, I made a list of all threads that have reported this bug: https://www.physicsforums.com/threads/latex-help.1046932/post-6816969

This post of mine briefly explains what goes wrong: https://www.physicsforums.com/threads/how-to-preview-latex-formulas.1045620/post-6801311

And the workaround is available here: https://www.physicsforums.com/threa...oes-it-work-for-you-here.1006363/post-6531460

Once again, I request this bug, and the workarounds, to be mentioned somewhere in the LaTeX help section so that new users are aware of it. It can become frustrating if a new user writes a full page of LaTeX, clicks on Preview, and then finds everything is permanently garbled. A dynamic message on the New Thread creation page informing that the MathJax resource has not been loaded, will also be useful.
 
Last edited:
  • Like
Likes   Reactions: dextercioby

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 766 ·
26
Replies
766
Views
743K
  • · Replies 7 ·
Replies
7
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K