Hans Åberg
15. Mai 2016 um 16:28

Traditionally constants are set in upright and variables in italic. So constants like “log” etc., are set in upright. It is not used rigorously because of past typographical limitations, but one might in principle do that, cf. the example below, where the integral differential “d” is set in upright to disambiguate relative the function named “d”.

When Unicode added math styles, it added italics, expecting the ASCII range to be upright, which would be normal if using a text editor that does not translate math into italics. But the TeX legacy is the opposite.

----
\setupbodyfont[xits,10pt]

\startformula
\startalign
I &= ∫_S d(x)\, dx \NR
I &= ∫_S 𝑑(x)\, dx \NR
I &= ∫_S d(x)\, \mathupright{d} x \NR
I &= ∫_S 𝑑(x)\, \mathupright{d} x \NR
\stopalign
\stopformula
----
\appendtoks \rm \to \everymathematics

\setupbodyfont[xits,10pt]

\starttext

\startformula
    \startmathalignment
    \NC I \EQ ∫_S d(x)\, dx \NR
    \NC I \EQ ∫_S 𝑑(x)\, dx \NR
    \NC I \EQ ∫_S d(x)\, dx \NR
    \NC I \EQ ∫_S 𝑑(x)\, dx \NR
    \stopmathalignment
\stopformula

\stoptext

Wolfgang