News for hackers. Stuff that matters.
Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by Tainnor on Sunday January 08, 2023 @10:53AM (#34300093)
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.

Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by quietbritishjim on Sunday January 08, 2023 @11:25AM (#34300404)
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.

Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by fanpu on Sunday January 08, 2023 @11:04AM (#34300190)
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!

Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by ogogmad on Sunday January 08, 2023 @11:06AM (#34300211)
No, it was right the first time.
Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by ogogmad on Sunday January 08, 2023 @11:01AM (#34300160)
In physics, it's \mathrm dx. In mathematics, it's dx.
Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by quietbritishjim on Sunday January 08, 2023 @11:17AM (#34300327)
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.

Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by zeur0aoV on Sunday January 08, 2023 @12:08PM (#34300852)
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.
Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by Tainnor on Sunday January 08, 2023 @11:09AM (#34300234)
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

Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by mgubi on Sunday January 08, 2023 @11:25AM (#34300400)
In my mathematics is \d x .
Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by thanatropism on Sunday January 08, 2023 @11:42AM (#34300571)
?
Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by soegaard on Sunday January 08, 2023 @11:54AM (#34300692)
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...

Re:The Art of LaTeX: Advice for Typesetting Beautiful, Delig... by the-mitr on Sunday January 08, 2023 @10:46PM (#34306496)
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