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

  • #1
brotherbobby
618
152
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
  • #2
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 berkeman
  • #3
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 phinds
  • #4
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?
 
  • #5
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 Vanadium 50
  • #6
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:
  • #7
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 Vanadium 50
  • #8
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.
 
  • #9
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 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 jack action

1. What is the default color in ##\LaTeX##?

The default color in ##\LaTeX## is black. However, you can change the color by using the command \color{color name} before the text you want to change.

2. How can I change the color of my text in ##\LaTeX##?

To change the color of your text, you can use the command \color{color name} before the text you want to change. You can also define your own custom colors using the command \definecolor{color name}{rgb}{red, green, blue}.

3. Can I use different colors for different parts of my document in ##\LaTeX##?

Yes, you can use different colors for different parts of your document by using the \color{color name} command before the text you want to change. You can also change the color for an entire section or document by using the commands \textcolor{color name}{text} or \colorbox{color name}{text} respectively.

4. How can I preview my document in ##\LaTeX## before compiling it?

You can use the command \usepackage{preview} to preview your document in ##\LaTeX## before compiling it. This will create a separate preview file with a scaled down version of your document, allowing you to see how it will look before compiling.

5. Can I change the font color in my document using ##\LaTeX##?

Yes, you can change the font color in your document by using the command \textcolor{color name}{text} before the text you want to change. You can also change the font color for an entire section or document by using the commands \color{color name}{text} or \colorbox{color name}{text} respectively.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
261
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
801
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
2
Replies
36
Views
916
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
Back
Top