# Straight $\mathrm{d}$ or italic $d$ for differentials?

$$\int \mathrm{d}r \qquad \text{or} \qquad \int dr.$$

I have always thought that it should not be italiced as it is an operator.
However, some have said that it may be confused with an exterior derivative.

Is there a convention I should follow? Are the situations that are better suited for one or the other?

EDIT

just to be clear. This isn’t a physics question. I am just wondering about the usage on this site - whether there is a convention based on precedents.

• This is not on-topic on meta. Do you want me to migrate it to the main site? – Qmechanic Dec 21 '18 at 20:55
• Sure. I just put it here because it wasn’t very physics heavy. Do you think it’s suited for the main site? – SuperCiocia Dec 21 '18 at 20:58
• Actually no, it is not really physics. Perhaps math.SE is better? – Qmechanic Dec 21 '18 at 21:04
• @Qmechanic Hm, you think so? I thought this question was about establishing a convention on whether to use italic or upright differentials (or not to care) on Physics SE, which makes it very much on topic here. – David Z Dec 21 '18 at 21:48
• @Qmechanic I read this the same way that DavidZ did: as a question about whether we have a notation standard for our community, rather than a question about notation standards in general. – rob Dec 21 '18 at 22:25
• There is a lengthy discussion on the matter at tex.stackexchange.com/q/14821, and if you bother to read it you will find mixed opinions not withstanding the existence of a standard on the matter. Alas none of the packages suggested there are supported out of the box by MathJax. – dmckee --- ex-moderator kitten Dec 22 '18 at 0:23
• @David Z , rob & SuperCiocia: I reopened it since I don't want to close a divisive post single-handedly. But I think it topicwise belongs more on the main sites of Math.SE or Phys.SE (with the tags notation & conventions) rather than on a meta site. However, it would likely be closed on the main Phys.SE as primarily opinion-based. – Qmechanic Dec 22 '18 at 11:51
• Yeah I just meant here, since I had received mild criticism by some high-reputation users for my straight d’s. – SuperCiocia Dec 23 '18 at 11:33
• @SuperCiocia Would you mind editing the question to make it clear that you meant to ask about this site specifically? – David Z Dec 25 '18 at 7:28
• Why is it a problem that it could be "confused" with an exterior derivative? I think that ambiguity is very much on purpose. – 0x539 Jan 1 '19 at 23:57

David's answer is mostly OK, but his proposal includes several parts which are not OK. Specifically:

1. When editing someone else's post:
• If they use plain d and there is no indication the choice to make it italic was intentional, you can change differential d to \mathrm{d}.

No, no, no. If the post uses plain d and there is no indication that the choice to make it italic was intentional, then leave it alone.

The choice between straight $$\mathrm d$$ and italic $$d$$ is a stylistic choice; if you find a post that makes that choice differently than you would have done it, then tough luck. Live with it and move on. It just isn't that important. You do not get to change that user's stylistic choices, and you do not get to introduce non-rendering source clutter like \mathit{d} into that user's source.

David's point 4 needs to read as follows:

1. When editing someone else's post:
• If they use plain d and there are active indications that the stylistic choice wasn't intentional, you can change differential d to \mathrm{d}.

Active indications that the stylistic choice wasn't intentional can include things like sloppy formatting overall, both in the maths and in the grammar and punctuation. This is obviously a subjective judgement and there's a significant gray area, so err on the side of letting the existing formatting stand.

Why is this? Because it is a perfectly acceptable choice to have render one's differentials in italics and to use straight ds to render them to avoid the clutter in source that's meant to be human-readable. In this vein, consider as an example the following block of LaTeX source:

$$\int_0^1 \int_0^\pi J_\nu\mathopen{}\left( \sqrt{1-\frac{d f}{d\varphi}(0) \rho^2} \cos(\varphi) \right)\mathclose{} \exp\mathopen{}\left( i k\rho \cos(\varphi) + i \nu \varphi + \frac{d g}{d\rho}(\rho+\delta\rho) \right)\mathclose{} \: d\varphi \: d\rho$$


There are multiple indications here that the user knows what they are doing and that every choice done here is intentional. There aren't any \mathit{d}s here and they would actively harm the readability of the source, so they should not be introduced, no matter how much your inner typesetting pedant wants you to.

Why am I harping on and on about source readability? Because the site standard for site formatting is Markdown, which is explicitly designed to make both the source and the output human-readable. We should aim to have the same goal where MathJax is involved.

David's stated aim,

it's useful to be able to edit posts where people don't really care about the notation to match a convention, while allowing people who do have a specific preference to express that

is good enough, but you should not need to add readability-harming clutter to your source to prevent other users from deciding that they don't like your stylistic choices. There is an ambiguity in plain ds between the authorial intent "I want my differentials italicized, and I don't want to bother with semantic \mathit{d}s" and "I don't care about the difference between $$d$$s and $$\mathrm d$$s". Unless you can break that ambiguity through other means, the rule of thumb is to leave it as is.

• I don't see how adding \mathit{} or \mathrm{} actively harms readability of the source. It's even more useless of an argument, IMO, considering that one only looks at the source for editing purposes and would otherwise look at the fully rendered output. – Kyle Kanos Jan 1 '19 at 15:49
• I've deleted my answer since the voting seems to show that the community favors yours. You might want to edit accordingly. – David Z Jan 12 '19 at 9:30