summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/math-dif.mkxl
blob: ad53ee25a2786a9925b7cb62bacf5c447b38302d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
%D \module
%D   [       file=math-dif,
%D        version=2022.05.31, % moved code
%D          title=\CONTEXT\ Math Macros,
%D       subtitle=Differentials,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{ConTeXt Math Macros / Differentials}

\unprotect

\pushoverloadmode

    % For new times sake:

    \let\normal_math_dd\dd
    \let\normal_math_DD\DD

    \def\c!differentiald{differentiald} % for now

    \def\upright_math_dd{\mathatom \s!unpack \mathdifferentialcode{\mathupright d}}
    \def\upright_math_DD{\mathatom \s!unpack \mathdifferentialcode{\mathupright D}}

    \permanent\protected\def\dd
      {\ifcstok{\mathematicsparameter\c!differentiald}\s!upright
         \upright_math_dd
       \else
         \normal_math_dd
       \fi}

    \permanent\protected\def\DD
      {\ifcstok{\mathematicsparameter\c!differentiald}\s!upright
         \upright_math_DD
       \else
         \normal_math_DD
       \fi}

  % \setupmathematics[differentiald=upright]

\popoverloadmode

\protect