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\$
  • \$\begingroup\$ *n*<sub>0</sub><sup>2</sup> \$\endgroup\$ – Nicolas Barbulesco May 4 '14 at 12:44
  • \$\begingroup\$ _n_<sub>0</sub><sup>2</sup> \$\endgroup\$ – Nicolas Barbulesco May 4 '14 at 12:45
  • 3
    \$\begingroup\$ These things also work on sites with MathJax enabled, but I've never felt that CodeGolf was mathy enough to make that work asking for. \$\endgroup\$ – dmckee May 4 '14 at 14:42
  • 2
    \$\begingroup\$ Works for me. n₀². \$\endgroup\$ – Konrad Borowski May 4 '14 at 17:52
  • \$\begingroup\$ @xfix — You joker ! Try to write u_b^n with your trick. We discuss this trick here in the comments. \$\endgroup\$ – Nicolas Barbulesco May 4 '14 at 20:11
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\$
  • \$\begingroup\$ Or use Unicode characters: n₀² \$\endgroup\$ – ProgramFOX May 4 '14 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\$ – Nicolas Barbulesco May 4 '14 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 '14 at 13:39
  • 1
    \$\begingroup\$ And an image is not possible in a comment — fortunately. \$\endgroup\$ – Nicolas Barbulesco May 4 '14 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 '14 at 13:49
  • \$\begingroup\$ Upload an image in the answer field? Can you elaborate on that? \$\endgroup\$ – Nicolas Barbulesco Jun 18 '15 at 16:02
  • \$\begingroup\$ Italic with * does not always work. \$\endgroup\$ – Nicolas Barbulesco Jun 18 '15 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 '15 at 16:05
  • \$\begingroup\$ Let's test: 4 π *r*². Italic fails! \$\endgroup\$ – Nicolas Barbulesco Jun 18 '15 at 16:05
  • \$\begingroup\$ Yup, there it does, but it won't fail in questions/answers. \$\endgroup\$ – ProgramFOX Jun 18 '15 at 16:06

You must log in to answer this question.

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