1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Math Macros Differentials}
15
16\unprotect
17
18
19
20
21
22
23
24
25
26
27
28
29
30\def\math_upright_constant#1#2#3
31 {\ifcstok{\mathematicsparameter#1}\s!upright
32 \begingroup
33 \attribute\mathalphabetattribute\attributeunsetvalue
34 \attribute\mathgreekattribute \attributeunsetvalue
35 #2
36 \endgroup
37 \else
38 #3
39 \fi}
40
41\setupmathematics
42 [\s!differentiald=\mathematicsparameter\c!mathconstants,
43 \s!exponentiale=\mathematicsparameter\c!mathconstants,
44 \s!imaginaryi=\mathematicsparameter\c!mathconstants,
45 \s!imaginaryj=\mathematicsparameter\c!mathconstants,
46 \s!pi=\mathematicsparameter\c!mathconstants]
47
48
49
50
51\permanent\protected\def\dd{\math_upright_constant\s!differentiald\mathduprightshape \mathditalicshape }
52\permanent\protected\def\DD{\math_upright_constant\s!differentiald\mathDuprightshape \mathDitalicshape }
53\permanent\protected\def\ee{\math_upright_constant\s!exponentiale \matheuprightshape \matheitalicshape }
54\permanent\protected\def\ii{\math_upright_constant\s!imaginaryi \mathiuprightshape \mathiitalicshape }
55\permanent\protected\def\ij{\math_upright_constant\s!imaginaryj \mathjuprightshape \mathjitalicshape }
56\permanent\protected\def\pi{\math_upright_constant\s!pi \mathpiuprightshape\mathpiitalicshape}
57
58\protect
59 |