How to best typeset "special" constants (complex unit i, Euler's number e,...)?
Consistency is the primary goal. So the first task is to know what "special numbers" we need and define commands for them:
\newcommand{\euler}{e}
\newcommand{\ramuno}{i}
(ramuno was how some Italian mathematicians of the 16th century called the quantity that squared gives –1; then Euler started using i).
The mathematical typography tradition usually didn't have a special treatment of these symbols. See, for example, n. 359 in Gauss's Disquisitiones Arithmeticae, where the equivalent of
$\cos\frac{\lambda kP}{e} + i\sin\frac{\lambda kP}{e}$
is found (the edition I consulted is from the Werke by the Königlichen Gesellschaft der Wissenschaften in Göttingen, vol. 1, 1863, page 450). There's no doubt what this i is denoting.
http://gdz.sub.uni-goettingen.de/dms/load/img/?PPN=PPN235993352&IDDOC=137206
However, in recent times, under the influence of physics and applied mathematics, people started to denote "constants" with upright letters. There's even an ISO regulation about this, which is compulsory in some fields where uniformity among papers and books is very important.
In pure mathematics there's essentially no rule. Do as you like or how your field is used to. Using special names for the special numbers allow you to change the appearance of your document just by changing the definition.
If you feel that there may be confusion between the "imaginary unit" (no worse name could be chosen for it) and an index (for summations, for instance), you have three strategies:
use a special denotation for the imaginary unit;
don't use i as an index;
forget about it and let the reader know from the context.
Strategy 2 is used by Graham, Knuth and Patashnik in their "Concrete Mathematics". Strategy 3 is very common in math textbooks.
Unicode has special glyphs for these symbols: 0x2148
for imaginary i, 0x2149
for imaginary j, 0x2107
for Euler's constant, etc (although on most fonts they look ugly).
If you are using a unicode aware engine and a opentype math font, you can just type these directly or use the corresponding macro for them (ConTeXt uses \imaginaryi
, \imaginaryj
, \Eulerconst
, etc.; I don't know what names unicode-math
package for LaTeX uses).
EDIT: I don't know whether \Eulerconst
refers to "Euler's number" e
or not. As pointed out by Caramdir, it not used frequently.
Whenever I'm unsure about how I'll eventually want something to look, I'll create a \newcommand
so that I can hope to control things globally.
In this particular case, I might define something like
\newcommand{\myspecial}[1]{\mathrm{#1}}
which could be used, for example, as
$\myspecial{e}$
(I wouldn't necessarily use \mathrm
, it's just to demonstrate the idea).
Another reason I find this approach useful is that I can then easily grep
the file to find all occurrences, something like
egrep 'myspecial' myfile.tex