Edit: how to colour an edited formula

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
14 replies · 2K views
mcastillo356
Gold Member
Messages
666
Reaction score
365
TL;DR
I've needed to edit a formula, and wanted to colour it. No way. LaTeX command "\color{red}" doesn't work. Whch should be the typing?
Hi PF
How to colour the edited formula?
Greetings!
 
Physics news on Phys.org
In what application?
[tex]\vec F_{net}=m\vec a[/tex]
... but this seems tedious to do for specific items in an equation.
Quote this post to see the tags COLOR tags surrounding the tex tags.

You could use \bf ...
[tex]\bf \vec F_{net}=m\vec a[/tex]
or \Large
[tex]\Large \vec F_{net}=m\vec a[/tex]
 
  • Informative
Likes   Reactions: mcastillo356
robphy said:
In what application?
[tex]\vec F_{net}=m\vec a[/tex]
... but this seems tedious to do for specific items in an equation.
Quote this post to see the tags COLOR tags surrounding the tex tags.

You could use \bf ...
[tex]\bf \vec F_{net}=m\vec a[/tex]
or \Large
[tex]\Large \vec F_{net}=m\vec a[/tex]
Fine. I'll give a try... Suppose I want to colour only ma in F=ma in this sentence: "The formula ##\vec F=m\vec a## is one of the most importants in physics", written inside a paragraph... How?
Thanks!
 
Indeed, [itex]\vec F=m\vec a[/itex] is an important equation.

[CODE title="LaTeX in color on PF"][itex]\vec F=m\vec a[/itex][/CODE]
 
  • Love
Likes   Reactions: mcastillo356
Hi, @robphy , PF
What about if the LaTeX inside a sentence is
\dfrac{|f(u)-f(v)|}{|u-v|}=\dfrac{||u|-|v||}{|u-v|}\leq 1
and I want to colour
\dfrac{||u|-|v||}{|u-v|}
 
A little bit mind-blowing, I will take it easy, ie, read and write down #2

Love
 
Experimenting:

V3 ## { \color{red} x } + { \color{blue} y }##

V2 ## \color{red}{x} + \color{blue}{y} ##

$$ \color{red}{x} + \color{blue}{y} $$
 
[itex]\require{colorv2} { \color{red} {\vec F_{net}}}=m {\color{blue}{\vec a}}[/itex]
 
pbuk said:
Experimenting:

V3 ## \require{colorv2} { \color{red} x } + { \color{blue} y }##

V2 ## \color{red}{x} + \color{blue}{y} ##

$$ \color{red}{x} + \color{blue}{y} $$
\require{colorv2}
 
  • Like
Likes   Reactions: pbuk
robphy said:
\require{colorv2}
Ah yes that forces it but it would be better to fix the broken configuration.
 
[itex]\require{color}<br /> \colorbox{yellow}{1+1=10}[/itex]

[itex] \color{red}1+1=10[/itex]
 
pbuk said:
Ah yes that forces it but it would be better to fix the broken configuration.
.. which Greg has now done (it was a breaking change in MathJax 3.1) so no need for \require.
 
[itex]\colorbox{yellow}{Joy!}[/itex]

[itex] \fcolorbox{black}{yellow}{$\vec F_{net}$} =m\color{blue}{\vec a}[/itex]

Now if we could only get some interactive javascript [like Desmos or trinket/Glowscript embeded]. :wink: