Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Some of the images don't appear to render for me.

Also, the author includes an example of \int xyzdx and makes a note of using appropriate spacing. It is my impression that commonly the differential operator is typeset differently, that is: \mathrm{d}x.

Otherwise, great tips.



It also doesn't mention the spacing after the dx. You need spacing afterwards, but also not unconditionally if the thing afterwards also has a space before (that sounds obvious but I can imagine a macro that has \,\mathrm{d}#1\,).

There is a better way to do this, which is to use LaTeX's built in spacing adjustment, which is different around different types of object (e.g. notice how ab+cd already looks right). To do that, use: \mathop{\mathrm{d}#1}

Even if you carefully do the "right thing", the spacing in LaTeX is by no means perfect. E.g. just look at f(x)g\left(\frac{x}{y}\right) - it looks like g is more associated with f's arguments than its own.


Thanks for flagging the image issue, I think there's an issue with the responsive image serving code that doesn't work consistently across browser. Temporarily disabling that for now & pushing a new update.

Also, you are right about using \mathrm{d}x. Another friend also just flagged it to me as well, I will update the post regarding this!


FWIW there is an ISO Standard:

> ISO 80000-2:2009 > Quantities and units — Part 2: Mathematical signs and symbols to be used in the natural sciences and technology

https://nhigham.com/2016/01/28/typesetting-mathematics-accor...


the [physics package] (https://ctan.org/pkg/physics) provides for differential with a \dd command with a roman d, it also has several other useful macros


In physics, it's \mathrm dx. In mathematics, it's dx.


Historically, by which I mean professional typeset documents in early 20th century, it was upright d in both. It's often italic dx in maths now probably just because doing it right is tricky (at least non-zero effort) in LaTeX.

In many articles, there isn't even spacing around differentials. That doesn't mean that is correct too. It just means that, like upright d, the author has more pressing issues than small details of typesetting.

It similar to how vectors (in physics / applied maths) are represented by upright bold letter. Historically, these were bold-italic - the same as how most variables are italic. But early versions of TeX only supported fonts in regular, italic and bold - no bold italic variants existed (even now, bold italics are not universally available for Greek characters). So people used upright bold for vectors, and now it's assumed that it was deliberate.


Not really. It has nothing to do with LaTeX. Most of them are italic in mathematics . For example, in Hermite's textbook (1882) (https://gallica.bnf.fr/ark:/12148/bpt6k97981084/f31.item.tex...), page 13, the dω is italic. In Klein's Lectures on Mathematics (1894) (https://www.mathunion.org/fileadmin/ICM/Proceedings/ICM1893....) page 20, the dx is italic. In Goursat's textbook (1933) (https://gallica.bnf.fr/ark:/12148/bpt6k9454797/f107.item), the dx is also italic.


It would appear that it is even more complicated than that and so depends on nationality, the field in question etc.: https://tex.stackexchange.com/a/88961/31889

TIL


In my mathematics is \d x .


?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: