0
\$\begingroup\$

It would be nice to make subscript and superscript work in comments.

Here, these work :

  • *n*<sub>0</sub><sup>2</sup>  →  n02
  • _n_<sub>0</sub><sup>2</sup>  →  n02

In comments, these fail.

Thank you.

\$\endgroup\$
5

1 Answer 1

4
\$\begingroup\$

That doesn't work because HTML is not supported in comments. It has been suggested on Meta Stack Exchange to enable it in comments, but it got declined. See this answer from Jeff Atwood ♦

We do allow very limited markdown in comments now. Click the "help" link below the Add Comment button to get comment formatting help.

  • * and _ for bold, italic
  • `` for code blocks
  • [example](http://example.com "merely an example")

No HTML, just Markdown in comments, please!

Or, if you really need it, use Unicode subscript/superscript characters, as I demonstrated in my comment.

Superscript characters:

⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹

Subscript characers:

₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉
\$\endgroup\$
10
  • \$\begingroup\$ Or use Unicode characters: n₀² \$\endgroup\$
    – ProgramFOX
    May 4, 2014 at 13:05
  • \$\begingroup\$ Thank you for the workaround. But using the ordinary characters is recommended, in particular for accessibility. Moreover, in many cases the workaround is not possible, because only very few characters exist as Unicode subscript or superscript. \$\endgroup\$ May 4, 2014 at 13:34
  • \$\begingroup\$ That's true, but unfortunately, there is not really another workaround, apart from putting it in an image, but that's worse for accessibility. \$\endgroup\$
    – ProgramFOX
    May 4, 2014 at 13:39
  • 1
    \$\begingroup\$ And an image is not possible in a comment — fortunately. \$\endgroup\$ May 4, 2014 at 13:48
  • \$\begingroup\$ @NicolasBarbulesco: It is possible, you can upload it in the answer field and then post the URL in a comment. \$\endgroup\$
    – ProgramFOX
    May 4, 2014 at 13:49
  • \$\begingroup\$ Upload an image in the answer field? Can you elaborate on that? \$\endgroup\$ Jun 18, 2015 at 16:02
  • \$\begingroup\$ Italic with * does not always work. \$\endgroup\$ Jun 18, 2015 at 16:02
  • \$\begingroup\$ @NicolasBarbulesco Hmm... that might be because the asterisk is followed by the ² sign, but as far as I can see that's only a problem in comments, not in actual posts. \$\endgroup\$
    – ProgramFOX
    Jun 18, 2015 at 16:05
  • \$\begingroup\$ Let's test: 4 π *r*². Italic fails! \$\endgroup\$ Jun 18, 2015 at 16:05
  • \$\begingroup\$ Yup, there it does, but it won't fail in questions/answers. \$\endgroup\$
    – ProgramFOX
    Jun 18, 2015 at 16:06

You must log in to answer this question.

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