1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20\startMPextensions
21 vardef math_ornament_hat(expr w,h,d,o,l) =
22 image ( path p ; p :=
23 (w2,h 10l) --
24 (o w,h o) --
25 (w2,h 7l) --
26 (o,h o) --
27 cycle ;
28 fill p randomized o ;
29 setbounds currentpicture to (o,0) -- (wo,0) -- (wo,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 (3OverlayLineWidth4)
47 rotated 30
48 withcolor
49 OverlayLineColor ;
50
51\stopuniqueMPgraphic
52
53\definemathornament [widerandomhat] [mp=math:ornament:hat]
54
55\continueifinputfile{metaimpnewmath.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(X1X2)}] = \widerandomhat{f{X1} \ast f{X2}}(t)\mtp{.}
68\stopformula
69
70Naturally, it is automatically scaled, just like the ordinary wide hat
71
72\startformula
73 \widehat{abcdef} \neq \widerandomhat{abcdef}
74\stopformula
75
76\stoptext
77 |