In my opinion this is certainly a good topic for discussion, but I think it is posed in the wrong terms. It seems to imply that there can be a “one size fits all” solution for representing chemical compounds in all text in a SE Biology question — a “correct” portmanteau solution that can even perhaps be imposed as official policy.
What I think should be done is that people should appreciate the different factors that need to be taken into account, before taking the best decision for their particular circumstances, and that it it these factors that should be discussed in answers to the question. My contribution to this discussion follows.
Any decision an individual takes should take into account:
- What representational formats SE supports with different devices (‘user agents’) and software
- The position of the material — title, body text or comment
- The necessity or otherwise of representing a chemical by formula rather than by name
- Aesthetics and convention
- Accessibility
- Indexing and Search
- The technical skills of the individual
User Agents and Position of Material
This is more complex than I realized, as there is a difference between rendering on SE web pages (either on computers or on phones) and using the Stack Exchange iPhone or Android apps. From inspection of a test message I posted it transpires that:
- HTML formulae cannot be used in comments or titles — subscripts and superscripts do not render — but can be used in the body of questions
- LaTeX formulae can be used in all of these when viewing on the web, but not in titles or comments when the iPhone or Android app is used.
Are formulae necessary or preferable?
Valid reasons for using a formula rather than the name of a compound seem to me to be:
- In presenting a chemical equation or representation of a conversion
- Where the structure is necessary for distinguishing species
- Where the chemical name is very long
- Where there is enough repetition that it would make the text too long
This is the professional convention found in biochemical text books such as Berg et al., and example of which I show below.
This illustrates how the chemical formula is not used in titles or opening paragraphs of a general nature, but is used in a more technical section with heavy repetition.
The reason for this professional convention is, I think, communication. Other things being equal, write things down in the way that best communicates to most people — don’t give the appearance of talking to an elite circle. And don’t force your reader to make the psychological shift from text to formula gratuitously.
Aesthetics and Convention
For the few biologist who are familiar with LaTeX, the illustrations above settle the question of which of 2, 3 or 5 is preferable. Where formulae are used in the biochemical literature, including journals, formulae are represented in the same typeface and the same style (Roman, not italic) as the normal text. That is why 2 or 3 are incongruous, but 5 (which I have not seen before) is not. And although 2 is worse than 3, both will ‘feel’ wrong to reader who does not have the mental LaTeX baggage to excuse them, but has read biochemistry or chemistry text books or papers.
Accessibility
My Mac read the page on Safari correctly, and so would appear to read the rendered code. It is claimed that the LaTeX markup used by Stack Exchange is readable by screen readers such as JAWS, but I have not been able to confirm this. Obviously a graphic alternative would not be accessible.
Indexing and Search
I am unclear how the Google search engine would index titles using LaTeX markup. It seems to me there is a danger here, as with rendering formulae that could be interpreted as words. Certainly a search for carbon dioxide shows that in the retrieved abstracts it is rendered without a subscript, in some cases with a space between the CO and the 2. This is a reason why I would avoid spell the name out in full in any title I wanted indexing.
Individual Skills
People familiar with LaTex are perhaps unaware of how few biologists know it or would consider learning it. I have worked with computers in biology for about 30 years and hold a Masters degree in IT, but have never had any cause to learn it, and dislike its non-intuitive nature, which to me resembles my other pet hate, regular expressions. I only state this to illustrate how you wouldn’t get me to follow any edict to use LaTeX, and that you are unlikely to have success with a large proportion of users. I find HTML markup more intuitive, and feel it would be easier for someone who wanted to to learn the sub and sup tags, but I accept that many users wouldn’t even want to do this. Which alternative a more adventuresome biologist would prefer, would depend on his nature. He should be offered the choice.
My Recommendations
- For titles of questions avoid chemical formulae completely unless they cannot be avoided. Even if you wish to refer to a chemical with a name that you felt too long as text, ask yourself whether it has to appear in the title of your question. This way your title will be readable on all devices and stand the best chance of being indexed properly.
- For the body of questions only use chemical formulae if they are necessary according to the criteria above. If they are, and you have the skill or are prepared to learn it, use either (4) HTML markup (sub, sup) or (5) a LaTeX form that renders the chemical lettering in the same typeface as the rest of the text. Otherwise use no formatting (1) and hope that someone will edit it (according to 4 or 5) for you.
- For comments use LaTeX or no markup. The subsidiary nature of comments means that defects in presentation are unlikely to be important here.