7
$\begingroup$

Doing some markup and noticed something that annoyed me. I wanted to indicate a precipitate or gas such as:

\begin{array}{ll} \text{Markup} & \text{Displays}\\\hline \text{\ce{AgCN v + KNO3}} & \ce{AgCN v + KNO3} \\ \text{\ce{CO2 ^ + KNO3}} & \ce{CO2 ^ + KNO3} \\ \end{array}

To me the extra space between the chemical formula and the arrow is unattractive. I noticed the following markup gave me what I wanted.

Would this be a better format?

\begin{array}{ll} \text{Markup} & \text{Displays}\\\hline \text{\ce{AgCN}\ce{v + KNO3}} & \ce{AgCN}\ce{v + KNO3} \\ \text{\ce{CO2}\ce{^ + KNO3}} & \ce{CO2}\ce{^ + KNO3}\\ \end{array}

In other words, change the markup rendering so that the extra space is removed without having to use a work around.

$\endgroup$
13
  • 4
    $\begingroup$ I am very open to hear authoritative arguments. IUPAC or ACS, for instance. $\endgroup$
    – mhchem
    Commented Dec 13, 2017 at 20:35
  • $\begingroup$ Best that I can tell neither ACS Style Guide nor IUPAC guides mention using arrows for a gas or precipitate in a liquid reaction. The ACS style guides in fact suggests $\ce{CO2(g)}$ and $\ce{AgCN(s)}$. $\endgroup$
    – MaxW
    Commented Dec 13, 2017 at 21:25
  • 1
    $\begingroup$ I have retagged the question, since it is not a feature request within the SE developers domain. || I personally like it, that there is a small space. I think that the spaces around the + are a bit small though, maybe if they were wider, you would also find it better. $\endgroup$ Commented Dec 14, 2017 at 5:50
  • 1
    $\begingroup$ I also find the first variant with a little horizontal gap more attractive (might be the baby duck syndrome though). What I think really needs an improvement, is the Ångström Å symbol in math mode, which currently looks downright awful. $\endgroup$
    – andselisk Mod
    Commented Dec 14, 2017 at 13:09
  • 1
    $\begingroup$ On Win8.1Pro/Quantum, the first option has a space that is too large imo: see picture. It should be something between the two options, I think. $\endgroup$ Commented Dec 18, 2017 at 15:25
  • $\begingroup$ Perhaps its just not my area, but is this notation used commonly? I haven't seen it elsewhere before and don't necessarily see the convenience over just writing the state. $\endgroup$
    – Tyberius Mod
    Commented Dec 18, 2017 at 20:53
  • 1
    $\begingroup$ @Tyberius I certainly have never seen this notation, nor do I like it one bit. That being said, I would be curious to see concrete examples of this notation used elsewhere if anyone has an example to link to. $\endgroup$ Commented Dec 19, 2017 at 1:38
  • 3
    $\begingroup$ I guess you young whippersnappers have to go back to some chemistry books with earth, air water, and fire as the elements to see the arrow notation. $\endgroup$
    – MaxW
    Commented Dec 19, 2017 at 1:58
  • $\begingroup$ Okay I can see the application of this given the target audience of this textbook series. Fascinating stuff. Note: Spot-checking some in-book examples seems to put species with arrows at then end of a chemical equation. Thanks for the link @MaxW! $\endgroup$ Commented Dec 20, 2017 at 15:03
  • $\begingroup$ I think the \downarrow gives less space than using v and more space than using the alternative markup. It is worth trying. And I think the (s) and (g) descriptives are sometimes confusing. Take for example, when AuCl3 is reduced to Au in sol form. Writing the (s) may mean that it is precipitated, but it is not actually precipitated. Some books use the (sol) descriptive though I don't know if it is recommended by IUPAC. A combination of \downarrow and (s) might clarify that precipitation is taking place. $\endgroup$
    – S R Maiti
    Commented Dec 25, 2017 at 14:02
  • $\begingroup$ @MaxW Please don't write \ce{AgCN}\ce{v + KNO3}. This is the opposite of semantic markup. $\endgroup$
    – mhchem
    Commented Dec 29, 2017 at 2:16
  • $\begingroup$ @ShoubhikRajMaiti I think you are wrong. Writing \ce{AgCN v} and \ce{AgCN\downarrow} and \mathrm{AgCN}\downarrow produces the exactly same output. (At the moment, until this discussion may have led to a change.) $\endgroup$
    – mhchem
    Commented Dec 29, 2017 at 2:18
  • $\begingroup$ @mhchem Oh, sorry. I may have made a mistake. It was probably optical illusion. $\endgroup$
    – S R Maiti
    Commented Dec 29, 2017 at 9:02

2 Answers 2

4
$\begingroup$

A ‘better’ cheap hack to reduce the distance between the arrow and the formula is to use negative space, \!.

$$\begin{array}{lc}\text{Markup} & \text{Output}\\ \hline \text{\ce{AgCN v + KNO3}} & \ce{AgCN v + KNO3}\\ \text{\ce{AgCN \! v + KNO3}} & \ce{AgCN \! v + KNO3}\\ \text{\ce{CO2 ^ + KNO3}} & \ce{CO2 ^ + KNO3}\\ \text{\ce{CO2 \! ^ + KNO3}} & \ce{CO2 \! ^ + KNO3}\\ \end{array}$$

$\endgroup$
2
  • 1
    $\begingroup$ Oh no! Please don't use spacing commands within \ce! But I take this as a proposal to change the mhchem output. $\endgroup$
    – mhchem
    Commented Dec 29, 2017 at 2:19
  • $\begingroup$ @mhchem Looking at this on mobile makes me notice that it’s very different from the desktop version. Now, I assume that different OS well also tender differently. $\endgroup$
    – Jan
    Commented Dec 29, 2017 at 4:13
3
$\begingroup$

\ce{AgCN v + KNO3} will be rendered as \mathrm{AgCN}\downarrow{}..., i.e. I did not change the default LaTeX spacing. For comparison, current situation (as of writing):

$\ce{AgCN (s) + KNO3}\\ \mathrm{AgCN}\downarrow{}{}+{}\mathrm{KNO}{\vphantom{X}}_{\smash[t]{3}}$

So, it seems some of you prefer a smaller gap like this:

$\ce{AgCN (s) + KNO3}\\ \mathrm{AgCN}\!\downarrow{}{}+{}\mathrm{KNO}{\vphantom{X}}_{\smash[t]{3}}$

(Upvote if you prefer that change to mhchem.)

However, while I trust your judgement a great deal, I'd like to see some authoritative arguments, just to be sure. The example MaxW supplied, uses much larger gaps, but is a bad example for chemical typography (in general, reading is not supported by Gestalt law of proximity). So if you happen to know some well-typeset textbook that has small spacings, please let me know.

Upate: I realize now that \downarrow is not just a character, but an "active entity", an extensible delimeter. Its spacings vary depending on what comes before and after. For instance $a\downarrow$. and $a\downarrow{}$. result in different spacings ($a\downarrow$., $a\downarrow{}$.), in contrast to $a$., $a{}$. ($a$., $a{}$.). Sorry for having missed that. I will definitely fix mhchem and it will look like this:

$\ce{AgCN (s) + KNO3}\\ \mathrm{AgCN}\mskip2mu{\downarrow}{}+{}\mathrm{KNO}{\vphantom{X}}_{\smash[t]{3}}$

$\endgroup$
2
  • $\begingroup$ I doubt that there is any "authoritative argument." [Reference to vague and unknown authority obviously isn't working ;-) ] Part of my problem is that the spacing between the down arrow and the plus symbol is different that the spacing between the plus symbol and the "K". Obviously a proportional font is being used so the spacings are not the same. It also seems to me that the space between the N and the arrow should be much less than the space between the arrow and the plus sign. // With all that being said, it probably is a bad idea to start willy-nilly altering the default LaTeX spacing. $\endgroup$
    – MaxW
    Commented Dec 29, 2017 at 3:45
  • 1
    $\begingroup$ The right side spacing difference is just optical, similar to the perceived different spacing of \ce{H + X} and \ce{H- + X} ($\ce{H + X}$, $\ce{H- + X}$). Oh, wait, no. There is more to it. See my update above. $\endgroup$
    – mhchem
    Commented Dec 29, 2017 at 8:37

You must log in to answer this question.

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