1. Colour while using ##\LaTeX## 2. Preview first time

Click For Summary
SUMMARY

This discussion centers on the challenges of using color in LaTeX equations rendered with MathJax. Users report that the color command is ineffective within text environments, but functional when applied directly to equations. Additionally, the preview feature for initial posts does not work as expected, requiring users to refresh the page for proper rendering. The conversation highlights the importance of considering accessibility when using color in mathematical expressions.

PREREQUISITES
  • Understanding of LaTeX syntax and commands
  • Familiarity with MathJax for rendering LaTeX in web environments
  • Basic knowledge of accessibility considerations in content creation
  • Experience with Google Chrome on Windows 11 for troubleshooting
NEXT STEPS
  • Research "MathJax color command usage" for effective color application in equations
  • Explore "LaTeX text environment limitations" to understand rendering constraints
  • Learn about "accessibility best practices for color use" in mathematical content
  • Investigate "troubleshooting MathJax rendering issues" in web browsers
USEFUL FOR

Mathematicians, educators, content creators, and anyone utilizing LaTeX for mathematical documentation who seeks to enhance their understanding of color application and accessibility in mathematical expressions.

brotherbobby
Messages
756
Reaction score
170
I have observed that one cannot use colour here while typing something in ##\LaTeX##.

Let me try : ##\text{Let's see if this can be \color{blue} {coloured}?}##. Nope, I type, via an edit after posting. Of course I can use colour from the panel above, but that will have to work for the entire sentence, not a part of it.

Let's see : ##\text{Let's see if this can be coloured?}##

But not : ##\text{Let's see if this can be coloured?}##.

The line above simply didnt ##\LaTeX##. And something went terribly wrong it seems that I can't quite see.

For some reason, Preview doesn't work also the first time when you post something as the OP. But it works later when you reply.

Question : Does anyone know how to make colour work in LaTeX equations on here? I believe equations on here using MathJax for browser rendering of LaTeX.

Does anyone also know how to enable Preview of one's post first time round? Is there some fault with my browser or system? I am using Google Chrome on Windows 11 (64 bit). This happens on both my (Lenovo) laptop and (Windows Surface) tablet.
 
Physics news on Phys.org
Do your equations on PF really require use of dancing baloney? And does this need warrent making the posts unreadable to those visually impaired using high-contrast color schemes?
 
  • Like
Likes   Reactions: berkeman
brotherbobby said:
Does anyone also know how to enable Preview of one's post first time round?
In the new thread window, no. I suggest composing your post in a reply box somewhere and previewing there - paste into the new thread when ready.

In replies, LaTeX will only render in preview if an earlier post has used LaTeX. If you preview your reply and LaTeX does not render, refresh the page while in preview mode and MathJax should wake up. The wise poster copies their text to clipboard before refreshing.
 
  • Informative
Likes   Reactions: phinds
Ibix said:
In the new thread window, no. I suggest composing your post in a reply box somewhere and previewing there - paste into the new thread when ready.
Yes, that is a good suggestion, sorry didn't occur to me.

Any word on how to use colour in MathJax?
 
brotherbobby said:
Any word on how to use colour in MathJax?
It looks to me like you've got it working, no?
brotherbobby said:
Please keep your opinions to yourself.
He does raise a good point, though. A fair few of us here do not have young eyes any more. It's worth considering whether a use of colour in maths will improve your communication with your target audience, or if another approach might be better.
 
  • Like
Likes   Reactions: Vanadium 50
Ibix said:
It looks to me like you've got it working, no?
No. I can colour either the whole equation or none of it. I cannot colour a portion of it, which I can, by the way, if I was writing an article using ##\LaTeX## on my system.

Ibix said:
He does raise a good point, though. A fair few of us do not have young eyes any more. It's worth considering whether a use of colour in maths will improve your communication with your target audience, or if another approach might be better.
[Mentor Note: misinformation deleted from post]
All the same, I prefer an answer or a reply to my question. As to whether one should or should not do something, well, that is besides the point. For instance, I would like to colour equations. If people complain on my post with coloured equations, of course I'd stop. It's a different point.
 
Last edited by a moderator:
brotherbobby said:
I think however fallible one's eyesight is, a different colour always helps things stand out.
I used to work for a guy who was completely colour blind. I had to present graphs with different dash patterns or just use shades of grey because it was very difficult to work out what colours he would be able to differentiate.

Up to you, of course. I'm just observing that colour isn't a popular way of highlighting parts of equations and there are likely to be reasons for that.

Anyway, it looks like the color command is ignored inside a text environment. Works otherwise.
##F=\color{red}{m}a##
##F=\text{\color{red}{m}}a##
##F=\color{red}{\text{m}}a##
 
  • Like
Likes   Reactions: Vanadium 50
Ibix said:
I used to work for a guy who was completely colour blind. I had to present graphs with different dash patterns or just use shades of grey because it was very difficult to work out what colours he would be able to differentiate.

Up to you, of course. I'm just observing that colour isn't a popular way of highlighting parts of equations and there are likely to be reasons for that.

Anyway, it looks like the color command is ignored inside a text environment. Works otherwise.
##F=\color{red}{m}a##
##F=\text{\color{red}{m}}a##
##F=\color{red}{\text{m}}a##
Let me try : ## F = \color{red}{m}a##.
It works. Sorry to bother.
 
Write this: ##\text{\text{Let's see if this can be }\color{blue}{\text{coloured}}\text{?}}##

To get this: ##\text{Let's see if this can be }\color{blue}{\text{coloured}}\text{?}##
 
  • #10
Let me see.

##\text{Let's see if this can be } \color{blue}{\text{coloured}}\text{?}##

So I suppose the trick is to put \text within \text.
 
  • #11
Um, thread closed for "Moderation"...
 
  • #12
Thread will remain closed after insults and misinformation by the OP have been deleted. Do NOT try to enhance LaTeX by changing colors. How many times have you seen colored LaTeX in peer-reviewed journal articles or textbooks? Lordy.
 
  • Skeptical
Likes   Reactions: jack action
  • #13
Ibix said:
It's worth considering whether a use of colour in maths will improve your communication with your target audience, or if another approach might be better.

brotherbobby said:
If people complain on my post with coloured equations, of course I'd stop.
Noted.
I've seen and replied to quite a few of your posts. It definitely has occurred to me that you go overboard with formatting, to the point of being somewhat of a distraction. I'll keep what you said just above in mind...
 
  • Skeptical
Likes   Reactions: jack action

Similar threads

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