I usually pay a very high attention to the formatting of anything I write, especially to the mathematical notation, because in my opinion it is really important. Of course, the most important thing in formatting is its consistency, and while in principle everyone is free to follow his own personally developed guidelines, in practice personal formatting rules are usually inconsistent, since consistency requires a lot of effort, time and experience. Besides, personal formatting preferences are often different which complicates the exchange of knowledge.
Thus, it is much better to use some standard formatting rules established by some international organization responsible (among other things) for developing such standards. In the field of chemistry the most important formulary is the Quantities, Units and Symbols in Physical Chemistry, informally known as the IUPAC Green Book. The third edition of the book is freely available from the IUPAC site here (PDF, 1.47 MB), and I wish more and more of us will follow the guidelines.
In this thread I would like to discuss the formatting of one entity which appears at Chemistry.SE so often that I think it needs a particular attention. I'm talking about electron configurations. Let us take a look at IUPAC recommendations for writing them down. At the end of the day it all boils down to the following recommendation on p. 7 of the Green Book (emphasis mine):
The overall rule is that symbols representing physical quantities or variables are italic, but symbols representing units, mathematical constants, or labels, are roman.
And on p. 8 one can already find an example of how this rule applies to electron configurations (emphasis mine):
The ground and first excited electronic states of the $\ce{CH2}$ molecule are denoted $\mathrm{\dotsc (2a_1)^2 (1b_2)^2 (3a_1)^1 (1b_1)^1, \, \tilde{X} \; ^3 B_1}$ and $\mathrm{\dotsc (2a_1)^2 (1b_2)^2 (3a_1)^2, \, \tilde{a} \; ^1 A_1}$ respectively. The $\pi$-electron configuration and symmetry of the benzene molecule in its ground state are denoted: $\mathrm{\dotsc (a_{2u})^2 (e_{1g})^4, \, \tilde{X} \; ^1 A_{1g}}$. Note that all these symbols are labels and are roman.
Note here that $\pi$ in the text above is supposed to be also roman, but $\LaTeX$ for historical reasons typeset small greek letters in italics and \mathrm
does not change them to upright form. If someone knows how can we achieve upright small greek letters here at Chemistry.SE, please, share you ideas.
At p. 32 there is another piece of relevant information which is, of course, also consistent with the general rule above (emphasis again mine):
The electronic states of atoms are labeled by the value of the quantum number $L$ for the state. The value of $L$ is indicated by an upright capital letter: $\mathrm{S}, \mathrm{P}, \mathrm{D}, \mathrm{F}, \mathrm{G}, \mathrm{H}, \mathrm{I}, \, \text{and} \, \mathrm{K}, \dotsc$, are used for $L = 0, 1, 2, 3, 4, 5, 6, \, \text{and} \, 7, \dotsc$, respectively. The corresponding lower case letters are used for the orbital angular momentum of a single electron. [...] Finally, the electron configuration of an atom is indicated by giving the occupation of each one-electron orbital as in the examples below.
Examples*
$\mathrm{B: (1s)^2 (2s)^2 (2p)^1, \; ^2 P^{\circ}_{1/2}}$
$\mathrm{C: (1s)^2 (2s)^2 (2p)^2, \; ^3 P_0}$
$\mathrm{N: (1s)^2 (2s)^2 (2p)^3, \; ^4 S^{\circ}}$
In my opinion we should follow this IUPAC suggested formatting, although I think the brackets can often be omitted as usual. Currently to get here at Chemitry.SE the requred output the easiest way is to use \mathrm
environment as follows. For example, to get
$$\mathrm{(1s)^2 (2s)^2 (2p)^2}$$
simply write
$$\mathrm{(1s)^2 (2s)^2 (2p)^2}$$
* The right superscript $\circ$ on the term symbol is used to indicate odd parity.