user60792: What is the correct formatting for names of compounds in Biology.SE? Recently, this question has been edited multiple times on the basis of formatting. So, I think it would be best to decide on a particular formatting in this meta post.
For example, how would you format carbon dioxide?

No formatting:
CO2 CO2

LaTeX:
$CO_2$ $CO_2$

mhchem via LaTeX:
$\ce{CO2}$ $\ce{CO2}$

HTML markup:
CO<sub>2</sub> CO2

LaTeX only for subscripts and superscripts:
CO$_2$ CO$_2$

None of these are suitable and it is preferable to just write its name in full


Notes:

One problem with using formatting is that it does not display properly in titles in the mobile app

My personal preference is (3) since I find it to be the cleanest

Selecting a formatting for this site will make it more coherent

If you prefer a formatting other than the ones mentioned please add it in the comments



user22057: 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.


60792: <p>What is the correct formatting for names of compounds in Biology.SE? Recently, <a href="https://biology.stackexchange.com/q/94696/60792">this</a> question has been edited multiple times on the basis of formatting. So, I think it would be best to decide on a particular formatting in this meta post.</p>
<p>For example, how would you format carbon dioxide?</p>
<ol>
<li><p>No formatting:</p>
<p><code>CO2</code> CO2</p>
</li>
<li><p>LaTeX:</p>
<p><code>$CO_2$</code> <span class="math-container">$CO_2$</span></p>
</li>
<li><p>mhchem via LaTeX:</p>
<p><code>$\ce{CO2}$</code> <span class="math-container">$\ce{CO2}$</span></p>
</li>
<li><p>HTML markup:</p>
<p><code>CO&lt;sub&gt;2&lt;/sub&gt;</code> CO<sub>2</sub></p>
</li>
<li><p>LaTeX only for subscripts and superscripts:</p>
<p><code>CO$_2$</code> CO<span class="math-container">$_2$</span></p>
</li>
<li><p>None of these are suitable and it is preferable to just write its name in full</p>
</li>
</ol>
<p>Notes:</p>
<ul>
<li><p>One problem with using formatting is that it does not display properly in titles in the mobile app</p>
</li>
<li><p>My personal preference is (3) since I find it to be the cleanest</p>
</li>
<li><p>Selecting a formatting for this site will make it more coherent</p>
</li>
<li><p>If you prefer a formatting other than the ones mentioned please add it in the comments</p>
</li>
</ul>
 22057: <p>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.</p>
<p>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.</p>
<p>Any decision an individual takes should take into account:</p>
<ul>
<li>What representational formats SE supports with different devices (‘user agents’) and software</li>
<li>The position of the material — title, body text or comment</li>
<li>The necessity or otherwise of representing a chemical by formula rather than by name</li>
<li>Aesthetics and convention</li>
<li>Accessibility</li>
<li>Indexing and Search</li>
<li>The technical skills of the individual</li>
</ul>
<p><strong>User Agents and Position of Material</strong></p>
<p>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:</p>
<ul>
<li>HTML formulae cannot be used in comments or titles — subscripts and superscripts do not render — but can be used in the body of questions</li>
<li>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.</li>
</ul>
<p><strong>Are formulae necessary or preferable?</strong></p>
<p>Valid reasons for using a formula rather than the name of a compound seem to me to be:</p>
<ul>
<li>In presenting a chemical equation or representation of a conversion</li>
<li>Where the structure is necessary for distinguishing species</li>
<li>Where the chemical name is very long</li>
<li>Where there is enough repetition that it would make the text too long</li>
</ul>
<p>This is the professional convention found in biochemical text books such as Berg <em>et al.</em>, and <a href="https://www.ncbi.nlm.nih.gov/books/NBK22344/" rel="nofollow noreferrer">example</a> of which I show below.
<a href="https://i.stack.imgur.com/0pT1U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0pT1U.png" alt="Representation of carbon dioxide in Berg" /></a>
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.</p>
<p>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.</p>
<p><strong>Aesthetics and Convention</strong></p>
<p>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 <em>italic</em>) 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.</p>
<p><strong>Accessibility</strong></p>
<p>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.</p>
<p><strong>Indexing and Search</strong></p>
<p>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.</p>
<p><strong>Individual Skills</strong></p>
<p>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 <em>who wanted to</em> 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.</p>
<p><strong>My Recommendations</strong></p>
<ul>
<li>For <strong>titles</strong> 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.</li>
<li>For the <strong>body</strong> 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.</li>
<li>For <strong>comments</strong> use LaTeX or no markup. The subsidiary nature of comments means that defects in presentation are unlikely to be important here.</li>
</ul>
