[Question edited on 5/28/16] I have read this link. But I still don't understand how to color the text a sentence. Can one actually do that?

  • Could anyone give an example for coloring the text? a sentence?
  • Where should I go when I have the similar formatting question?
  • $\begingroup$ Use \color{blue}{text} to get $\color{blue}{text}$ $\endgroup$ – tatan May 29 '16 at 2:08

$\color{blue}{\textrm{One can color text}}$ by writing

$\color{blue}{\textrm{One can color text}}$

  • 2
    $\begingroup$ This is a poor way to do it. If you now already felt the need to bump this old thread for adding this answer you could at least include a solution that does not use a font different from the one used for actual text. $\endgroup$ – quid May 29 '16 at 1:26
  • 2
    $\begingroup$ Actually, I don't understand the discussion under the answer of Mariano. And neither your comment. What do you mean by "a font different from the one used for actual text"? $\endgroup$ – Jack May 29 '16 at 1:29
  • $\begingroup$ It is not the same font. What is unclear about this. Look closely and you will see it is not the same. And on the "text": you included a math environment, this is not text anymore. $\endgroup$ – quid May 29 '16 at 1:32
  • 5
    $\begingroup$ Ah, so the point is that the answer depends on how I phrase my question. If one wants to color some words, then he/she can use the math environment. But no way to color text. I have never understood this until today. Thanks a lot for your comment! $\endgroup$ – Jack May 29 '16 at 1:41
  • $\begingroup$ Yes. Coloring text is not supported. However, using MathJax it is possible to introduce color "through the backdoor." There are however several disadvantages to using it in this way, it is therefore discouraged to do what you recommend in your answer. A slightly better way is explained in meta.math.stackexchange.com/questions/20503 But one still should not used it to insert color all over. $\endgroup$ – quid May 29 '16 at 1:45

You cannot color text. That can be deduced from the post you linked to.

  • 20
    $\begingroup$ $\rm \color{red}{BUT}\color{green}{\ YOU}\color{blue}{\ CAN!} $ $\endgroup$ – Bill Dubuque Jul 9 '11 at 1:25
  • $\begingroup$ @Bill: I made the same point a few hours ago. But in order not to encourage it I removed my comment. (I agree that Mariano's answer invites such a comment but I'd be surprised if he hadn't known about that trick) $\endgroup$ – t.b. Jul 9 '11 at 2:09
  • 1
    $\begingroup$ I even object to \rm, in fact :) A mismatch set of fonts is never nice on the eye... let alone if they are randomly colored! $\endgroup$ – Mariano Suárez-Álvarez Jul 9 '11 at 2:11
  • 4
    $\begingroup$ @Bill: Mariano explicitly stated "text". You did not color "text". :) $\endgroup$ – Willie Wong Jul 9 '11 at 10:16
  • $\begingroup$ @Willie But it is TeXt! For the rare occasions one needs such, this kludge usually suffices. $\endgroup$ – Bill Dubuque Jul 9 '11 at 13:24
  • $\begingroup$ @Mar RGB is not random. Nor is anyone recommending fruit salad text or "mismatched" fonts. $\endgroup$ – Bill Dubuque Jul 9 '11 at 13:31
  • 1
    $\begingroup$ @Bill: Did you do that in the $$ environment? $\endgroup$ – Jack Jul 21 '11 at 0:28
  • 4
    $\begingroup$ @Jack Yes, I used the LaTeX \color command. $\endgroup$ – Bill Dubuque Jul 21 '11 at 1:27
  • $\begingroup$ $\rm\color{pink} {\pi} $ $\endgroup$ – endgame yourgame Jul 16 '20 at 15:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .