1
$\begingroup$

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?

  1. No formatting:

    CO2 CO2

  2. LaTeX:

    $CO_2$ $CO_2$

  3. mhchem via LaTeX:

    $\ce{CO2}$ $\ce{CO2}$

  4. HTML markup:

    CO<sub>2</sub> CO2

  5. LaTeX only for subscripts and superscripts:

    CO$_2$ CO$_2$

  6. 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

$\endgroup$
7
  • $\begingroup$ Nice question TNT, but in the poll the formatted options are not shown, making it a little difficult to vote. Just saying. $\endgroup$
    – AliceD Mod
    Jul 17, 2020 at 7:29
  • $\begingroup$ Polling is not the way to approach this question and I will boycott that. What it needs is reasoned argument. That I will provide. $\endgroup$
    – David
    Jul 17, 2020 at 8:15
  • $\begingroup$ @David So should I remove the poll? $\endgroup$ Jul 17, 2020 at 9:03
  • $\begingroup$ @AliceD yes but I have no idea how to include the formatting in the poll. Maybe I should remove the poll, and we could use upvotes on answers to determine consensus. $\endgroup$ Jul 17, 2020 at 9:14
  • $\begingroup$ Could you clarify. What are the different markups you show in 2, 3 and 5 (and indeed 4, although I know what that is). In particular, are they LaTeX or MathML? This has accessibility implications for users dependent on screen readers. $\endgroup$
    – David
    Jul 17, 2020 at 11:10
  • $\begingroup$ @David thank you for the suggestion. I have edited my question. $\endgroup$ Jul 17, 2020 at 11:34
  • $\begingroup$ Thanks for your edit. You will see I have been busy writing an answer, interrupted a couple of times. $\endgroup$
    – David
    Jul 17, 2020 at 13:47

1 Answer 1

2
$\begingroup$

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. Representation of carbon dioxide in Berg 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.
$\endgroup$
6
  • $\begingroup$ I would be grateful for information on how screen readers interpret the LaTeX on SE pages, as they do not read (or do not just read) the rendered text but have to read the HTML to deal with links etc. Likewise, searching and indexing by Google's search engine. $\endgroup$
    – David
    Jul 17, 2020 at 13:50
  • $\begingroup$ LaTeX formulae do not render in both the titles and comments of the android app. I think it would be similar for the iPhone app as well. $\endgroup$ Jul 17, 2020 at 14:01
  • $\begingroup$ @trinitrotoluene — yes, it's the same for the iPhone app, as I think I said. I'll edit my answer. $\endgroup$
    – David
    Jul 17, 2020 at 14:05
  • $\begingroup$ The apps are now considered legacy and SE doesn't support them anymore. Not necessarily a reason not to keep them in mind since people still use them, though. $\endgroup$
    – Bryan Krause Mod
    Jul 17, 2020 at 16:07
  • $\begingroup$ @Bryan Krause oh is that why I'm unable to upload photos via the app? $\endgroup$ Jul 17, 2020 at 17:54
  • $\begingroup$ @BryanKrause — It was chance I was using my wife’s phone to check and she hadn’t the app installed. Made me wonder if SE had gone the same route as other organisations that have dumped their apps for responsive web sites. Only difference is that the others told me. $\endgroup$
    – David
    Jul 17, 2020 at 18:35

You must log in to answer this question.

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