meta-imp-newmath.mkxl /size: 2506 b    last modification: 2024-01-16 10:22
1%D \module
2%D   [       file=meta-imp-newmath,
3%D        version=2023.04.01,
4%D          title=\METAPOST\ Graphics,
5%D       subtitle=New Math Symbols,
6%D         author=Mikael Sundqvist & 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%D In this file we will collect solutions for special math symbols. When such symbols
15%D are used in publications the CMS will contact the Unicode Consortium to suggest that
16%D they get a slot, because then we have proof of usage. We also consider old obsolete
17%D symbols because they can be treated like some ancient out|-|of|-|use script and fit
18%D into the \type {ancient math script}.
19
20\startMPextensions
21    vardef math_ornament_hat(expr w,h,d,o,l) =
22        image ( path p ; p :=
23            (w/2,h + 10l) --
24            (o + w,h + o) --
25            (w/2,h + 7l) --
26            (-o,h + o) --
27            cycle ;
28            fill p randomized o ;
29            setbounds currentpicture to (-o,0) -- (w+o,0) -- (w+o,h+2o) -- (-o,h+2o) -- cycle ;
30        )
31    enddef ;
32\stopMPextensions
33
34\startuniqueMPgraphic{math:ornament:hat}
35    draw
36        math_ornament_hat(
37            OverlayWidth,
38            OverlayHeight,
39            OverlayDepth,
40            OverlayOffset,
41            OverlayLineWidth
42        )
43    withpen
44        pencircle
45            xscaled (2OverlayLineWidth)
46            yscaled (3OverlayLineWidth/4)
47            rotated 30
48    withcolor
49        OverlayLineColor ;
50%         draw boundingbox currentpicture;
51\stopuniqueMPgraphic
52
53\definemathornament [widerandomhat] [mp=math:ornament:hat]
54
55\continueifinputfile{meta-imp-newnmath.mkxl}
56
57\starttext
58
59This symbol was designed for one of Mikaels students working on a thesis on
60probability. This student needed to typeset the characteristic function of a
61random variable \im {X} with density function \im {f_{X}}, and it was insisted to
62use another notation than the (wide) hat, that was already used for something
63else. For this reason the \tex {widerandomhat} was introduced,
64
65\startformula
66    E[\ee^{\ii tX}] = \widerandomhat{f_{X}}(t)\mtp{,}
67    E[\ee^{\ii t(X_1+X_2)}] = \widerandomhat{f_{X_1} \ast f_{X_2}}(t)\mtp{.}
68\stopformula
69
70Naturally, it is automatically scaled, just like the ordinary wide hat
71
72\startformula
73    \widehat{a+b+c+d+e+f} \neq \widerandomhat{a+b+c+d+e+f}
74\stopformula
75
76\stoptext
77