Highlighting or coloring text?

@SpaceLobster – if you can give us buttons, I’d use colors. The code is more trouble than I’m likely to bother with.

1 Like

I approve - Buttons please
image

“I can assure you: it will be given to someone whom you don’t know.”

For now, we’ve got bbcode to add colours to your posts.
I’ve put in a low priority ticket to my dev to look into a plugin that may add this ability as an icon in the post editor box.

What is the BBCode for adding color? We have the TeX code, but it doesn’t work within any nested features (like the “Hide Details”).

Well, the BBCode would be
[color=red]text[/color]
but that won’t work in Discourse without an additional plugin. By default it only supports a handful of BBCode commands, like those for bold ([b]bold[/b]), italic ([i]italic[/i]) and underline ([u]underline[/u]).

Yes please!

Yeah, I mispoke. It’s the latex plugin that’s giving us the colour options here, not bbcode.

Way too hard to make colors unless I’ve got buttons. I guess it’s the monochrome life for me now.

How do I change the font color and make longer text still wrap?

For example, if I type this long sentence normally, eventually it will wrap into a second line. However, when I type this exact same sentence but change the color using LaTeX code, it doesn’t wrap into a second line. Thoughts?

\textcolor{blue}{\text{For example, if I type this long sentence normally, eventually it will wrap into a second line. However, when I type this exact same sentence but change the color using LaTeX code, it doesn't wrap into a second line. Thoughts?}}

Need to google (or look up in my LaTeX references) how to insert a “new line” special character.

I think it’s a \ . . .

\textcolor{red}{\text{Test Test \\ Test Test}}

But that apparently only inserts \ as a character.

The \\ code doesn’t work within the \text instruction, but does work outside of it. So you’d have to do something like $\textcolor{red}{\text{Test Test} \\ \text{More More}}$

\textcolor{red}{\text{Test Test} \\ \text{More More}}

So it would be a manual process, and even if the lines looked OK on your screen I suspect they could still be too long for others (e.g. on mobile). Which is yet another reason extensive text coloring via LaTeX is kind of a pain in the neck.

According to this site, you should be able to use the Documentclass to do what we’re talking about. That doesn’t seem to work on here though.

\documentclass{article} \begin{document} test \end{document}

That code gives me an error message if I throw $'s around it.

I think the plug-in that the (base) software here has is a mathematics typesetter rather than document creation.

So it might be more relevant to think in terms of TeX rather than LaTeX (the latter is a “wrapper” for the former).

Huh, didn’t know that “TeX” was a thing. I’ve only ever heard it refered to as “LaTeX”. Thanks for educating me!

There used to be several flavors of TeX. I’m old enough that I first used TeX before LaTex was a thing.

LaTex seems to have won the version wars.

This is way too much effort for colors.

Many many years ago, I had a job where they wanted me to learn APL. I started on it, but boy was it user-unfriendly. I ended up with a different job before I learned more than the basics. This reminds me of that.