math-dif.mkxl /size: 1351 b    last modification: 2024-01-16 10:22
1%D \module
2%D   [       file=math-dif,
3%D        version=2022.05.31, % moved code
4%D          title=\CONTEXT\ Math Macros,
5%D       subtitle=Differentials,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\writestatus{loading}{ConTeXt Math Macros / Differentials}
15
16\unprotect
17
18\pushoverloadmode
19
20    % For new times sake:
21
22    \ifdefined\dd \aliased\let\normal_math_dd\dd \else \lettonothing\normal_math_dd \fi
23    \ifdefined\DD \aliased\let\normal_math_DD\DD \else \lettonothing\normal_math_DD \fi
24
25    \def\c!differentiald{differentiald} % for now
26
27    \def\upright_math_dd{\mathatom \s!unpack \mathdifferentialcode{\mathupright d}}
28    \def\upright_math_DD{\mathatom \s!unpack \mathdifferentialcode{\mathupright D}}
29
30    \permanent\protected\def\dd
31      {\ifcstok{\mathematicsparameter\c!differentiald}\s!upright
32         \upright_math_dd
33       \else
34         \normal_math_dd
35       \fi}
36
37    \permanent\protected\def\DD
38      {\ifcstok{\mathematicsparameter\c!differentiald}\s!upright
39         \upright_math_DD
40       \else
41         \normal_math_DD
42       \fi}
43
44  % \setupmathematics[differentiald=upright]
45
46\popoverloadmode
47
48\protect
49