# Allow sub- and superscripts in titles

Subscripts and superscripts are very commonly used in chemistry, biology and physics. You can hardly write a sentence without needing one of those, e.g

• chemical formulas like H2O, H2SO4, H2 or O2
• isotopes like 13C or 238U
• variables or constants like τc or ΔrG°

Now, the major feature that makes it easier to type those things on the scientific SE sites is MathJax. This works very well for certain things in the question text, but it has significant drawbacks in other areas, like inside the question title.

Using MathJax in the title means that the LaTeX code is displayed e.g. in the Google result title, which is not exactly optimal. Using MathJax for chemical formulas is also not always appropriate as the different font and size used by it can make those formulas look a bit out of place.

So, in many cases using plain superscripts and subscripts would be preferable over MathJax. Though it could be vastly more convenient (e.g. with keyboard shortcuts), it is possible to already use them in the main body of a post. It is however not possible to use them in titles.

I propose to allow sub- and superscript tags in question titles, they should be rendered when the title is displayed on the site, and silently discarded for the HTML title and URLs.

The one case where this could get problematic is if somebody would actually want to talk about the <sub> or the <sup> tag. Either some way of escaping would be necessary, or it should be a per-site setting that is disabled on programming sites.

-
Whilst I see the problem, I would prefer the SE team to come up with a solution that removes the LaTeX code from Google results, rather than expecting users to know Markdown, LaTeX and HTML... –  Matt Jun 18 '12 at 15:16
IMO, there are two issues here. One is the font size, which can be easily addressed (ping me in chat, I have multiple workarounds). The other is the fact that $\ce{...}$ etc are incorporated in the URL/page <title> (meta.chemistry.stackexchange.com/q/149/22). This will require some tweaks, (namely .replace(/\$\\ce\{([^}]+)\}/ig,"$1")), which it seems the devs may not do (See Shog's answer on the linked post). –  Manishearth Jun 18 '12 at 15:28
The only even potentially-workable solution I can think of here would involve Unicode super/subscripts - have you tried using these directly? –  Shog9 Jun 18 '12 at 18:36
@Shog9 I've seen at least one question on chemistry using those, but they are not a solution IMHO, not easy to insert and look rather ugly. –  Mad Scientist Jun 18 '12 at 21:21
That title edit is going to be ugly –  random Aug 25 '12 at 17:56
It should be allowed in comments as well. Another thing that I think would be nice is to have formatting buttons for subscript/superscript for posts. It is irritating to write <sub></sub> for multiple chemical formulae. The use of TeX should be minimized. –  WYSIWYG Oct 9 '14 at 11:31
Another decent option is to enable toggling between the standard US and the US-international keyboard layout. With international you can type the unicodes. Another option is to set compose key –  WYSIWYG Oct 9 '14 at 13:11