Debian Codegraph @

texmf-dist/doc/fonts/pennstander-otf/pennstander-otf-samples-math.tex

raw
1 % !TEX root = pennstander-otf-samples-math.tex
2 \usetypescriptfile[pennstander]
3
4 \usemodule[math-characters-renewed]
5
6 \setupbodyfont[pennstander-regular]
7 %\setupbodyfont[pennstander-black]
8 %\setupbodyfont[pennstander-thin]
9
10 \definefontfamily[dejavu][rm][DejaVu Serif]
11 \switchtobodyfont[dejavu]
12
13 \setuppagenumbering[state=stop]
14
15 \setuphead
16 [title]
17 [style=\dejavu,align=middle]
18
19
20 \setuphead
21 [section]
22 [style=\dejavu,number=no,align=middle]
23
24 \title[title={Pennstander Math (v0.4)}]
25
26 \starttext
27
28 \startbuffer[weightdisplays]
29 \starttabulate[|c|l|]
30 \NR \NC Thin \NC {\switchtobodyfont[pennstander-thin]
31 \dm{
32 \int_a^b \!\! f'(x) dx = f(b) -f(a)
33 }}
34
35 \switchtobodyfont[pennstander-extralight]
36 \NR \NC Extralight \NC \dm{
37 c:= \sqrt{a^2 + b^2} \notin \mathbb Q
38 }
39
40 \NR \NC Light \NC {\switchtobodyfont[pennstander-light]\dm{
41 \oint_\gamma \hat{f}(z) dz =0
42 }}
43
44 \NR \NC Regular \NC {\switchtobodyfont[pennstander-regular]
45 \dm{
46 \iint_M d\omega = \int_{\partial M}\omega}\blank[10pt]
47 }
48
49 \NR \NC Medium \NC
50 {\switchtobodyfont[pennstander-medium]
51 \dm{
52 \lim_{n\to \infty}\sum_{\mu=1}^n \frac{1}{\mu^2} = \frac{\pi^2}{6}
53 }\blank[10pt]}
54
55 \NR \NC
56 Semibold \NC { \switchtobodyfont[pennstander-semibold] \switchtobodyfont[pennstander-semibold]
57
58 \dm{
59 \frac{d}{d \tau}(\psi\cdot \phi) = \frac{d\psi}{d\tau} \cdot \phi + \psi \cdot \frac{d\phi}{d\tau}
60 }}
61
62
63 \NR \NC
64 Bold \NC {\switchtobodyfont[pennstander-bold]
65
66 \dm{
67 \nabla\cdot \fenced[group]{ \nabla \times G}= 0
68 }}
69
70 \NR \NC ExtraBold \NC {\switchtobodyfont[pennstander-extrabold] \dm{\fenced[brace]{e^{i\theta} = \cos(\theta) + i \sin(\theta) : \theta\in\mathbb R}}\blank[10pt]
71 }
72
73
74 \NR \NC Black \NC
75 {\switchtobodyfont[pennstander-black] \dm{\Psi \otimes \Omega = \Omega \otimes \Psi}}
76 \stoptabulate
77 \stopbuffer
78
79 \startbuffer[weightdisplays]
80 \startalign[center]
81 \setupTABLE[frame=off, valign=middle, align=middle]
82 \setupTABLE[column][2][width=1cm]
83 \bTABLE
84 \bTR[height=1cm]
85 \bTD Thin \eTD
86 \bTD \eTD
87 \bTD Extralight \eTD
88 \eTR
89 \bTR[height=2cm]
90 \bTD {\switchtobodyfont[pennstander-thin]
91 \dm{\int_a^b f'(x) dx = f(b) -f(a)}} \eTD
92 \bTD \eTD
93 \bTD {\switchtobodyfont[pennstander-extralight]
94 \dm{c:= \sqrt{a^2 + b^2} \notin \mathbb Q}} \eTD
95 \eTR
96
97 \bTR[height=1cm]
98 \bTD Light \eTD
99 \bTD \eTD
100 \bTD Regular \eTD
101 \eTR
102 \bTR[height=2cm]
103 \bTD {\switchtobodyfont[pennstander-light]
104 \dm{\oint_\gamma \hat{f}(z) dz = 0}} \eTD
105 \bTD \eTD
106 \bTD {\switchtobodyfont[pennstander-regular]
107 \dm{\iint_M d\omega = \int_{\partial M}\omega}} \eTD
108 \eTR
109
110 \bTR[height=1cm]
111 \bTD Medium \eTD
112 \bTD \eTD
113 \bTD Semibold \eTD
114 \eTR
115 \bTR[height=2cm]
116 \bTD {\switchtobodyfont[pennstander-medium]
117 \dm{\lim_{n\to \infty}\sum_{\mu=1}^n \frac{1}{\mu^2} = \frac{\pi^2}{6}}} \eTD
118 \bTD \eTD
119 \bTD {\switchtobodyfont[pennstander-semibold]
120 \dm{\frac{d}{d \tau}(\psi\cdot \phi) = \frac{d\psi}{d\tau} \cdot \phi + \psi \cdot \frac{d\phi}{d\tau}}} \eTD
121 \eTR
122
123 \bTR[height=1cm]
124 \bTD Bold \eTD
125 \bTD \eTD
126 \bTD ExtraBold \eTD
127 \eTR
128 \bTR[height=2cm]
129 \bTD {\switchtobodyfont[pennstander-bold]
130 \dm{\nabla\cdot \fenced[group]{\nabla \times G} = 0}} \eTD
131 \bTD \eTD
132 \bTD {\switchtobodyfont[pennstander-extrabold]
133 \dm{\fenced[brace]{e^{i\theta} = \cos(\theta) + i \sin(\theta) : \theta\in\mathbb R}}} \eTD
134 \eTR
135
136 \bTR[height=1cm]
137 \bTD Black \eTD
138 \bTD \eTD
139 \bTD \eTD
140 \eTR
141 \bTR[height=2cm]
142 \bTD {\switchtobodyfont[pennstander-black]
143 \dm{\Psi \otimes \Omega = \Omega \otimes \Psi}} \eTD
144 \bTD \eTD
145 \bTD \eTD
146 \eTR
147 \eTABLE
148 \stopalign
149 \stopbuffer
150 \getbuffer[weightdisplays]
151 \define\testcharacter{{\,\, }}
152
153 \define[1]\AllFenceSizes{
154 \im{
155 \fenced[#1][size=12]{
156 \fenced[#1][size=11]{
157 \fenced[#1][size=10]{
158 \fenced[#1][size=9]{
159 \fenced[#1][size=8]{
160 \fenced[#1][size=7]{
161 \fenced[#1][size=6]{
162 \fenced[#1][size=5]{
163 \fenced[#1][size=4]{
164 \fenced[#1][size=3]{
165 \fenced[#1][size=2]{
166 \fenced[#1][size=1]{
167 \fenced[#1][size=0]{\testcharacter}}}}}}}}}}}}}
168 }
169 }
170
171 \define\AllFences{
172 \AllFenceSizes{angle}
173 \AllFenceSizes{bracket}\crlf\crlf
174 \AllFenceSizes{brace}
175 \AllFenceSizes{bar}\crlf\crlf
176 \AllFenceSizes{parenthesis}
177 \AllFenceSizes{doublebar}\crlf\crlf
178 \AllFenceSizes{group}
179 \AllFenceSizes{ceiling}\crlf\crlf
180 \AllFenceSizes{floor}
181 \AllFenceSizes{triplebar}\crlf\crlf
182 \AllFenceSizes{openbracket}
183 }
184 \def\fontlist{pennstander-thin,pennstander-regular,pennstander-bold}
185 \def\fontlist{pennstander-regular}
186
187 \startbuffer[alphabets]
188 \doloopoverlist\fontlist{
189 {\switchtobodyfont[\recursestring]
190 \doloopoverlist\alphabetlist
191 {%
192 \startalignment[center]
193 \showmathfontcharacters[alternative=glyphs,list=\recursestring,showfeatures=none]
194 \stopalignment
195 }
196 }}
197 \stopbuffer
198 \page
199 \setupmathematics[default=normal,lcgreek=normal]
200 \section[title={Upright Latin and Greek upper and lower case}]
201 \def\alphabetlist{lowercasenormal,uppercasenormal,digitsnormal,uppercasegreeknormal,lowercasegreeknormal}
202 \getbuffer[alphabets]
203 \section[title={Italic/Oblique Latin and Greek upper and lower case}]
204
205 \def\alphabetlist{lowercaseitalic,uppercaseitalic,uppercasegreekitalic,lowercasegreekitalic}
206 \getbuffer[alphabets]
207 \subsection[title={Double Struck upper case and numerals}]
208 \def\alphabetlist{uppercasedoublestruck,digitsdoublestruck}
209 \getbuffer[alphabets]
210 \subsection[title={Fraktur-like upper and lower case}]
211 \def\alphabetlist{uppercasefraktur,lowercasefraktur}
212 \getbuffer[alphabets]
213
214
215
216 \subsection[title={Script upper case}]
217 \def\alphabetlist{uppercasescript}
218 \getbuffer[alphabets]
219
220 \page
221 \subsection[title={Integrals}]
222
223 \startbuffer[integrals]
224 \define\integrand{}
225 \define[1]\testintegrals{
226 \int[size=#1]{\integrand} \iint[size=#1]{\integrand} \iiint[size=#1]{\integrand}
227 \iiiint[size=#1]{\integrand} \oint[size=#1]{\integrand} \oiint[size=#1]{\integrand} \oiiint[size=#1]{\integrand} \slashint[size=#1]{\integrand} \barint[size=#1]{\integrand} \,\,
228 \aointc[size=#1]{\integrand} \,\, \ointc[size=#1]{\integrand} \,\, \intc[size=#1]{\integrand} \,\, \aodownintc[size=#1]{\integrand} \,\, \doublebarint[size=#1]{\integrand}\,\,\hookleftarrowint[size=#1]{\integrand} \,\,
229 \timesint[size=#1]{\integrand} \,\, \capint[size=#1]{\integrand} \,\, \cupint[size=#1]{\integrand} \,\, \upperint[size=#1]{\integrand} \,\, \lowerint[size=#1]{\integrand} \,\,
230 \rectangularpoleintc[size=#1]{\integrand} \,\, \semicirclepoleintc[size=#1]{\integrand} \,\,
231 \circlepoleoutsideintc[size=#1]{\integrand} \,\,\circlepoleinsideintc[size=#1]{\integrand} \,\, \squareintc[size=#1]{\integrand} \,\,
232 }
233 \startformula
234 \testintegrals{.15cm}\breakhere
235 \testintegrals{.4cm}\breakhere
236 \testintegrals{1cm}\breakhere
237 \stopformula
238 \stopbuffer
239
240 \doloopoverlist\fontlist
241 {
242 {\switchtobodyfont[\recursestring]
243 \getbuffer[integrals]}
244 }
245
246
247 \subsection[title={Radicals}]
248 \startbuffer[radicals]
249 \startformula
250 \sqrt[2]{1+x+y}+
251 \sqrt[1/3]{\frac{a+b}{c+d}}
252 \stopformula
253 \stopbuffer
254
255
256 \doloopoverlist\fontlist
257 {
258 {\switchtobodyfont[\recursestring]
259 \getbuffer[radicals]}
260 }
261 \subsection[title={Accents and Stackers}]
262 \startbuffer[accents]
263 \startformula
264 \grave{x} \quad \tilde{x} \quad \dot{x}\quad \ddot{x}\quad \dddot{x}\quad\ddddot{x}\quad \check{x}\quad \acute{x} \quad\bar{x}\quad\breve{x}\quad\ring{x}
265 \stopformula
266 \startformula
267 \widehat{x+y}\quad
268 \widebar{x+y}\quad
269 \wideoverleftharpoon{x+y}\quad
270 \wideoverleftrightarrow{x+y}\quad
271 \wideunderleftrightarrow{x+y}\quad
272 \wideunderleftharpoon{x+y}\quad
273 \wideunderrightarrow{x+y}\quad
274 \widecheck{x+y}\quad\widetilde{x+y}\quad
275 \breakhere
276 %\wideoverrightharpoon{x+y}\quad
277 %\wideoverrightarrow{x+y}\quad
278 %\wideunderbar{x+y}\quad
279 %\wideunderrightharpoon{x+y}\quad
280 %\wideunderleftarrow{x+y}\quad
281 \overbrace{x+y}\quad
282 \overparent{x+y}\quad
283 \overbracket{x+y}\quad
284 \overbar{x+y}\quad
285 \breakhere
286 \underbrace{x+y}\quad
287 \underparent{x+y}\quad
288 \underbracket{x+y}\quad
289 \underbar{x+y}\quad
290 \stopformula
291 \stopbuffer
292
293 \doloopoverlist\fontlist
294 {
295 {\switchtobodyfont[\recursestring]
296 \getbuffer[accents]}
297 }
298
299
300 \subsection[title={Arrows}]
301 \startbuffer[arrows]
302 \startformula
303 A \mrel{1+2}{a+b+c} B \mequal{1+2}{a+b+c}
304 C \mleftarrow{1+2}{a+b+c} D \mrightarrow{1+2}{a+b+c}
305 E \mleftrightarrow{1+2}{a+b+c} F \mLeftarrow{1+2}{a+b+c}
306 G \mRightarrow{1+2}{a+b+c} H \mLeftrightarrow{1+2}{a+b+c}
307 I \mtwoheadleftarrow{1+2}{a+b+c} J \mtwoheadrightarrow{1+2}{a+b+c}
308 K \mmapsto{1+2}{a+b+c} L \mhookleftarrow{1+2}{a+b+c}
309 M \mhookrightarrow{1+2}{a+b+c} N \mleftharpoondown{1+2}{a+b+c}
310 O \mleftharpoonup{1+2}{a+b+c} P \mrightharpoondown{1+2}{a+b+c}
311 Q \mrightharpoonup{1+2}{a+b+c} R \mrightoverleftarrow{1+2}{a+b+c}
312 S \mleftoverrightarrow{1+2}{a+b+c} T \mleftrightharpoons{1+2}{a+b+c}
313 U \mrightleftharpoons{1+2}{a+b+c} V \mtriplerel{1+2}{a+b+c} W
314 \stopformula
315 \stopbuffer
316
317
318 {\setupbodyfont[pennstander-regular]
319 \getbuffer[arrows]}
320
321 \subsection[title={Symbols}]
322
323 \def\symbollist{
324 arrows,
325 % basiclatin,
326 blockelements,
327 % combiningdiacriticalmarks,
328 % combiningdiacriticalmarksforsymbols,
329 controlpictures,
330 currencysymbols,
331 dingbats,
332 % generalpunctuation,
333 geometricshapes,
334 ipaextensions,
335 latinextendeda,
336 latinsupplement,
337 letterlikesymbols,
338 mathematicaloperators,
339 miscellaneousmathematicalsymbolsa,
340 miscellaneousmathematicalsymbolsb,
341 miscellaneoussymbols,
342 miscellaneoussymbolsandarrows,
343 miscellaneoustechnical,
344 phoneticextensions,
345 superscriptsandsubscripts,
346 supplementalarrowsa,
347 supplementalarrowsb,
348 supplementalarrowsc,
349 supplementalmathematicaloperators,
350 supplementalsymbolsandpictographs,
351 emoticons,
352 miscellaneoussymbolsandpictographs}
353
354
355 \doloopoverlist\fontlist{
356 \edef\fontchoice{\recursestring}%
357 \doloopoverlist\symbollist{%
358 {\switchtobodyfont[\fontchoice]{\showmathfontcharacters[alternative=glyphswithoutsizes,list=\recursestring,showfeatures=none]}}}\blank[10pt]
359 }
360
361
362
363
364
365
366
367
368 \subsection[title=Brackets]
369 \startbuffer[brackets]
370 {\AllFences \blank[20pt]}
371 \stopbuffer
372
373 {\switchtobodyfont[pennstander-regular]
374 \getbuffer[brackets]}
375
376
377
378
379
380 \def\alternativeslist{
381 % uppercasenormal,
382 % lowercasenormal,
383 % digitsnormal,
384 digitsdoublestruck,
385 uppercasefraktur,
386 lowercasefraktur,
387 arrows,
388 basiclatin,
389 blockelements,
390 % combiningdiacriticalmarks,
391 % combiningdiacriticalmarksforsymbols,
392 controlpictures,
393 currencysymbols,
394 dingbats,
395 % generalpunctuation,
396 geometricshapes,
397 ipaextensions,
398 latinextendeda,
399 latinsupplement,
400 letterlikesymbols,
401 mathematicaloperators,
402 miscellaneousmathematicalsymbolsa,
403 miscellaneousmathematicalsymbolsb,
404 miscellaneoussymbols,
405 miscellaneoussymbolsandarrows,
406 miscellaneoustechnical,
407 phoneticextensions,
408 superscriptsandsubscripts,
409 supplementalarrowsa,
410 supplementalarrowsb,
411 supplementalarrowsc,
412 supplementalmathematicaloperators,
413 supplementalsymbolsandpictographs}
414
415
416 \setupmathematics[default=normal]
417 {\subsection[title=Alternatives]
418 \switchtobodyfont[pennstander-regular]
419 \doloopoverlist{ss01,ss02,ss03,ss04,ss05,ss07,ss20,cv01,cv10,cv20,cv21,cv30,cv31,cv32,zero}{
420 {\switchtobodyfont[dejavu] \recursestring : }
421 \setupbodyfont[pennstander-regular]\showmathfontcharacters[alternative=glyphvariants,list=\alternativeslist,showfeatures=none,togglelist={\recursestring}]\crlf
422 }
423 }
424
425
426
427
428
429 %\doloopoverlist{pennstander-thin-ss,pennstander-regular-ss,pennstander-bold-ss}
430 %{
431 %\setupbodyfont[\recursestring]
432 %\getbuffer[alternatives]
433 %}
434
435
436
437
438 \subsection[title=Private Space Characters]
439 \startbuffer[additionals]
440 \starttabulate[|l|l|]
441 \NC U+E1001 \NC {\switchtobodyfont[pennstander-regular]$\char"E1001$}\NR
442 \NC U+E1002 \NC {\switchtobodyfont[pennstander-regular]$\char"E1002$}\NR
443 \NC U+E1003 \NC {\switchtobodyfont[pennstander-regular]$\char"E1003$}\NR
444 \NC U+E1004 \NC {\switchtobodyfont[pennstander-regular]$\char"E1004$}\NR
445 \NC U+E1005 \NC {\switchtobodyfont[pennstander-regular]$\char"E1005$}\NR
446 \NC U+E1006 \NC {\switchtobodyfont[pennstander-regular]$\char"E1006$}\NR
447 \NC U+E1007 \NC {\switchtobodyfont[pennstander-regular]$\char"E1007$}\NR
448 \stoptabulate
449 \stopbuffer
450 \switchtobodyfont[dejavu]
451 \getbuffer[additionals]
452
453 \setupbodyfont[pennstander-bold]
454 \startformula
455 {\char"E9999}
456 \stopformula
457
458 % \startformula
459 % \rm agIAMNQVWZX \breakhere
460 % \it agIAMNQVWZX \breakhere
461 % \bf agIAMNQVWZX \breakhere
462 % \bi agIAMNQVWZX
463 % \stopformula
464
465
466 \stoptext