Color commands in LaTeX rendering differently for different users

  • Context: LaTeX 
  • Thread starter Thread starter jack action
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
26 replies · 2K views
Science Advisor
Insights Author
Messages
3,641
Reaction score
10,062
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?
 
Here are my test results:


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


Browser​
red​
bold​
Chrome​
0​
1​
Opera​
0​
1​
Safari​
1​
1​
What OS?
 
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:
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
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
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 !
 
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?
 
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.
 
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 ...
 
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
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.
 
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