The Leibniz notation 'dx' in an integral is not italicized when an e is in the integrand. Why?
Why is the d in dx not italic when an e is in the integral? And how can I make i always be italic?
The command \rm has been deprecated for thirty years. And it is a declaration, so its scope ends with the formula: thus you get every letter following it in upright type.
I can't see any reason for typesetting âeâ in upright type, unless you must follow the ISO (ridiculous) norms. But, in this case, also the âdâ for the differential should be upright. And also the imaginary unit.
I suggest to define a few personal commands:
If I swap the comments
the output is
This way you're not tied to a particular representation and can change it at the last moment.
Important note.
If you use unicode-math with XeLaTeX or LuaLaTeX, replace \mathrm with \symrm.
Historical note.
The number e wasn't discovered by Euler, but by Jacob Bernoulli when Euler was a child. Attributions to Euler or, worse, to Napier are historically absurd.
The differential operator d should also be upright:
If you are using xelatex or lualatex then:
The provided LaTeX code uses the mathfixs package (2024/11/18, v1.12), which allows the user to write symbols like \econst and \iunit in an upright font (i.e., non-italicized). This is particularly useful when writing mathematical expressions involving constants and imaginary units, where you want the symbols to stand out clearly as constants rather than as variables.
The mathfixs package also supports the use of the differential operator, though itâs not shown in this specific example. The package helps ensure that the differential operator is displayed correctly in the context of the surrounding mathematics.