s-math-tests.mkxl /size: 3210 b    last modification: 2024-01-16 10:22
1%D \module
2%D   [      file=s-math-tests.mkxl,
3%D        version=2023.04.03,
4%D          title=\CONTEXT\ Style File,
5%D       subtitle=Some Math Tests,
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\continueifinputfile{s-math-tests.mkxl}
15
16%D Here we collect some tests that later will become proper macros.
17
18\starttext
19
20\startbuffer
21    \ruledhbox \bgroup \im {
22        \dostepwiserecurse{`A}{`Z}{1}{
23            \blackrule[color=darkgray,height=\the\Umathflattenedaccentbaseheight\textstyle,depth=0pt,width=0.05ts]
24            \hat{\char#1}
25        }
26    }\egroup
27\stopbuffer
28
29\startTEXpage[offset=1ts]
30    \showglyphs
31%     \switchtobodyfont[modern]     \getbuffer\par
32%     \blank
33%     \switchtobodyfont[pagella]    \getbuffer\par
34%     \switchtobodyfont[termes]     \getbuffer\par
35%     \switchtobodyfont[schola]     \getbuffer\par
36%     \blank
37%     \switchtobodyfont[ebgaramon-nt]\getbuffer\par
38%     \switchtobodyfont[ebgaramond]  \getbuffer\par
39%     \blank
40%     \switchtobodyfont[erewhon]    \getbuffer\par
41%     \switchtobodyfont[kpfonts]    \getbuffer\par
42%     \switchtobodyfont[xcharter]   \getbuffer\par
43%     \switchtobodyfont[concrete]   \getbuffer\par
44%     \switchtobodyfont[libertinus] \getbuffer\par
45%     \switchtobodyfont[stixtwo]    \getbuffer\par
46%     \switchtobodyfont[lucida-nt]   \getbuffer\par
47    \switchtobodyfont[lucida]
48    % 8.67123pt default
49    \bgroup
50        \bitwiseflip\mathfontcontrol\ignoreflataccentsmathcontrolcode
51        \appendtoks
52            \Umathflattenedaccentbaseheight\textstyle8.67123pt
53        \to\everymathematics
54        \getbuffer\par
55    \egroup
56    \bgroup
57        \appendtoks
58            \Umathflattenedaccentbaseheight\textstyle8.67123pt
59        \to\everymathematics
60        \getbuffer\par
61    \egroup
62    % 8.51532pt fixed
63    \bgroup
64        \appendtoks
65            \Umathflattenedaccentbaseheight\textstyle8.51532pt
66        \to\everymathematics
67        \getbuffer\par
68    \egroup
69%     \switchtobodyfont[libertinus] \getbuffer\par
70\stopTEXpage
71
72\startTEXpage[offset=1ts]
73
74    \definefontfeature[mathextra][]
75%     \definefontfeature[mathextra][ss10=yes,ss06=yes]
76
77    \setupbodyfont[ebgaramond]
78
79    \bgroup
80        \setupmathematics[stylealternative=]
81        \im{\hbar^{\hbar^{\hbar}}}
82    \egroup
83    \bgroup
84        \setupmathematics[stylealternative={hbar}]
85        \im{\hbar^{\hbar^{\hbar}}}
86    \egroup
87    \bgroup
88        \setupmathematics[stylealternative={hbar,outbendingh}]
89        \im{\hbar^{\hbar^{\hbar}}}
90    \egroup
91    \bgroup
92        \setupmathematics[stylealternative={outbendingh}]
93        \im{\hbar^{\hbar^{\hbar}}}
94    \egroup
95
96    \definefontfeature[mathextra][]
97%     \definefontfeature[mathextra][cv03=yes]
98
99    \setupbodyfont[stixtwo]
100
101    \bgroup
102        \setupmathematics[stylealternative=]
103        \im{\emptyset^{\emptyset^{\emptyset}}}
104    \egroup
105    \bgroup
106        \setupmathematics[stylealternative={emptyset}]
107        \im{\emptyset^{\emptyset^{\emptyset}}}
108    \egroup
109
110\stopTEXpage
111
112\stoptext
113