# Is there left any way to highlight part of text after all?

Currently we have quotes, but

the quoted text looks more faint than the surrounding text

The vertical bar hardly helps, I believe. In fact I think (although I cannot explain it) that this bar somehow makes things even worse.

OK I realize that all this is my subjective impression, but I can imagine that many users would agree with it.

One can make the quoted text bold,

but this somehow cries out too much, at the same time still remaining too faint by some reason.

What else? There is code,

but again this is something still different, right?


Is there any rationale behind this particular style of quoting?

Slightly later:

One more possibility occurred to me: one might abuse MathJax with $$\color{red}{\textsf{some \rm\TeX hacks}}$$, including $$\require{color}\colorbox{pink}{background highlighting}$$ (done, respectively, like this $\color{red}{\textsf{some$\rm\TeX$hacks}}$ and this $\require{color}\colorbox{pink}{background highlighting}$), but I'm afraid this solution might be objectionable. What do you think?

• This reminded me of a discussion whether blockquote should be used for highlighting (rather than quoting) on Mathematics Meta: Is using blockquote for highlighting problematic? – Martin Sleziak Oct 14 '20 at 1:21
• Here is a related thread on Meta Stack Exchange: Where should I use Blockquotes? There is also a bit of related discussion in the comments under this unser: How to write a good MathOverflow question? (MO users and moderators use many features of the Stack Exchange software differently from what they were intended for. Having said that, I am certainly guilty of using blockquote for emphasis myself.) – Martin Sleziak Oct 14 '20 at 5:58
• Does \TeX really need the \rm? Experiment: without \rm $\TeX$ versus with \rm $\rm\TeX$. Huh, so it does. What about outside of math mode? \TeX Aha, I see it doesn't register there at all. – LSpice Oct 19 '20 at 19:19
• @LSpice You see, to invoke MathJax one needs dollars, and inside dollars the argument of \color stays in math mode while the (main) argument of \colorbox is switched to the text mode. So to write colored upright $\rm\TeX$ one needs to make two more switchings the second of which I failed to make and which Asaf kindly provided. – მამუკა ჯიბლაძე Oct 20 '20 at 6:59
• Regarding the most recent edit: the 'thingy' is one of the pieces from the game sometimes known as 'Jacks' britannica.com/topic/jacks en.wikipedia.org/wiki/Knucklebones#/media/… – David Roberts Oct 27 '20 at 12:52

### Or even smaller section headers

And, please, for the love of Erdős, do not use those other hacks. They are wrong semantical markup, and I find them all very objectionable. For instance, I have found myself searching for the source of a "quote" in the past, thinking that they were quoting something that someone wrote earlier in another answer.

(Also, you are not writing an ad. Excessive highlighting should be avoided, in my view.)

• I basically agree with you and promise not to misuse mathjax. However I still miss possibility to have a paragraph with shaded background for the concise version of the question or the main message of an answer. – მამუკა ჯიბლაძე Oct 14 '20 at 19:55
• @მამუკაჯიბლაძე What about using instead something like: Main question. This paragraph contains a brief summary of the main questions, so I marked it with bold - thus making the summary easier to find. (Of course, one can use "TL;DR;" or something completely different instead of "main question".) – Martin Sleziak Oct 15 '20 at 4:01
• @MartinSleziak This only works completely well at the end of the post - otherwise it is not easily noticeable where does it end. – მამუკა ჯიბლაძე Oct 15 '20 at 4:49
• I see it the other way round: I read text highlighted by gray background as central information. Quotes need "quotes" for me (while still not everything between quotes is a quote). – Dirk Oct 15 '20 at 7:58
• In a different direction: Why is using headlines instead of quotes less wrong in a semantical way? A questions is not a headline by any means. – Dirk Oct 26 '20 at 11:47
• @Dirk If writing the question as a section header does not make sense semantically (though sometimes it does: short questions often make good headlines), then you can always open with a section header # Main question and write your question in normal text after that. This is similar to what David Roberts added to his answer. – Federico Poloni Oct 26 '20 at 13:45

I personally liked to use quoting for highlighting a question in a long body of text,

but now the style has changed, and I am also persuaded by the semantic markup issue.

But this answer is mostly to demonstrate that code style is much more terrible, since long lines don't wrap, and one gets a scroll bar, and on mobile I think this is much worse than any problem with quoting for emphasis.


What would be nice is to be able to highlight some text background, like the old quote style used to do.

Also, would it be to use horizontal lines like this to delineate a question?

This way one would at least focus some attention. But I worry that again it's a (slightly lesser) abuse of the semantic content of the markdown. Also, one needs a blank line before the second line command (----) else it turns the question into a heading.

• Another alternative is to make a single bullet list item!

### Question 1:

Does a vertically-delineated section with a question header like this one help with your problem?

It's always possible to have a bit more text afterwards. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

### Question 2:

And would you like a second question?

Followed by some closing remarks. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

• Actually three dashes are enough. – Asaf Karagila Mod Oct 14 '20 at 8:27
• What is semantic markup? – მამუკა ჯიბლაძე Oct 14 '20 at 8:38
• @მამუკაჯიბლაძე It means that the commands to change the appearance of the text are not just about appearance, but they encode meaning to the enclosed text that a machine can read, perhaps one that translates for a person using a screen reader. For instance, using \emph in LaTeX emphasizes the text relative to the surrounding text, not just "make italic". – David Roberts Oct 14 '20 at 8:58
• @AsafKaragila thanks for picking that up. I think I might have muscle memory from somewhere! – David Roberts Oct 14 '20 at 9:48
• @DavidRoberts Note that the correct HTML equivalent of \emph is <i>, not <em>. – wizzwizz4 Oct 18 '20 at 17:23
• @wizzwizz4 Why do you think so? – Federico Poloni Oct 18 '20 at 19:19
• @FedericoPoloni Because I have been looking at a lot of non-semantic TeX documents, apparently; I thought people used \emph for Latin words and stuff. Here are <i> and <em>'s usage guidelines. <em> should be used for stress emphasis (e.g. just then), and <i> should be used for per se italicised text that isn't necessarily emphasised. – wizzwizz4 Oct 18 '20 at 20:38
• @wizzwizz4 erm, I'm fairly sure that \emph emphasises text: if you use it in an environment where the text is italic by default, the \emphed text becomes upright. TeX's \it is like HTML's <i>, methinks. Although, looking at the reference for <i>, it seems that this doesn't do what it used to do (when I learned HTML a looong time ago). These days with CSS, I guess one can make HTML do nearly anything.... – David Roberts Oct 18 '20 at 22:51
• @მამუკა just added another variation for making a question stand out, if you are still interested. – David Roberts Oct 20 '20 at 6:15
• If only there would be a way to use at least very restricted amount of css in the se markup... – მამუკა ჯიბლაძე Oct 20 '20 at 6:26