LaTeX Latex Bug: Colors Not Showing for Some Users?

  • Thread starter Thread starter jack action
  • Start date Start date
AI Thread Summary
The discussion centers around issues with rendering LaTeX code using MathJax, specifically the commands for color and boldface text. Users report inconsistent results across different web browsers, with some successfully displaying colored text and bold symbols while others do not. The conversation suggests that these discrepancies may be linked to browser versions and MathJax implementations. Participants note that refreshing the browser cache could resolve some rendering issues, as changes made by the platform may not be reflected immediately due to cached files. Additionally, there is speculation about the impact of operating systems and browser settings on the rendering of LaTeX. Overall, the thread highlights the challenges of ensuring consistent LaTeX rendering across various environments.
jack action
Science Advisor
Insights Author
Messages
3,493
Reaction score
9,681
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 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 benorin
Not so for me.
1645293031783.png
 
  • Like
Likes 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 vanhees71
  • #17
  • Like
Likes 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 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 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 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 vanhees71

Similar threads

Replies
6
Views
1K
Replies
0
Views
2K
Replies
16
Views
2K
Replies
4
Views
3K
Replies
12
Views
3K
Replies
6
Views
3K
Replies
3
Views
4K
Replies
8
Views
2K
Replies
16
Views
4K
Back
Top