How is that highlighting done?

Similar to the gray background highlighting of @names, I keep seeing posts with phrases highlighted. This is great for combining compound nouns or variable/data pairs.

OK, I give up, how’s that done??? :confused:

HI Bill,

mark your text and then click on this symbol:

And you end up with this!: :smiley:

2 Likes

Hi @wolfman Maybe my preview is screwed up because if I try to highlight > this text it doesn't show correctly. Just sticks a greater-than in front.

I'm referring to text in a sentence highlighted. Here's an example from @marfig: Desktop keyboard shortcuts don't work with conky - #3 by marfig

Blockquote looks good for multiple code lines, though:

Code line 1
Code line 2

See how this posts.
edit: yeah, tried to highlight "this text" in first sentence using blockquote - didn't work.

Use back ticks :slight_smile:

` this is highlighted if I finish it with another backtick.

I think the proper name is inline quote, or inline code

2 Likes

Hehe… I think that does it! I tried single and double quotes but not backtick/accent. Thanks!!! :grin:

1 Like

OK, extended information is called for and this post is partly to confirm all my findings.

Basically, a pair of backticks, <code></code> and </> Preformatted text. ALL DO THE SAME THING!

Yes, the backtick works fine as done here to demonstrate.

So does <code>THIS</code> which I put between backticks so the "code"s display in the post. That’s an important point. I find I cannot reverse that order to display backticks and the attempt puts the post minimized!

But there’s even more. It turns out @wolfman was only one menu symbol off the answer, too. I thought the </> function called “Preformatted text” formatted code lines. Then I discover it forces backticks around selected text!!! So there’s another way to accomplish the same thing!

Last, I looked up “backtick” and Wikipedia actually redirects instantly to Grave accent. I knew it was some kind of accent but not sure of details. Obviously, backtick is in heavy usage.

Thanks again. :joy:

2 Likes

Hi Bill,

I thought you just wanted a block quote, so yes as @marfig pointed out, use the other symbol but basically they are the same thing!. :smiley:

1 Like

Want more types of highlighting?

  • <ins>Text</ins> produces this “insert” highlighting
  • <del>Text</del> produces this “delete” highlighting
  • <strike>Text</strike> produces a uhh, never mind

One more… if you like to be sophisticated. :wink:

  • <kbd>CTRL</kbd> produces CTRL

Also, for proper code highlighting, you can add 4 spaces at the start, and optionally specify the language (if it wasn’t detected properly):

```bash
echo "Test"
```

:point_down:

echo "Test"

```python
import time
def this(self):
    print("Test")
```

:point_down:

import time
def this(self):
    print("Test")
5 Likes