I'd like to write e^x
in LaTeX math mode where the e
is written upright, rather than slanted, to indicate that it is not a variable. Kopka and Daly (4ed) pg. 285 do this with \me^x
. When I try this I get the "undefined control sequence" error.
Q: Is \me
a deprecated command?
Q: How can I do now what \me
used to do?
Best Answer
You have to define yourself that command in your document preamble
Some comments
It's not necessary to declare this symbol as an ordinary symbol because by rule all math characters that are subject to alphabet changes are ordinary.
The construction
\mathrm{e}
is essentially equivalent tobecause the Roman math alphabet corresponds to the math group 0. Each math alphabet (
\mathrm
,\mathnormal
,\mathbf
and so on) corresponds to the choice of one among 16 math groups;\mathrm
is 0,\mathnormal
is 1, the others are from 4 onwards.Each character has a
\mathcode
which, fore
is"7165
which meansThus calling
\mathrm{e}
is like asking for a math code"0065
(numbers preceded by"
are hexadecimal): the first 0 means "ordinary symbol", the second one is the math group. With\mathbf{e}
we would ask for"0465
, according to the normal LaTeX setup.Details about math codes are in the TeXbook or in TeX by Topic. Note that LaTeX calls
\mathgroup
the primitive\fam
.