Latex Bug: Colors Not Showing for Some Users?

  • Context: LaTeX 
  • Thread starter Thread starter jack action
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around issues with rendering colors in LaTeX using MathJax on the Physics Forums platform. Participants explore whether the problem is browser-dependent, related to specific versions of MathJax, or due to caching issues. The scope includes technical explanations and user experiences with different browsers and operating systems.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • Some participants report that LaTeX color commands like {\color{red}{text}} render correctly for them, while others do not see the same results.
  • One participant suggests that color rendering issues may be related to the MathJax implementation in different browsers.
  • Several users mention that boldface commands work for them, indicating a potential inconsistency with color rendering specifically.
  • There are claims that different browser versions may lead to different MathJax implementations affecting rendering.
  • Some participants speculate that caching of older versions of MathJax could be causing the discrepancies in rendering.
  • Multiple users confirm that refreshing the cache may resolve the issue for some, but the effectiveness varies by browser.
  • One participant raises the question of whether two different browsers could share the same cache, to which others clarify that while they cannot share cache, the same file version could be cached in both.

Areas of Agreement / Disagreement

Participants generally agree that rendering issues are likely browser-dependent and may involve caching problems, but there is no consensus on the exact cause or solution. Multiple competing views remain regarding the effectiveness of different browsers and versions of MathJax.

Contextual Notes

Limitations include varying user experiences based on browser and operating system versions, as well as potential differences in MathJax implementations. Some participants mention recent changes to the Physics Forums platform that may have affected rendering.

jack action
Science Advisor
Insights Author
Messages
3,557
Reaction score
9,917
I wrote this post where I used "{\color{red}{text}}" in the Latex. I see it correctly (as in the screenshots at the end of the post), but @hutchphd didn't (next post).

Anyone else has this problem? Don't we have all the same javascript file to decode Latex? @Greg Bernhardt
 
Physics news on Phys.org
Color and MathJax don't render very well. This is also true for boldface, italic, or other typesetting codes. They should be avoided. And not only because of that.
 
  • Like
Likes   Reactions: Bystander
For me this works, i.e., \color{red}{\text{Test}} in double dollars:
$$\color{red}{\text{Test}}$$
Also boldface works, \boldsymbol{x} gives
$$\boldsymbol{x}$$
 
  • Like
Likes   Reactions: benorin
Not so for me.
1645293031783.png
 
  • Like
Likes   Reactions: DaveE
Strange. Is it somehow dependent on the web browser you use? I use firefox under linux and it works. I just checked that it also works with the chrome browser...
 
vanhees71 said:
Strange. Is it somehow dependent on the web browser you use? I use firefox under linux and it works. I just checked that it also works with the chrome browser...
I use Chrome and get the same negative result with Opera.
 
Probably browser dependent (or rather, the MathJax implementation in the browser). The boldsymbol seems to work on iOS Safari but the color doesn’t.
 
Orodruin said:
Probably browser dependent (or rather, the MathJax implementation in the browser). The boldsymbol seems to work on iOS Safari but the color doesn’t.
My Safari displays ‚Text‘ in red. Guess we can rule out the browsers.
 
@vanhees71 's test works for me too. But shouldn't all of this depend only on a javascript file? Aren't all "conversions" done in that file? The HTML code I have for \color{red}{v_{wv}} is:
HTML:
<mjx-mstyle style="color: red;">
    <mjx-msub><mjx-mi class="mjx-i">
        <mjx-c class="mjx-c1D463 TEX-I"></mjx-c>
    </mjx-mi>
    <mjx-script style="vertical-align: -0.15em;">
        <mjx-texatom size="s" texclass="ORD">
            <mjx-mi class="mjx-i">
                <mjx-c class="mjx-c1D464 TEX-I"></mjx-c>
            </mjx-mi>
            <mjx-mi class="mjx-i">
                <mjx-c class="mjx-c1D463 TEX-I">
                </mjx-c></mjx-mi></mjx-texatom>
        </mjx-script>
    </mjx-msub>
</mjx-mstyle>
How come it doesn't convert to style="color: red;" for everyone within javascript?
 
  • #10
Here are my test results:


Browser​
red​
bold​
Chrome​
0​
1​
Opera​
0​
1​
Safari​
1​
1​
 
  • #11
fresh_42 said:
My Safari displays ‚Text‘ in red. Guess we can rule out the browsers.
Different browser versions = different MathJax implementations perhaps?
 
  • #12
fresh_42 said:
Here are my test results:


Browser​
red​
bold​
Chrome​
0​
1​
Opera​
0​
1​
Safari​
1​
1​
What OS?
 
  • #14
Orodruin said:
What OS?
I don't see how this would help, and I had difficulties getting all information.
Browser​
Version​
OS​
Version​
Java​
Version​
red Text​
Chrome​
98.0.4758.102 / 64 Bit​
W10H​
21H1​
javax.inject​
2 / 2004​
0​
Opera​
83.0.4254.62 / 64 Bit​
W10H​
21H1​
JavaScript allowed​
?​
0​
Safari​
?​
iOS​
15.3.1​
?​
?​
1​
 
Last edited:
  • #15
This is why someone wrote the book:

Javascript: the Good Parts
 
  • #16
Orodruin said:
Probably browser dependent (or rather, the MathJax implementation in the browser). The boldsymbol seems to work on iOS Safari but the color doesn’t.
That's weird. Both rendered correctly on my iPad and iPhone just now.
 
  • Like
Likes   Reactions: vanhees71
  • #17
  • Like
Likes   Reactions: vanhees71
  • #19
vela said:
That's weird. Both rendered correctly on my iPad and iPhone just now.
Your iOS may be more up to date. I run iOS 12 and can’t update because my phone is relatively ancient.
 
  • Like
Likes   Reactions: vanhees71
  • #20
Orodruin said:
Your iOS may be more up to date. I run iOS 12 and can’t update because my phone is relatively ancient.
The sad reality of being a dedicated college prof unable to afford to upgrade his iPhone.

Hang in there @Orodruin !
 
  • #21
vela said:
Some people might have older versions cached.
I think this is the problem. A week ago PF made some changes.

To people who have errors, refresh your cache and see if it works!
 
  • Like
  • Informative
Likes   Reactions: vanhees71 and fresh_42
  • #22
jack action said:
I think this is the problem. A week ago PF made some changes.

To people who have errors, refresh your cache and see if it works!
How likely is it that two different browsers share the same cache?
 
  • #23
fresh_42 said:
How likely is it that two different browsers share the same cache?
None. But the same file version could be cached in both.
 
  • #24
jack action said:
None. But the same file version could be cached in both.
Yep. It worked for Chrome. Now I have to go through all the annoying logins, cookie acceptances etc. again ...
 
  • #25
fresh_42 said:
Yep. It worked for Chrome. Now I have to go through all the annoying logins, cookie acceptances etc. again ...
You can't clear cache separately from cookies/logins ??!
 
  • Like
Likes   Reactions: vanhees71
  • #26
PAllen said:
You can't clear cache separately from cookies/logins ??!
I could, at least in Chrome. Opera is less comfortable. But I do not know where is stored what and I didn't want to run the process and test the result on every single selection. So I only kept the passwords and the auto-fills.
 
  • #27
vanhees71 said:
For me this works, i.e., \color{red}{\text{Test}} in double dollars:
$$\color{red}{\text{Test}}$$
Also boldface works, \boldsymbol{x} gives
$$\boldsymbol{x}$$
I’m on the latest iOS version in Firefox browser and both the red text and boldface work for me.
 
  • Like
Likes   Reactions: vanhees71

Similar threads

  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K