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
49
50
51
52\writestatus{loading}{ConTeXt XML Macros MathML Renderer}
53
54\unprotect
55
56\usemodule[x][calcmath]
57
58
59\startmodule [mathml]
60
61\registerctxluafile{xmathml}{autosuffix}
62
63\setupxml[\c!entities=\v!yes]
64
65\def\ctxmodulemathml#1{\ctxlua{moduledata.mathml.#1}}
66
67\startxmlsetups xml:mml:define
68 \xmlsetsetup{#1} {(formulasubformula)} {mml:formula}
69 \xmlfilter {#1} {omt:*function(remapopenmath)}
70 \xmlfilter {#1} {mml:bindfunction(remapmmlbind)}
71 \xmlfilter {#1} {mml:csymbolfunction(remapmmlcsymbol)}
72 \xmlsetsetup{#1} {mml:*} {mml:*}
73 \xmlsetsetup{#1} {mml:applymml:applymml:inverse....} {mml:apply:inverse}
74 \xmlstrip {#1} {(mml:mimml:momml:mnmml:csymbol)}
75\stopxmlsetups
76
77\xmlregisterns{omt}{openmath}
78\xmlregisterns{mml}{mathml}
79
80\xmlregistersetup{xml:mml:define}
81
82\xmlmapvalue {mml:math:mode} {display} {\displaymathematics}
83\xmlmapvalue {mml:math:mode} {inline} {\inlinemathematics }
84
85\xmlmapvalue {mml:math:display} {block} {\displaymathematics}
86\xmlmapvalue {mml:math:display} {inline} {\inlinemathematics }
87
88\xmlmapvalue {mml:math:dir} {ltr} {\c_math_right_to_left\conditionalfalse\math_basics_synchronize_direction}
89\xmlmapvalue {mml:math:dir} {rtl} {\c_math_right_to_left\conditionaltrue\math_basics_synchronize_direction}
90
91\edef\mmlconstantone {1}
92\edef\mmlconstantfalse{false}
93
94\startxmlsetups mml:math
95 \begingroup
96 \enableautofences
97 \enableautofencemode
98 \xmlval {mml:math:dir} {\xmlatt{#1}{dir}} {}
99 \xmlval {mml:math:display} {\xmlatt{#1}{display}} {
100 \xmlval {mml:math:mode} {\xmlatt{#1}{mode}} {
101 \automathematics
102 }
103 }
104 {
105 \xmlflush{#1}
106 }
107 \endgroup
108\stopxmlsetups
109
110\startxmlsetups mml:imath
111 \inlinemathematics {
112 \enableautofences
113 \enableautofencemode
114 \xmlflush{#1}
115 }
116\stopxmlsetups
117
118\startxmlsetups mml:dmath
119 \displaymathematics {
120 \enableautofences
121 \enableautofencemode
122 \xmlflush{#1}
123 }
124\stopxmlsetups
125
126
127
128\startxmlsetups mml:formula
129 \edef\mmlformulaid {\xmlatt{#1}{id}}
130 \edef\mmlformulalabel {\xmlatt{#1}{label}\mmlformulaid}
131 \edef\mmlformulasublabel{\xmlatt{#1}{sublabel}\mmlformulaid}
132 \doifsomething\mmlformulalabel{\placeformula[\mmlformulalabel]{\mmlformulasublabel}}
133 \startformula
134 \xmlfirst{#1}{mml:math}
135 \stopformula
136\stopxmlsetups
137
138
139\newconditional\mmlignoredelimiter
140
141\let\mmlleftdelimiter \autofenceopen
142\let\mmlmiddledelimiter \autofencemiddle
143\let\mmlrightdelimiter \autofenceclose
144\let\mmlleftorrightdelimiter\autofenceboth
145
146\def\mmlchar#1{\char#1 }
147
148
149
150\def\MMLrm{\mr}
151
152\def\MMLseparator#1{\removeunwantedspaces{#1}\ignorespaces}
153\def\MMLseparator#1{,}
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184\protected\def\xmlmathmldirective#1{\dosetvalue{MML#1}}
185
186\xmlinstalldirective{mathml}{xmlmathmldirective}
187
188
189
190\protected\def\setupMMLappearance[#1]{\dodoubleargument\getparameters[MML#1]}
191
192
193
194\def\MMLmathinner
195 {\ifinner
196 \expandafter\firstofoneargument
197 \else
198 \expandafter\mathinner
199 \fi}
200
201
202
203\def\mmlfirst #1{\xmlelement{#1}{1}}
204\def\mmlsecond #1{\xmlelement{#1}{2}}
205\def\mmlthird #1{\xmlelement{#1}{3}}
206\def\mmlprelast#1{\xmlelement{#1}{2}}
207\def\mmllast #1{\xmlelement{#1}{1}}
208
209\starttexdefinition doifelsemmlfunction #1
210 \xmldoifelse {#1} {mml:fn} {
211 \firstoftwoarguments
212 } {
213 \xmldoifelse {#1} {mml:applymml:fn} {
214 \firstoftwoarguments
215 } {
216 \xmldoifelse {#1} {mml:ci[@type==fn]} {
217 \firstoftwoarguments
218 } {
219 \secondoftwoarguments
220 }
221 }
222 }
223\stoptexdefinition
224
225
226
227\convertargument
228 mml:timesmml:dividemml:power
229 mml:ltmml:gtmml:eqmml:leqmml:geq
230 mml:inmml:inverse
231 mml:fn
232 mml:floormml:ceiling
233 mml:mean
234 mml:selector
235 mml:absmml:intmml:limitmml:summml:product
236 mml:outerproductmml:innerproductmml:scalarproduct
237\to \MMLcmainresetlist
238
239\convertargument
240 mml:sinmml:arcsinmml:sinhmml:arcsinh
241 mml:cosmml:arccosmml:coshmml:arccosh
242 mml:tanmml:arctanmml:tanhmml:arctanh
243 mml:cotmml:arccotmml:cothmml:arccoth
244 mml:cscmml:arccscmml:cschmml:arccsch
245 mml:secmml:arcsecmml:sechmml:arcsech
246 mml:lnmml:expmml:log
247 mml:absmml:intmml:limitmml:summml:product
248 mml:fn
249\to \MMLcfunctionlist
250
251\convertargument
252 mml:sinmml:arcsinmml:sinhmml:arcsinh
253 mml:cosmml:arccosmml:coshmml:arccosh
254 mml:tanmml:arctanmml:tanhmml:arctanh
255 mml:cotmml:arccotmml:cothmml:arccoth
256 mml:cscmml:arccscmml:cschmml:arccsch
257 mml:secmml:arcsecmml:sechmml:arcsech
258 mml:lnmml:expmml:log
259 mml:abs
260\to \MMLcpurefunctionlist
261
262\convertargument
263 mml:diffmml:partialdiffmml:root
264\to \MMLcconstructlist
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284\newinteger\@MMLlevel \def\MMLcreset{\@MMLlevel\zerocount}
285
286\lettonothing\MMLctempresetlist \def\setMMLcreset{\edef\MMLctempresetlist}
287
288\let\MMLdoL\donothing
289\let\MMLdoR\donothing
290
291\newinteger\mmlapplydepth \def\MMLcreset{\mmlapplydepth\zerocount}
292
293\startxmlsetups mml:apply
294 \MMLmathinner {
295
296
297
298 \edef\mmlapplyopentoken {\xmlatt{#1}{open}}
299 \edef\mmlapplyclosetoken{\xmlatt{#1}{close}}
300 \ifcase\mmlapplydepth
301 \orelse\ifempty\mmlapplyopentoken
302 \def\mmlapplyopentoken {(}
303 \def\mmlapplyclosetoken{)}
304 \fi
305 \advanceby\mmlapplydepth\plusone
306 \begingroup
307 \ifempty\mmlapplyopentoken
308 \let\MMLdoL\donothing
309 \let\MMLdoR\donothing
310 \else
311 \edef\MMLdoL{\noexpand\left \mmlapplyopentoken }
312 \edef\MMLdoR{\noexpand\right\mmlapplyclosetoken}
313 \fi
314 \lettonothing\MMLctempresetlist
315 \xmldoifelse {#1} {mml:apply} {
316
317
318
319
320 } {
321
322 }
323
324
325
326
327
328
329
330
331
332 \edef\mmlapplyaction{\xmlfilter{#1}{*tag()}}
333 \doifelsesetups {mml:apply:mml:\mmlapplyaction} {
334 \xmlsetup{#1}{mml:apply:mml:\mmlapplyaction}
335 } {
336
337 \xmlsetup{#1}{mml:\mmlapplyaction}
338
339 }
340
341 \endgroup
342 \advanceby\mmlapplydepth\minusone
343 }
344\stopxmlsetups
345
346\startxmlsetups mml:apply:mml:apply
347 \xmlflush{#1}
348 \xmlall{#1}{..[position()>1]}
349\stopxmlsetups
350
351\startxmlsetups mml:apply:mml:fn
352 \xmldoifelse {#1} {mml:fnmml:ci} {
353 \edef\mmlfnci{\xmlstripped{#1}{mml:fnmml:ci}}
354 \doifelsesetups{mmc:fn:\mmlfnci} {
355 \xmlsetup{#1}{mmc:fn:\mmlfnci}
356 } {
357 \MMLcreset
358 \MMLdoL
359 \mmlfirst{#1}
360 \ifnum\xmlcount{#1}{*}>\plusone
361 \negthinspace
362 \left(\MMLcreset\xmlconcatrange{#1}{*}{2}{}{\MMLseparator,}\right)
363 \fi
364 \MMLdoR
365 }
366 } {
367 \MMLcreset
368 \MMLdoL
369 \xmlall{#1}{*}
370 \MMLdoR
371 }
372\stopxmlsetups
373
374\startxmlsetups mml:apply:mml:csymbol
375 \xmlsetup{#1}{mml:csymbol}
376\stopxmlsetups
377
378\startxmlsetups mml:apply:mml:ci
379 \xmlfirst{#1}{mml:ci}
380 \ifnum\xmlcount{#1}{*}>\plusone
381 \left(\MMLcreset\xmlconcatrange{#1}{*}{2}{}{\MMLseparator,}\right)
382 \fi
383\stopxmlsetups
384
385
386
387\startxmlsetups mml:reln
388 \writestatus{XML}{MathML element "reln" is obsolete}
389\stopxmlsetups
390
391
392
393
394
395\startxmlsetups mmc:fn:\utfchar{"00B1}
396 \MMLdoL
397 \xmlconcat{#1}{[position()>1]}{\utfchar{"00B1}}
398 \MMLdoR
399\stopxmlsetups
400
401
402
403\startxmlsetups mmc:fn:\utfchar{"2213}
404 \MMLdoL
405 \xmlconcat{#1}{[position()>1]}{\utfchar{"2213}}
406 \MMLdoR
407\stopxmlsetups
408
409\startxmlsetups mmc:fn
410 \begingroup
411 \edef\mmlnoffn{\xmlcount{#1}{*}}
412 \ifnum\mmlnoffn>\plustwo
413 \def\MMCfnleft {\left(}
414 \def\MMCfnright{\right)}
415 \else
416 \let\MMCfnleft \relax
417 \let\MMCfnright\relax
418 \fi
419 \xmldoifelse {#1} {mml:ci} {
420 \edef\mmlfnci{\xmltext{#1}{mml:ci}}
421 \doifelsesetups{mmc:fn:\mmlfnci} {
422 \xmlsetup{#1}{mmc:fn:\mmlfnci}
423 } {
424 \MMLcreset
425 \mmlfirst{#1}
426 }
427 } {
428 \xmldoifelse {#1} {mml:apply} {
429 \xmldoifelse {#1} {(mml:plus\stringmml:minus)} {
430 \left(\mmlfirst{#1}\right)
431 } {
432 \mmlfirst{#1}
433 }
434 \ifnum\mmlnoffn>\plusone
435 \left(\xmlall{#1}{!mml:apply}\right)
436 \fi
437 } {
438 \MMLcreset
439 \negthinspace
440 \MMCfnleft
441 \ifnum\mmlnoffn=\plustwo,\fi
442 \xmlconcat{#1}{*}{2}{}{\MMLseparator,}
443 \MMCfnright
444 }
445 }
446 \endgroup
447\stopxmlsetups
448
449\startxmlsetups mmc:fn:apply
450 \xmldoifelse {#1} {mml:ci} {
451 \edef\mmlfnci{\xmltext{#1}{mml:ci}}
452 \doifelsesetups{mmc:fn:\mmlfnci} {
453 \xmlsetup{#1}{mmc:fn:\mmlfnci}
454 } {
455 \MMLcreset
456 \mmlfirst{#1}
457 \ifnum\xmlcount{#1}{*}>\plusone
458 \negthinspace
459 \left(\MMLcreset\xmlconcat{#1}{2}{}{\MMLseparator,}\right)
460 \fi
461 }
462 } {
463 \endgroup
464 \MMLcreset
465 \mmlfirst{#1}
466 }
467\stopxmlsetups
468
469
470
471
472
473
474
475
476\starttexdefinition mmlapplycsymbol #1#2#3#4
477
478 \doifelse {#3} {text} {
479 \text{#4}
480 } {
481 \doifelsesetups {mml:csymbol:#1} {
482
483 \fastsetup{mml:csymbol:#1}
484 } {
485
486 \doifelsesetups {mml:csymbol:#2} {
487 \fastsetup{mml:csymbol:#2}
488 } {
489 \xmlval{mmc:cs}{#3}{}
490 }
491 }
492 }
493\stoptexdefinition
494
495\startxmlsetups mml:csymbol
496 \mathml_csymbol{#1}
497\stopxmlsetups
498
499\startxmlsetups mml:csymbol:cdots
500 \cdots
501\stopxmlsetups
502
503
504
505
506
507\setupMMLappearance[cn] [\c!alternative=\v!a]
508\setupMMLappearance[polar] [\c!alternative=\v!a]
509\setupMMLappearance[float] [\c!symbol=\v!no]
510\setupMMLappearance[enotation][\c!symbol=\v!no]
511\setupMMLappearance[base] [\c!symbol=\v!numbers]
512
513\startxmlsetups mml:cs \xmlcommand{#1}{}{mml:cs:\xmlattdef{#1}{type}{default}} \stopxmlsetups
514\startxmlsetups mml:ci \xmlcommand{#1}{}{mml:ci:\xmlattdef{#1}{type}{default}} \stopxmlsetups
515\startxmlsetups mml:cn \xmlcommand{#1}{}{mml:cn:\xmlattdef{#1}{type}{default}} \stopxmlsetups
516
517
518
519\startxmlsetups mml:cn:default
520 \mathopnolimits{\xmlflush{#1}}
521\stopxmlsetups
522
523
524
525\startxmlsetups mml:ci:default
526 \xmlflush{#1}
527\stopxmlsetups
528
529\startxmlsetups mml:ci:set
530 {\blackboard{\xmlflush{#1}}}
531\stopxmlsetups
532
533\startxmlsetups mml:ci:vector
534 \overrightarrow{\xmlflush{#1}}
535\stopxmlsetups
536
537\startxmlsetups mml:ci:matrix
538 {\bi\xmlflush{#1}}
539\stopxmlsetups
540
541\startxmlsetups mml:ci:function
542 \xmlflush{#1}
543\stopxmlsetups
544
545\startxmlsetups mml:ci:fn
546 \xmlsetup{#1}{mml:ci:function}
547\stopxmlsetups
548
549\startxmlsetups mml:ci:complexcartesian
550 \xmlsetup{#1}{mml:cn:complex}
551\stopxmlsetups
552
553\startxmlsetups mml:ci:complex
554 \xmlsetup{#1}{mml:cn:complex}
555\stopxmlsetups
556
557\startxmlsetups mml:ci:complexpolar
558 \xmlsetup{#1}{mml:cn:polar}
559\stopxmlsetups
560
561\startxmlsetups mml:ci:polar
562 \xmlsetup{#1}{mml:cn:polar}
563\stopxmlsetups
564
565
566
567\startxmlsetups mml:cn:default
568 \xmlflush{#1}
569\stopxmlsetups
570
571\startxmlsetups mml:cn:integer
572 \mathatom class \mathdigitcode \bgroup
573 \edef\mmlintegerbase{\xmlattdef{#1}{base}{}}
574 \ifempty\mmlintegerbase
575 \xmlflush{#1}
576 \else
577 \mtext {
578 \nospacing
579 \MMLcCNbasedata{\xmlflush{#1}}
580 }
581 \doifnot \MMLbasesymbol \v!no {
582 \normalsubscript {
583 \mtext {
584 \processaction
585 [\MMLbasesymbol]
586 [\v!characters=>\MMLcCNbasestring BODH,
587 \v!text=>\MMLcCNbasestring{BIN}{OCT}{DEC}{HEX},
588 \s!unknown=>\mmlintegerbase]
589 }
590 }
591 }
592 \fi
593 \egroup
594\stopxmlsetups
595
596\def\MMLcCNbasedata#1
597 {\ifnum\mmlintegerbase>10 \relax{\mr#1}\else#1\fi}
598
599\def\MMLcCNbasestring#1#2#3#4
600 {\ifnum\mmlintegerbase= 2 #1\orelse
601 \ifnum\mmlintegerbase= 8 #2\orelse
602 \ifnum\mmlintegerbase=10 #3\orelse
603 \ifnum\mmlintegerbase=16 #4\else
604 \mmlintegerbase \fi}
605
606\startxmlsetups mml:cn:polar
607 \xmlsetup{#1}{mml:cn:polar:\MMLpolaralternative}
608\stopxmlsetups
609
610\startxmlsetups mml:cn:polar:a
611 \mathml_cpolar{#1}
612\stopxmlsetups
613
614\startxmlsetups mml:cn:polar:b
615
616 \ee\normalsuperscript{\xmlsnippet{#1}{1}\xmlsnippet{#1}{3}\ii}
617\stopxmlsetups
618
619\startxmlsetups mml:cn:polar:c
620
621 \exp\left(\xmlsnippet{#1}{1}\xmlsnippet{#1}{3}\ii\right)
622\stopxmlsetups
623
624\startxmlsetups mml:cn:complexpolar
625 \xmlsetup{#1}{mml:cn:polar}
626\stopxmlsetups
627
628\startxmlsetups mml:cn:complex
629
630 \left(\xmlsnippet{#1}{1} \xmlsnippet{#1}{3}\ii\right)
631\stopxmlsetups
632
633\startxmlsetups mml:cn:complexcartesian
634 \xmlsetup{#1}{mml:cn:complex}
635\stopxmlsetups
636
637\startxmlsetups mml:cn:float
638 \doifelse \MMLfloatsymbol \v!no {
639
640 \mathopnolimits{\xmlflush{#1}}
641 } {
642
643 \edef\mmlfloatstring{\xmlflush{#1}}
644 \splitstring\mmlfloatstring\at e\to\first\and\last
645 \ifempty\first
646 \mmlfloatstring
647 \orelse\ifempty\last
648 \mmlfloatstring
649 \else
650 \first
651 \doifelse \MMLfloatsymbol {dot} \cdot \times
652 10\normalsuperscript{\last}
653 \fi
654 }
655\stopxmlsetups
656
657\startxmlsetups mml:cn:real
658 \xmlsetup{#1}{mml:cn:float}
659\stopxmlsetups
660
661\startxmlsetups mml:cn:enotation
662 \doifelse \MMLenotationsymbol \v!no {
663 \xmlsnippet{#1}{1}
664 \unskip\mathopnolimits{e}\ignorespaces
665 \xmlsnippet{#1}{3}
666 } {
667 \xmlsnippet{#1}{1}
668 \doifelse \MMLenotationsymbol {dot} \cdot
669 \times10\normalsuperscript{\xmlsnippet{#1}{3}}
670 }
671\stopxmlsetups
672
673\startxmlsetups mml:cn:logical
674 \mathopnolimits{\xmlflush{#1}}
675\stopxmlsetups
676
677\startxmlsetups mml:cn:rational
678 \xmldoifelse {#1} {mml:sep} {
679 \mmlfrac
680 {\xmlsnippet{#1}{1}}
681 {\xmlsnippet{#1}{3}}
682 } {
683 \xmlflush{#1}
684 }
685\stopxmlsetups
686
687
688
689\setupMMLappearance[interval][\c!alternative=\v!a,\c!separator={,}]
690
691
692
693\startxmlsetups mml:interval
694 \doifelse {\xmltag{#1}} {apply} {
695
696 \let\mmlintervalfirst \mmlsecond
697 \let\mmlintervalsecond\mmlthird
698 \xmlsetup{#1}{mml:interval:\xmlattributedef{#1}{mml:interval}{closure}{closed}}
699 } {
700
701 \let\mmlintervalfirst \mmlfirst
702 \let\mmlintervalsecond\mmlsecond
703 \xmlsetup{#1}{mml:interval:\xmlattdef{#1}{closure}{closed}}
704 }
705\stopxmlsetups
706
707\startxmlsetups mml:interval:closed
708 \left[\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right]
709\stopxmlsetups
710
711\startxmlsetups mml:interval:openclosed
712 \doifelse \MMLintervalalternative \v!b {
713 \left<\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right]
714 } {
715 \left(\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right]
716 }
717\stopxmlsetups
718
719\startxmlsetups mml:interval:closedopen
720 \doifelse \MMLintervalalternative \v!b {
721 \left[\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right>
722 } {
723 \left[\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right)
724 }
725\stopxmlsetups
726
727\startxmlsetups mml:interval:open
728 \doifelse \MMLintervalalternative \v!b {
729 \left<\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right>
730 } {
731 \left(\mmlintervalfirst{#1}\MMLseparator\MMLintervalseparator\mmlintervalsecond{#1}\right)
732 }
733\stopxmlsetups
734
735
736
737\newconditional\xmlinversefunction
738
739\startxmlsetups mml:apply:inverse
740 \xmlinversefunction\conditionaltrue
741 \xmlsetup{#1}{mml:\xmlfilter{#1}{mml:apply*[2]tag()}}
742\stopxmlsetups
743
744
745
746
747
748
749
750\startxmlsetups mml:bvar \xmlflush{#1} \stopxmlsetups
751\startxmlsetups mml:lowlimit \xmlflush{#1} \stopxmlsetups
752\startxmlsetups mml:uplimit \xmlflush{#1} \stopxmlsetups
753\startxmlsetups mml:degree \xmlflush{#1} \stopxmlsetups
754\startxmlsetups mml:logbase \xmlflush{#1} \stopxmlsetups
755\startxmlsetups mml:fn \xmlflush{#1} \stopxmlsetups
756
757\startxmlsetups mml:condition
758
759
760
761 \xmlall{#1}{!(mml:condition\stringmml:bvar)}
762\stopxmlsetups
763
764
765
766\setupMMLappearance[declare][\c!state=\v!start]
767
768\startxmlsetups mml:declare
769 \doif \MMLdeclarestate \v!start {
770 \mathopnolimits{declare}
771 \mmlfirst{#1}
772 \ifnum\xmlcount{#1}{*}>\plusone
773 \thickspace
774 \mathopnolimits{as}
775 \thickspace
776 \fi
777 \mmlsecond{#1}
778 }
779\stopxmlsetups
780
781
782
783\setupMMLappearance[lambda][\c!alternative=b]
784
785\startxmlsetups mml:lambda
786 \begingroup
787 \doifelse \MMLlambdaalternative \v!a {
788 \lambda\left(\xmlconcat{#1}{!mml:lambda}{\MMLseparator,}\right)
789 } {
790 \ifnum\xmlcount{#1}{mml:bvar}>\plusone
791 \left(\xmlconcat{#1}{mml:bvar}{\MMLseparator,}\right)
792 \else
793 \xmlfirst{#1}{mml:bvar}
794 \fi
795 \mapsto
796 \MMLcreset
797 \xmlall{#1}{!(mml:bvarmml:lambda)}
798 }
799 \endgroup
800\stopxmlsetups
801
802
803
804\startxmlsetups mml:compose
805 \begingroup
806 \MMLcreset
807
808 \doifelsemmlfunction {#1} {
809 \left(\xmlconcat{#1}{!mml:compose}{\circ}\right)
810 } {
811 \xmlconcat{#1}{!mml:compose}{\circ}
812 }
813 \endgroup
814\stopxmlsetups
815
816\startxmlsetups mml:image
817 \mathopnolimits{image} \left( {\mr\xmlfilter{#1}{!mml:imagetag()}} \right)
818\stopxmlsetups
819
820\setupMMLappearance[piece][\c!separator=]
821
822\let\theMMLpieceseparator\empty
823
824\startxmlsetups mml:piecewise
825 \processaction
826 [\MMLpieceseparator]
827 [ \v!yes=>\def\theMMLpieceseparator{,},
828 \v!no=>\def\theMMLpieceseparator{},
829 \s!default=>\def\theMMLpieceseparator{},
830 \s!unknown=>\def\theMMLpieceseparator{\,\,\hbox{\MMLpieceseparator}\,\,}]
831 \startcases
832 \xmlflush{#1}
833 \stopcases
834\stopxmlsetups
835
836\startxmlsetups mml:piece
837 \mmlfirst{#1}\theMMLpieceseparator\mathematics{\mmlsecond{#1}}\crcr
838\stopxmlsetups
839
840\startxmlsetups mml:otherwise
841
842 \xmlflush{#1}\mtext{otherwise}\crcr
843\stopxmlsetups
844
845
846
847\startxmlsetups mml:quotient
848 \lfloor\mmlsecond{#1}\mmlthird{#1}\rfloor
849\stopxmlsetups
850
851\startxmlsetups mml:factorial
852 \xmlall{#1}{!factorial}!
853\stopxmlsetups
854
855\setupMMLappearance [divide] [\c!level=\!!maxcard,\c!alternative=\v!a]
856
857\newinteger\mmldividelevel
858
859\startxmlsetups mml:divide
860 \advanceby\mmldividelevel\plusone
861 \doifelse \MMLdividealternative \v!b {
862 \mmlsecond{#1}\mmlthird{#1}
863 } {
864 \ifnum \mmldividelevel > \MMLdividelevel \relax
865 \mmlsecond{#1}\mmlthird{#1}
866 \else
867 \MMLcreset
868 \mmlfrac{\MMLcreset\mmlsecond{#1}}{\MMLcreset\mmlthird{#1}}
869 \fi
870 }
871 \advanceby\mmldividelevel\minusone
872\stopxmlsetups
873
874
875
876
877\startxmlsetups mml:min \min \xmlsetup{#1}{mml:minmax} \stopxmlsetups
878
879\startxmlsetups mml:max \max \xmlsetup{#1}{mml:minmax} \stopxmlsetups
880
881\startxmlsetups mml:minmax
882 \xmldoif {#1} {mml:bvar} {
883 {}\normalsubscript{\xmlfirst{#1}{mml:bvar}}
884 }
885 \left\{
886 \xmlconcat{#1}{!(mml:bvar\stringmml:max\stringmml:min)}{\MMLseparator,}
887 \right\}
888\stopxmlsetups
889
890
891
892\setupMMLappearance [plus] [\c!alternative=\v!a]
893\setupMMLappearance [sign] [\c!reduction=\v!yes]
894
895
896
897
898
899
900
901\newinteger\mmlpluscounter
902
903\startxmlsetups mml:plus
904 \doifelse \MMLsignreduction \v!yes {
905 \MMLdoL
906 \xmlsetup{#1}{mml:plus:reset}
907 \xmlcommand{#1}{!mml:plus}{mml:plus:body}
908 \MMLdoR
909 } {
910 \ifnum\xmlcount{#1}{!mml:plus}=\plusone
911 \xmlfirst{#1}{!mml:plus}
912 \else
913 \MMLdoL
914 \xmlconcat{#1}{!mml:plus}{}
915 \MMLdoR
916 \fi
917 }
918\stopxmlsetups
919
920\startxmlsetups mml:plus:reset
921 \mmlpluscounter\zerocount
922\stopxmlsetups
923
924\startxmlsetups mml:plus:body
925 \advanceby\mmlpluscounter\plusone
926 \ifnum\mmlpluscounter>\plusone
927 \xmldoifelse{#1}{mml:minus} {
928 \ifnum\xmlcount{#1}{!mml:minus}>\plusone
929
930 \fi
931 } {
932 \doifelse {\xmlatt{#1}{type}} {rational} {
933
934 } {
935
936 }
937 }
938 \fi
939 \xmldirect{#1}
940\stopxmlsetups
941
942\newinteger\mmlminuscounter
943
944\startsetups mml:minus
945 \doifelse \MMLsignreduction \v!yes {
946 \ifnum\xmlcount{#1}{!mml:minus}=\plusone
947 \xmlfirst{#1}{!mml:minus}
948 \else
949 \MMLdoL
950 \xmlsetup{#1}{mml:minus:reset}
951 \xmlcommand{#1}{!mml:minus}{mml:minus:body}
952 \MMLdoR
953 \fi
954 } {
955 \left(
956 \ifnum\xmlcount{#1}{!mml:minus}=\plusone
957 \xmlfirst{#1}{!mml:minus}
958 \else
959 \xmlsetup{#1}{mml:minus:reset}
960 \xmlcommand{#1}{!mml:minus}{mml:minus:body}
961 \fi
962 \right)
963 }
964\stopsetups
965
966\startxmlsetups mml:minus:reset
967 \mmlminuscounter\zerocount
968\stopxmlsetups
969
970\startxmlsetups mml:minus:body
971
972 \advanceby\mmlminuscounter\plusone
973 \ifnum\mmlminuscounter>\plusone
974
975 \fi
976 \xmldirect{#1}
977\stopxmlsetups
978
979
980
981\setupMMLappearance[power][\c!reduction=\v!yes]
982
983\lettonothing\MMLpowerelement
984
985\startxmlsetups mml:power
986 \xmldoifelse {#1} {mml:apply} {
987 \doifelse \MMLpowerreduction \v!yes {
988 \xmldoifelse {#1} {mml:apply(\MMLcfunctionlist)} {
989 \gdef\MMLpowerelement{\mmlthird{#1}}
990 \MMLcreset\mmlsecond{#1}
991 } {
992 \left(\MMLcreset\mmlsecond{#1}\right)\normalsuperscript{\MMLcreset\mmlthird{#1}}
993 }
994 } {
995 \left(\MMLcreset\mmlsecond{#1}\right)\normalsuperscript{\MMLcreset\mmlthird{#1}}
996 }
997 } {
998 \mmlsecond{#1}\normalsuperscript{\MMLcreset\mmlthird{#1}}
999 }
1000\stopxmlsetups
1001
1002
1003
1004\startxmlsetups mml:rem
1005 \xmlconcat{#1}{!mml:rem}{\mathopnolimits{mod}}
1006\stopxmlsetups
1007
1008\setupMMLappearance [times] [\c!symbol=\v!no,\c!auto=\v!yes]
1009
1010\startxmlsetups mml:times
1011 \setMMLcreset{\MMLcfunctionlist\string\MMLcconstructlist}
1012 \doifelse\MMLtimesauto\v!no {
1013 \let\MMLtimes@@symbol\MMLtimessymbol
1014 } {
1015 \xmldoifelse {#1} {mml:cn[name(1) == mml:cn]} {
1016 \doifelseinset\MMLtimessymbol{\v!yes,\v!no} {
1017 \let\MMLtimes@@symbol\v!yes
1018 } {
1019 \let\MMLtimes@@symbol\MMLtimessymbol
1020 }
1021 } {
1022 \let\MMLtimes@@symbol\MMLtimessymbol
1023 }
1024 }
1025 \doifelse\MMLtimes@@symbol\v!yes {
1026 \xmlconcat{#1}{!mml:times}{\times}
1027 } {
1028 \doifelse\MMLtimes@@symbol{dot} {
1029 \xmlconcat{#1}{!mml:times}{\cdot}
1030 } {
1031 \doifelse\MMLtimes@@symbol{times} {
1032 \xmlconcat{#1}{!mml:times}{\times}
1033 } {
1034 \xmlall{#1}{!mml:times}
1035 }
1036 }
1037 }
1038\stopxmlsetups
1039
1040\setupMMLappearance[root][\c!symbol=\v!yes]
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053\startxmlsetups mml:root
1054 \xmldoifelse {#1} {mml:degree} {
1055 \sqrt [
1056 \doifnot\MMLrootsymbol\v!no{\MMLcreset\xmltext{#1}{mml:degree}}
1057 ]
1058 } {
1059 \sqrt
1060 }
1061 {\MMLcreset\xmlall{#1}{!(mml:degree\stringmml:root)}}
1062\stopxmlsetups
1063
1064
1065
1066\startxmlsetups mml:gcd
1067 \begingroup
1068 \gcd\left(\MMLcreset\xmlconcat{#1}{!mml:gcd}{\MMLseparator,}\right)
1069 \endgroup
1070\stopxmlsetups
1071
1072
1073
1074\startxmlsetups mml:and \xmlconcat{#1}{!mml:and} {\wedge} \stopxmlsetups
1075\startxmlsetups mml:or \xmlconcat{#1}{!mml:or} {\vee} \stopxmlsetups
1076\startxmlsetups mml:xor \xmlconcat{#1}{!mml:xor} {\mathopnolimits{xor}} \stopxmlsetups
1077\startxmlsetups mml:implies \xmlconcat{#1}{!mml:implies}{\Rightarrow} \stopxmlsetups
1078\startxmlsetups mml:not \neg \xmlall {#1}{!mml:not} \stopxmlsetups
1079
1080
1081
1082
1083
1084\startxmlsetups mml:forall
1085 \forall \negthinspace \xmlsetup{#1}{mml:forallexists}
1086\stopxmlsetups
1087
1088\startxmlsetups mml:exists
1089 \exists \xmlsetup{#1}{mml:forallexists}
1090\stopxmlsetups
1091
1092\def\mmlforallexistslist{mml:bvar\stringmml:forall\stringmml:exists\stringmml:condition}
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111\startxmlsetups mml:forallexists
1112 \normalsubscript{\xmlconcat{#1}{mml:bvar}{\MMLseparator,}}
1113 \xmldoifelse {#1} {mml:condition} {
1114 \thickspace
1115 \begingroup
1116 \xmlfirst{#1}{mml:condition}
1117 \endgroup
1118 \ifcase\xmlcount{#1}{!(\mmlforallexistslist)}\relax
1119
1120 \or
1121
1122 \left\vert
1123 \MMLcreset \medspace \xmlconcat{#1}{!(\mmlforallexistslist)}{}
1124 \right.
1125 \else
1126
1127 \left\vert
1128 \plainmatrix{\xmlconcat{#1}{!(\mmlforallexistslist)}{\hfill\crcr}}
1129 \right.
1130
1131
1132
1133 \fi
1134 } {
1135 :\xmlfirst{#1}{!(\mmlforallexistslist)}
1136 }
1137\stopxmlsetups
1138
1139\startxmlsetups mml:abs
1140 \left\vert \MMLcreset\xmlall{#1}{!mml:abs} \right\vert
1141\stopxmlsetups
1142
1143\startxmlsetups mml:conjugate
1144 {\overline{\MMLcreset\xmlall{#1}{!mml:conjugate}}}
1145\stopxmlsetups
1146
1147\startxmlsetups mml:arg
1148 \mathopnolimits{arg} \left( \MMLcreset\xmlall{#1}{!mml:arg} \right)
1149\stopxmlsetups
1150
1151\startxmlsetups mml:real
1152 \Re \left( \MMLcreset \xmlall{#1}{!mml:real} \right)
1153\stopxmlsetups
1154
1155\startxmlsetups mml:imaginary
1156 \Im \ left( \MMLcreset \xmlall{#1}{!mml:imaginary} \right)
1157\stopxmlsetups
1158
1159\startxmlsetups mml:lcm
1160 \mathopnolimits{lcm} \left( \xmlconcat{#1}{!mml:lcm}{\MMLseparator,} \right)
1161\stopxmlsetups
1162
1163\startxmlsetups mml:floor
1164 \lfloor \xmlall{#1}{!mml:floor} \rfloor
1165\stopxmlsetups
1166
1167\startxmlsetups mml:ceiling
1168 \lceiling \xmlall{#1}{!mml:ceiling} \rceiling
1169\stopxmlsetups
1170
1171
1172
1173
1174
1175\setupMMLappearance[relation][\c!align=\v!no]
1176
1177\xmlmapvalue {mml:relation} {eq} {=}
1178\xmlmapvalue {mml:relation} {neq} {\neq}
1179\xmlmapvalue {mml:relation} {gt} {>}
1180\xmlmapvalue {mml:relation} {lt} {<}
1181\xmlmapvalue {mml:relation} {geq} {\geq}
1182\xmlmapvalue {mml:relation} {leq} {\leq}
1183\xmlmapvalue {mml:relation} {equivalent} {\equiv}
1184\xmlmapvalue {mml:relation} {approx} {\approx}
1185\xmlmapvalue {mml:relation} {factorof} {\mid}
1186
1187\startxmlsetups mml:eq \xmlsetup{#1}{mml:relation} \stopxmlsetups
1188\startxmlsetups mml:neq \xmlsetup{#1}{mml:relation} \stopxmlsetups
1189\startxmlsetups mml:gt \xmlsetup{#1}{mml:relation} \stopxmlsetups
1190\startxmlsetups mml:lt \xmlsetup{#1}{mml:relation} \stopxmlsetups
1191\startxmlsetups mml:geq \xmlsetup{#1}{mml:relation} \stopxmlsetups
1192\startxmlsetups mml:leq \xmlsetup{#1}{mml:relation} \stopxmlsetups
1193\startxmlsetups mml:equivalent \xmlsetup{#1}{mml:relation} \stopxmlsetups
1194\startxmlsetups mml:approx \xmlsetup{#1}{mml:relation} \stopxmlsetups
1195\startxmlsetups mml:factorof \xmlsetup{#1}{mml:relation} \stopxmlsetups
1196
1197
1198
1199\startxmlsetups mml:relation
1200 \edef\mmlapplyaction{\xmlfilter{#1}{*tag()}}
1201 \MMLcreset \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{\MMLrelationalign}}
1202\stopxmlsetups
1203
1204\startxmlsetups mml:relation:default
1205 \xmlconcatrange{#1}{*}{2}{}{\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}}
1206\stopxmlsetups
1207\startxmlsetups mml:relation:last
1208 \eqalign {
1209 \xmlconcatrange{#1}{*}{2}{2}{\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}\crcr}
1210 \mmlprelast{#1}\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}{}\mmllast{#1}
1211 }
1212\stopxmlsetups
1213\startxmlsetups mml:relation:first
1214 \eqalign {
1215 \mmlsecond{#1}\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}{}
1216 \xmlconcatrange{#1}{*}{3}{}{\crcr\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}{}}
1217 }
1218\stopxmlsetups
1219\startxmlsetups mml:relation:left
1220 \eqalign {
1221 \xmlconcatrange{#1}{*}{2}{}{\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}\crcr}
1222 }
1223\stopxmlsetups
1224\startxmlsetups mml:relation:right
1225 \eqalign {
1226 \xmlconcatrange{#1}{*}{2}{}{\crcr\xmlval{mml:relation}{\mmlapplyaction}{[\mmlapplyaction]}{}}
1227 }
1228\stopxmlsetups
1229\startxmlsetups mml:relation:no
1230 \xmlsetup{#1}{mml:relation:default}
1231\stopxmlsetups
1232\startxmlsetups mml:relation:yes
1233 \xmlsetup{#1}{mml:relation:left}
1234\stopxmlsetups
1235
1236
1237
1238\edef\MMLcmainresetlist{\MMLcmainresetlist\stringbecomes}
1239
1240\xmlmapvalue {mml:relation} {mml:becomes} {:=}
1241
1242\startxmlsetups mml:becomes \xmlsetup{#1}{mml:relation} \stopxmlsetups
1243
1244
1245
1246\startxmlsetups mml:domainofapplication
1247 \xmlall{#1}{!mml:domainofapplication}
1248\stopxmlsetups
1249
1250\setupMMLappearance[int][\c!location=\v!top]
1251
1252\def\doMMLlimits#1{\doifelsevalue{MML#1\c!location}\v!top\limits\nolimits}
1253
1254\startxmlsetups mml:int
1255 \MMLcreset
1256 \xmldoifelse {#1} {mml:domainofapplication} {
1257 \int \doMMLlimits{int}\normalsubscript{\xmlfirst{#1}{mml:domainofapplication}}\relax
1258 } {
1259 \xmldoifelse {#1} {mml:condition} {
1260 \int \doMMLlimits{int}\normalsubscript{\xmlfirst{#1}{mml:condition}}\relax
1261 } {
1262 \xmldoifelse {#1} {mml:lowlimit} {
1263 \int \doMMLlimits{int}\normalsubscript{\xmlfirst{#1}{mml:lowlimit}}\normalsuperscript{\xmlfirst{#1}{mml:uplimit}}
1264 } {
1265
1266 \xmldoifelse {#1} {mml:applymml:interval} {
1267 \int \doMMLlimits{int}\normalsubscript{\xmlindex{#1}{mml:apply}{2}}\normalsuperscript{\xmlindex{#1}{mml:apply}{3}}
1268 } {
1269 \int
1270 }
1271 }
1272 }
1273 }
1274 \MMLcreset
1275 \xmldoifelse {#1} {mml:apply} {
1276 \doifelsemmlfunction {#1} {
1277 \xmlfirst{#1}{mml:apply}
1278 } {
1279
1280 \left( \xmlfirst{#1}{mml:apply} \right)
1281 }
1282 } {
1283 \xmlfirst{#1}{mml:ci}
1284 }
1285 \xmldoifelse {#1} {mml:bvar} {
1286
1287 \dd \xmlfirst{#1}{mml:bvar}
1288 } {
1289
1290 }
1291\stopxmlsetups
1292
1293\setupMMLappearance[diff][\c!location=\v!top,\c!alternative=\v!a]
1294
1295\startxmlsetups mml:diff
1296 \MMLcreset
1297 \doifelse \MMLdiffalternative \v!a {
1298 \xmldoifelse {#1} {mml:lambda} {
1299
1300 \mmlfrac {
1301 d
1302 \normalsuperscript
1303 {\xmlfirst{#1}{mml:bvar}\xmlfirst{#1}{mml:cn}}
1304 {\xmlfirst{#1}{mml:lambda}\xmlfirst{#1}{mml:ci}}
1305 } {
1306 d
1307 {\xmlfirst{#1}{mml:bvar}\xmlfirst{#1}{mml:ci}}
1308 \normalsuperscript
1309 {\xmlfirst{#1}{mml:bvar}\xmlfirst{#1}{mml:cn}}
1310 }
1311 } {
1312 \xmldoifelse {#1} {mml:bvar} {
1313 \mmlfrac {
1314
1315 \dd{
1316 \xmldoifelse {#1} {mml:degree} {
1317 \normalsuperscript{\xmlconcat{#1}{mml:degree}\empty}
1318 } {
1319 \xmldoif {#1} {mml:bvarmml:degree} {
1320 \normalsuperscript{\xmlconcat{#1}{mml:bvarmml:degree}}
1321 }
1322 }
1323 }
1324 \doif \MMLdifflocation \v!top {
1325 \xmldoifelse {#1} {mml:ci} {
1326 \xmlfirst{#1}{mml:ci}
1327 } {
1328 \MMLcreset
1329 \ifnum\xmlcount{#1}{mml:apply*}>\plustwo
1330 \left(\xmlfirst{#1}{mml:apply}\right)
1331 \else
1332 \xmlfirst{#1}{mml:apply}
1333 \fi
1334 }
1335 }
1336 } {
1337
1338 \dd
1339 \xmlfirst{#1}{mml:bvar!mml:degree}
1340 \xmldoif {#1} {mml:bvarmml:degree} {
1341 \normalsuperscript{\xmlfirst{#1}{mml:bvarmml:degree}}
1342 }
1343 }
1344 \doifnot \MMLdifflocation \v!top {
1345 \left(\MMLcreset\xmlfirst{#1}{(mml:apply\stringmml:ci)}\right)
1346 }
1347 } {
1348
1349
1350 \xmlconcatrange{#1}{*}{2}{}{}\prime
1351 }
1352 }
1353 } {
1354 \MMLcreset
1355 \xmlfirst{#1}{(mml:apply\stringmml:ci)}
1356
1357
1358 {}\normalsuperscript
1359 {
1360 \xmldoifelse {#1} {mml:degree} {
1361 \edef\mmldegree{\xmlfirst{#1}{mml:degreemml:cn}}
1362 \ifempty\mmldegree
1363
1364 \else
1365 \dorecurse\mmldegree\prime
1366 \fi
1367 } {
1368 \prime
1369 }
1370 }
1371 }
1372\stopxmlsetups
1373
1374\startxmlsetups mml:partialdiff
1375 \xmldoifelse {#1} {mml:list} {
1376
1377 \DD\normalsubscript{
1378 \begingroup
1379 \mmllistdelimiters\conditionalfalse
1380 \xmlall{#1}{mml:list}
1381 \endgroup
1382 }
1383 \xmlfirst{#1}{(mml:apply\stringmml:reln\stringmml:ci\stringmml:cn)}
1384 } {
1385 \xmldoifelse {#1} {mml:bvar} {
1386 \mmlfrac {
1387
1388 \dd\normalsuperscript{
1389 \xmldoifelse {#1} {mml:degree} {
1390 \xmlconcat{#1}{mml:degree}\empty
1391 } {
1392 \xmlconcat{#1}{mml:bvarmml:degree}
1393 }
1394 }
1395 \MMLcreset
1396 \xmlfirst{#1}{(mml:apply\stringmml:reln\stringmml:ci\stringmml:cn)}
1397 } {
1398 \xmldoif {#1}{mml:bvar!mml:degree} {
1399 \xmlfirst{#1}{mml:bvar!mml:degree} \,
1400 }
1401
1402 \dd\xmlfirst{#1}{(mml:apply\stringmml:reln\stringmml:ci\stringmml:cn)}
1403 \xmldoif {#1} {mml:bvarmml:degree} {
1404 \normalsuperscript{\xmlfirst{#1}{mml:bvarmml:degree}}
1405 }
1406 }
1407 } {
1408 \xmlfirst{#1}{(mml:apply\stringmml:reln\stringmml:ci\stringmml:cn)}
1409 }
1410 }
1411\stopxmlsetups
1412
1413\startxmlsetups mml:divergence \mathopnolimits{div} \xmlall{#1}{!mml:divergence} \stopxmlsetups
1414\startxmlsetups mml:grad \mathopnolimits{grad} \xmlall{#1}{!mml:grad} \stopxmlsetups
1415\startxmlsetups mml:curl \mathopnolimits{curl} \xmlall{#1}{!mml:curl} \stopxmlsetups
1416\startxmlsetups mml:laplacian \nabla\normalsuperscript2 \xmlall{#1}{!mml:laplacian} \stopxmlsetups
1417\startxmlsetups mml:ident \mathopnolimits{identity} \xmlall{#1}{!mml:ident} \stopxmlsetups
1418
1419\setupMMLappearance[domain] [symbol=]
1420\setupMMLappearance[codomain][symbol=]
1421
1422\startxmlsetups mml:domain
1423 \doifelsenothing \MMLdomainsymbol {
1424 \mathopnolimits{domain}\MMLcreset\xmlall{#1}{!mml:domain}
1425 } {
1426 \MMLdomainsymbol\normalsubscript{\xmlall{#1}{!mml:domain}}
1427 }
1428\stopxmlsetups
1429
1430\startxmlsetups mml:codomain
1431 \doifelsenothing \MMLcodomainsymbol {
1432 \mathopnolimits{codomain}\MMLcreset\xmlall{#1}{!mml:codomain}
1433 } {
1434 \MMLcodomainsymbol\normalsubscript{\xmlall{#1}{!mml:codomain}}
1435 }
1436\stopxmlsetups
1437
1438
1439
1440\startxmlsetups mml:set
1441 \left\{
1442 \xmldoifelse {#1} {mml:condition} {
1443 \xmlfirst{#1}{mml:bvar}\,\middle\vert\,\xmlfirst{#1}{mml:condition}
1444 } {
1445 \xmlconcat{#1}{!mml:set}{\MMLseparator,}
1446 }
1447 \right\}
1448 \relax
1449\stopxmlsetups
1450
1451\newconditional\mmllistdelimiters \mmllistdelimiters\conditionaltrue
1452
1453\startxmlsetups mml:list
1454 \begingroup
1455 \ifconditional\mmllistdelimiters\left [\fi
1456 \begingroup
1457 \mmllistdelimiters\conditionaltrue
1458 \xmlconcat{#1}{!mml:list}{\MMLseparator,}
1459 \endgroup
1460 \ifconditional\mmllistdelimiters\right]\fi
1461 \endgroup
1462\stopxmlsetups
1463
1464\startxmlsetups mml:union \mmlsecond{#1} \cup \mmlthird{#1} \stopxmlsetups
1465\startxmlsetups mml:intersect \mmlsecond{#1} \cap \mmlthird{#1} \stopxmlsetups
1466\startxmlsetups mml:in \mmlsecond{#1} \in \mmlthird{#1} \stopxmlsetups
1467\startxmlsetups mml:notin \mmlsecond{#1} {\not\in} \mmlthird{#1} \stopxmlsetups
1468\startxmlsetups mml:subset \mmlsecond{#1} \subset \mmlthird{#1} \stopxmlsetups
1469\startxmlsetups mml:prsubset \mmlsecond{#1} \subseteq \mmlthird{#1} \stopxmlsetups
1470\startxmlsetups mml:notsubset \mmlsecond{#1} {\not\subset} \mmlthird{#1} \stopxmlsetups
1471\startxmlsetups mml:notprsubset \mmlsecond{#1} {\not\subseteq} \mmlthird{#1} \stopxmlsetups
1472\startxmlsetups mml:setdiff \mmlsecond{#1} \setminus \mmlthird{#1} \stopxmlsetups
1473
1474\startxmlsetups mml:card
1475 \left\vert \xmlall{#1}{!mml:card} \right\vert
1476\stopxmlsetups
1477
1478\startxmlsetups mml:cartesianproduct
1479 \xmlconcat{#1}{!mml:cartesianproduct}{\times}
1480\stopxmlsetups
1481
1482
1483
1484\setupMMLappearance[sum] [\c!location=\v!top]
1485\setupMMLappearance[product][\c!location=\v!top]
1486
1487\xmlmapvalue {mml:sumprod} {sum} {\sum}
1488\xmlmapvalue {mml:sumprod} {product} {\prod}
1489
1490\startxmlsetups mml:sum \edef\mmlsumprodname{sum} \xmlsetup{#1}{mml:sumprod} \stopxmlsetups
1491\startxmlsetups mml:product \edef\mmlsumprodname{product} \xmlsetup{#1}{mml:sumprod} \stopxmlsetups
1492
1493\def\mmlstackedsubscripts#1
1494 {\vbox
1495 {\baselineskip\zeroskip
1496 \halign{\startimath\scriptstyle\hss\alignmark\alignmark\hss\stopimath\cr#1\crcr}}}
1497
1498
1499
1500\startxmlsetups mml:sumprod
1501 \begingroup
1502 \xmldoifelse {#1} {(mml:condition\stringmml:bvar\stringmml:lowlimit)} {
1503 \def\mmlsumprodlower{
1504 \normalsubscript{
1505 \xmldoifelse {#1} {mml:condition} {
1506 \mmlstackedsubscripts{\xmlconcat{#1}{mml:condition}{\crcr}}
1507 } {
1508 \xmldoif {#1} {mml:bvar} {
1509 \xmlfirst{#1}{mml:bvar}
1510 \xmldoif{#1}{mml:lowlimit}{=}
1511 }
1512 \xmlfirst{#1}{mml:lowlimit}
1513 }
1514 }
1515 }
1516 } {
1517 \lettonothing\mmlsumprodlower
1518 }
1519 \xmldoifelse {#1} {mml:uplimit} {
1520 \def\mmlsumprodupper{\normalsuperscript{\xmlfirst{#1}{mml:uplimit}}}
1521 } {
1522 \lettonothing\mmlsumprodupper
1523 }
1524 \xmldoif {#1} {mml:interval} {
1525 \edef\mmlintervalfrom{\xmlindex{#1}{mml:interval}{1}}
1526 \edef\mmlintervalto {\xmlindex{#1}{mml:interval}{2}}
1527 \ifempty\mmlintervalfrom \else
1528 \def\mmlsumprodlower{\normalsubscript{\xmldoif{#1}{mml:bvar}{\xmlfirst{#1}{mml:bvar}{=}}\mmlintervalfrom}}
1529 \fi
1530 \ifempty\mmlintervalto \else
1531 \def\mmlsumprodupper{\normalsuperscript{\mmlintervalto}}
1532 \fi
1533 }
1534 \MMLcreset
1535 \xmlval{mml:sumprod}{\mmlsumprodname}{}\doMMLlimits\mmlsumprodname\mmlsumprodupper\mmlsumprodlower
1536 \MMLcreset
1537 \xmldoifelse {#1} {mml:lambdamml:apply} {
1538 \xmlfirst{#1}{mml:lambdamml:apply}
1539 } {
1540 \xmlfirst{#1}{(mml:apply\stringmml:lambda\stringmml:ci)}
1541 }
1542 \endgroup
1543\stopxmlsetups
1544
1545\setupMMLappearance[limit][\c!location=\v!top]
1546
1547\startxmlsetups mml:limit
1548 \MMLcreset \lim
1549 \doMMLlimits {limit}\normalsubscript{
1550 \MMLcreset
1551 \xmldoifelse {#1} {mml:condition} {
1552 \xmlfirst{#1}{mml:condition}
1553 } {
1554 \xmldoif {#1} {mml:bvar} {
1555 \xmlfirst{#1}{mml:bvar}\rightarrow
1556 }
1557 \xmlfirst{#1}{mml:lowlimit}
1558 }
1559 }
1560 \begingroup
1561
1562 \MMLcreset
1563 \xmlfirst{#1}{mml:lambdamml:apply}
1564 \xmlfirst{#1}{(mml:apply\stringmml:lambda)}
1565 \endgroup
1566\stopxmlsetups
1567
1568
1569
1570\startxmlsetups mml:tendsto
1571 \MMLcreset \mmlsecond{#1}
1572 \xmlval {mml:tendsto:type} {\xmlattdef{#1}{type}{default}} {\rightarrow}
1573 \MMLcreset \mmlthird{#1}
1574\stopxmlsetups
1575
1576\xmlmapvalue {mml:tendsto:type} {above} {\downarrow}
1577\xmlmapvalue {mml:tendsto:type} {below} {\uparrow}
1578\xmlmapvalue {mml:tendsto:type} {default} {\rightarrow}
1579
1580
1581
1582\setupMMLappearance[log][\c!location=\v!right]
1583
1584\startxmlsetups mml:exp
1585
1586 {\mr e}\normalsuperscript{\xmlfirst{#1}{!mml:exp}}
1587\stopxmlsetups
1588
1589\startxmlsetups mml:log
1590 \xmldoifelse {#1} {mml:logbase} {
1591 \doifelse \MMLloglocation \v!left {
1592 \mathop {
1593 {}\normalsuperscript{\xmlfirst{#1}{mml:logbase}}\negthinspace\mathopnolimits{log}
1594 }
1595 } {
1596 \mathopnolimits{log}\normalsubscript{\xmlfirst{#1}{mml:logbase}}
1597 }
1598
1599 \xmlfirst{#1}{(mml:apply\stringmml:reln\stringmml:ci\stringmml:cn)}
1600
1601
1602 } {
1603 \mathopnolimits{log}
1604
1605
1606 \xmlfirst{#1}{(mml:apply\stringmml:reln\stringmml:ci\stringmml:cn)}
1607
1608 }
1609\stopxmlsetups
1610
1611\startxmlsetups mml:ln
1612 \mathopnolimits{ln}
1613 \xmlsetup{#1}{mml:function}
1614\stopxmlsetups
1615
1616
1617
1618\startxmlsetups mml:mean \overline {\mmlsecond{#1}} \stopxmlsetups
1619\startxmlsetups mml:sdev \sigma \left(\MMLcreset\mmlsecond{#1}\right) \stopxmlsetups
1620\startxmlsetups mml:variance \sigma \left(\MMLcreset\mmlsecond{#1}\right)\normalsuperscript2 \stopxmlsetups
1621\startxmlsetups mml:median \mathopnolimits{median}\left(\MMLcreset\mmlsecond{#1}\right) \stopxmlsetups
1622\startxmlsetups mml:mode \mathopnolimits{mode} \left(\MMLcreset\mmlsecond{#1}\right) \stopxmlsetups
1623
1624
1625
1626\startxmlsetups mml:moment
1627 \left\langle
1628 \xmlfirst{#1}{(mml:apply\stringmml:reln\stringmml:ci\stringmml:cn)}\normalsuperscript{\xmlfirst{#1}{mml:degree}}
1629 \right\rangle
1630 \xmldoif {#1} {mml:momentabout} {
1631 \normalsubscript{\xmlfirst{#1}{mml:momentabout}}
1632 }
1633\stopxmlsetups
1634
1635
1636
1637\setupMMLappearance [vector] [\c!direction=\v!horizontal,\c!separator={,}]
1638
1639\startxmlsetups mml:vector
1640 \begingroup
1641 \ifnum\xmlcount{#1}{*}>\plusone
1642 \doifelse\MMLvectordirection\v!horizontal {
1643 \left(\xmlconcat{#1}{*}{\MMLseparator\MMLvectorseparator}\right)
1644 } {
1645 \MMLcreset\left(\plainmatrix{\xmlconcat{#1}{*}{\MMLseparator\MMLvectorseparator}}\right)
1646 }
1647 \else
1648 \overrightarrow{\charhtstrut\mmlfirst{#1}}
1649 \fi
1650 \endgroup
1651\stopxmlsetups
1652
1653\newconditional\MMCdelmatrix \MMCdelmatrix\conditionaltrue
1654
1655\startxmlsetups mml:matrix
1656 \begingroup
1657 \MMLcreset
1658 \ifconditional\MMCdelmatrix
1659 \left(\plainmatrix{\xmlcommand{#1}{mml:matrixrow}{mml:matrixrow:do}}\right)
1660 \else
1661 \MMCdelmatrix\conditionaltrue
1662 \plainmatrix{\xmlcommand{#1}{mml:matrixrow}{mml:matrixrow:do}}
1663 \fi
1664 \endgroup
1665\stopxmlsetups
1666
1667\startxmlsetups mml:matrixrow
1668 \begingroup
1669 \MMLcreset
1670 \left(\xmlsetup{#1}{mml:matrixrow:do}\right)
1671 \endgroup
1672\stopxmlsetups
1673
1674\startxmlsetups mml:matrixrow:do
1675 \xmlconcat{#1}{*}{}\crcr
1676\stopxmlsetups
1677
1678\startxmlsetups mml:determinant
1679 \begingroup
1680 \MMCdelmatrix\conditionalfalse
1681 \left\mmlsecond{#1}\right
1682 \endgroup
1683\stopxmlsetups
1684
1685\startxmlsetups mml:transpose
1686 \mmlsecond{#1}\normalsuperscript{\mathopnolimits{T}}
1687\stopxmlsetups
1688
1689\startxmlsetups mml:selector
1690 \MMLmathinner{\mmlsecond{#1}\normalsubscript{\MMLcreset\xmlconcatrange{#1}{*}{3}{}{\MMLseparator,}}}
1691\stopxmlsetups
1692
1693\startxmlsetups mml:vectorproduct \mmlsecond{#1}\times \mmlthird{#1} \stopxmlsetups
1694\startxmlsetups mml:scalarproduct \mmlsecond{#1}\cdot \mmlthird{#1} \stopxmlsetups
1695\startxmlsetups mml:outerproduct \mmlsecond{#1}\otimes\mmlthird{#1} \stopxmlsetups
1696
1697
1698
1699\setupMMLappearance[semantics][\c!state=\v!start]
1700
1701\startxmlsetups mml:semantics
1702 \doifelse\MMLsemanticsstate\v!start {
1703 \xmlall{#1}{mml:annotation}
1704 } {
1705 \xmlall{#1}{!mml:annotation}
1706 }
1707\stopxmlsetups
1708
1709\startxmlsetups mml:annotation
1710 \xmldoifelse {#1} {.[oneof(@encoding,TeX,tex,applicationxtex,TEX,ConTeXt,context,CONTEXT,ctx)]} {
1711 \xmlflushcontext{#1}
1712 } {
1713 \xmldoifelse {#1} {.[oneof(@encoding,calcmath,cm)]} {
1714 \normalexpanded{\calcmath{\xmlflush{#1}}}
1715 } {
1716 \xmldoifelse {#1} {.[oneof(@encoding,asciimath,am)]} {
1717 \ifdefined\asciimath
1718 \normalexpanded{\asciimath{\xmlflushpure{#1}}}
1719 \else
1720 \hbox{\tt no am loaded}
1721 \fi
1722 } {
1723 \xmlall{#1}{..!mml:annotation}
1724 }
1725 }
1726 }
1727\stopxmlsetups
1728
1729\startxmlsetups mml:annotationxml
1730
1731\stopxmlsetups
1732
1733
1734
1735\startxmlsetups mml:integers \integers \stopxmlsetups
1736\startxmlsetups mml:reals \reals \stopxmlsetups
1737\startxmlsetups mml:rationals \rationals \stopxmlsetups
1738\startxmlsetups mml:naturalnumbers \naturalnumbers \stopxmlsetups
1739\startxmlsetups mml:complexes \complexes \stopxmlsetups
1740\startxmlsetups mml:primes \primes \stopxmlsetups
1741\startxmlsetups mml:exponentiale \ee \stopxmlsetups
1742\startxmlsetups mml:imaginaryi \ii \stopxmlsetups
1743\startxmlsetups mml:notanumber \mathopnolimits{NaN} \stopxmlsetups
1744\startxmlsetups mml:true \mathopnolimits{true} \stopxmlsetups
1745\startxmlsetups mml:false \mathopnolimits{false} \stopxmlsetups
1746\startxmlsetups mml:emptyset \mathopnolimits{Ø} \stopxmlsetups
1747\startxmlsetups mml:pi \pi \stopxmlsetups
1748\startxmlsetups mml:eulergamma \gamma \stopxmlsetups
1749\startxmlsetups mml:infinity \infty \stopxmlsetups
1750
1751
1752
1753\setupMMLappearance[function][\c!reduction=\v!yes]
1754
1755
1756
1757
1758
1759\startxmlsetups mml:sin \mathcommand {sin}\xmlsetup{#1}{mml:function} \stopxmlsetups
1760\startxmlsetups mml:sinh \mathcommand {sinh}\xmlsetup{#1}{mml:function} \stopxmlsetups
1761\startxmlsetups mml:cos \mathcommand {cos}\xmlsetup{#1}{mml:function} \stopxmlsetups
1762\startxmlsetups mml:cosh \mathcommand {cosh}\xmlsetup{#1}{mml:function} \stopxmlsetups
1763\startxmlsetups mml:tan \mathcommand {tan}\xmlsetup{#1}{mml:function} \stopxmlsetups
1764\startxmlsetups mml:tanh \mathcommand {tanh}\xmlsetup{#1}{mml:function} \stopxmlsetups
1765\startxmlsetups mml:cot \mathcommand {cot}\xmlsetup{#1}{mml:function} \stopxmlsetups
1766\startxmlsetups mml:coth \mathcommand {coth}\xmlsetup{#1}{mml:function} \stopxmlsetups
1767\startxmlsetups mml:csc \mathcommand {csc}\xmlsetup{#1}{mml:function} \stopxmlsetups
1768\startxmlsetups mml:csch \mathcommand {csch}\xmlsetup{#1}{mml:function} \stopxmlsetups
1769\startxmlsetups mml:sec \mathcommand {sec}\xmlsetup{#1}{mml:function} \stopxmlsetups
1770\startxmlsetups mml:sech \mathcommand {sech}\xmlsetup{#1}{mml:function} \stopxmlsetups
1771
1772\startxmlsetups mml:arcsin \mathcommand {arcsin}\xmlsetup{#1}{mml:function} \stopxmlsetups
1773\startxmlsetups mml:arcsinh \mathcommand{arcsinh}\xmlsetup{#1}{mml:function} \stopxmlsetups
1774\startxmlsetups mml:arccos \mathcommand {arccos}\xmlsetup{#1}{mml:function} \stopxmlsetups
1775\startxmlsetups mml:arccosh \mathcommand{arccosh}\xmlsetup{#1}{mml:function} \stopxmlsetups
1776\startxmlsetups mml:arctan \mathcommand {arctan}\xmlsetup{#1}{mml:function} \stopxmlsetups
1777\startxmlsetups mml:arctanh \mathcommand{arctanh}\xmlsetup{#1}{mml:function} \stopxmlsetups
1778\startxmlsetups mml:arccot \mathcommand {arccot}\xmlsetup{#1}{mml:function} \stopxmlsetups
1779\startxmlsetups mml:arccoth \mathcommand{arccoth}\xmlsetup{#1}{mml:function} \stopxmlsetups
1780\startxmlsetups mml:arccsc \mathcommand {arccsc}\xmlsetup{#1}{mml:function} \stopxmlsetups
1781\startxmlsetups mml:arccsch \mathcommand{arccsch}\xmlsetup{#1}{mml:function} \stopxmlsetups
1782\startxmlsetups mml:arcsec \mathcommand {arcsec}\xmlsetup{#1}{mml:function} \stopxmlsetups
1783\startxmlsetups mml:arcsech \mathcommand{arcsech}\xmlsetup{#1}{mml:function} \stopxmlsetups
1784
1785\startxmlsetups mml:function
1786 \ifempty\MMLpowerelement
1787 \ifconditional\xmlinversefunction\normalsuperscript{1}\fi
1788 \xmlinversefunction\conditionalfalse
1789 \else
1790 \normalsuperscript{\ifconditional\xmlinversefunction\fi\MMLpowerelement}
1791 \xmlinversefunction\conditionalfalse
1792 \glettonothing\MMLpowerelement
1793 \fi
1794 \xmlsetup{#1}{mml:function:argument}
1795\stopxmlsetups
1796
1797\startxmlsetups mml:function:argument
1798 \doifelse \MMLfunctionreduction \v!yes {
1799 \xmldoifelse {#1} {mml:apply} {
1800 \xmldoifelse {#1} {mml:apply(\MMLcfunctionlist\stringmml:divide)}
1801 \donefalse
1802 \donetrue
1803 } {
1804 \donefalse
1805 }
1806 } {
1807 \donetrue
1808 }
1809
1810 \ifdone
1811 \left(
1812 \MMLcreset
1813 \xmlall{#1}{[position()>1]}
1814 \right)
1815 \else
1816 \MMLcreset
1817 \xmlall{#1}{[position()>1]}
1818 \fi
1819\stopxmlsetups
1820
1821
1822
1823
1824
1825\xmlmapvalue {mml:s} {normal} {\mathupright}
1826\xmlmapvalue {mml:s} {doublestruck} {\mathblackboard}
1827\xmlmapvalue {mml:s} {italic} {\mathit}
1828\xmlmapvalue {mml:s} {fraktur} {\mathfraktur}
1829\xmlmapvalue {mml:s} {script} {\mathscript}
1830\xmlmapvalue {mml:s} {bold} {\mb}
1831\xmlmapvalue {mml:s} {bolditalic} {\mathbi}
1832\xmlmapvalue {mml:s} {boldfraktur} {\mathfraktur\mathbf}
1833\xmlmapvalue {mml:s} {boldscript} {\mathscript\mathbf}
1834\xmlmapvalue {mml:s} {sansserif} {\mathss}
1835\xmlmapvalue {mml:s} {boldsansserif} {\mathss\mathbf}
1836\xmlmapvalue {mml:s} {sansserifitalic} {\mathss\mathit}
1837\xmlmapvalue {mml:s} {sansserifbolditalic} {\mathss\mathbi}
1838\xmlmapvalue {mml:s} {monospace} {\mathtt}
1839
1840\xmlmapvalue {mml:l} {} {\let\mmlfrac\tfrac}
1841 \let\mmlfrac\frac
1842\xmlmapvalue {mml:l} {} {\let\mmlfrac\sfrac}
1843
1844\xmlmapvalue {mml:d} {true} {\displaystyle}
1845\xmlmapvalue {mml:d} {false} {\textstyle}
1846
1847\starttexdefinition setmmlmathstyle #1
1848 \ifxmlattempty{#1}{displaystyle}\else
1849 \xmlval{mml:d}\xmllastatt\empty
1850 \fi
1851 \ifxmlattempty{#1}{mathvariant}\else
1852 \xmlval{mml:s}\xmllastatt\empty
1853 \fi
1854\stoptexdefinition
1855
1856\starttexdefinition setmmlscriptlevel #1
1857 \ifxmlattempty{#1}{scriptlevel}
1858 \let\mmlfrac\frac
1859 \else
1860 \xmlval{mml:l}\xmllastatt{\let\mmlfrac\frac}
1861 \fi
1862\stoptexdefinition
1863
1864\starttexdefinition setmmlmathcolor #1
1865 \ifxmlattempty{#1}{mathcolor}\else
1866 \directcolor[\xmllastatt]
1867 \fi
1868\stoptexdefinition
1869
1870\starttexdefinition setmmlmathproperties #1
1871
1872 \ifxmlattempty{#1}{displaystyle}\else
1873 \xmlval{mml:d}\xmllastatt\empty
1874 \fi
1875 \ifxmlattempty{#1}{mathvariant}\else
1876 \xmlval{mml:s}\xmllastatt\empty
1877 \fi
1878 \ifxmlattempty{#1}{scriptlevel}
1879 \let\mmlfrac\frac
1880 \else
1881 \xmlval{mml:l}\xmllastatt{\let\mmlfrac\frac}
1882 \fi
1883 \ifxmlattempty{#1}{mathcolor}\else
1884 \directcolor[\xmllastatt]
1885 \fi
1886\stoptexdefinition
1887
1888
1889
1890\starttexdefinition applymmlmathbackground #1#2
1891 \ifxmlattempty{#1}{mathbackground}
1892 #2
1893 \else
1894 \backgroundline[\xmllastatt]{#2}
1895 \fi
1896\stoptexdefinition
1897
1898\starttexdefinition applymmlsometext #1#2
1899 \begingroup
1900 \applymmlmathbackground {#1} {
1901 \setmmlmathcolor {#1}
1902 \setmmlmathstyle {#1}
1903 #2
1904 }
1905 \endgroup
1906\stoptexdefinition
1907
1908
1909
1910\startxmlsetups mml:mi
1911 \begingroup
1912 \pushmathstyle
1913 \setmmlmathproperties{#1}
1914 \mathml_mi{#1}
1915 \popmathstyle
1916 \endgroup
1917\stopxmlsetups
1918
1919\startxmlsetups mml:mn
1920 \begingroup
1921 \setmmlmathcolor{#1}
1922 \mathml_mn{#1}
1923 \endgroup
1924\stopxmlsetups
1925
1926
1927
1928
1929
1930\startxmlsetups mml:mo
1931 \begingroup
1932 \setmmlmathcolor{#1}
1933 \ifxmlatt{#1}{maxsize}{1}
1934 \mmlignoredelimiter\conditionaltrue
1935 \orelse\ifxmlatt{#1}{stretchy}{false}
1936 \mmlignoredelimiter\conditionaltrue
1937 \fi
1938 \ifxmlattempty{#1}{lspace}\else
1939 \hskip\xmllastatt\relax
1940 \fi
1941 \mathml_mo{#1}
1942 \ifxmlattempty{#1}{rspace}\else
1943 \hskip\xmllastatt\relax
1944 \fi
1945 \endgroup
1946\stopxmlsetups
1947
1948\startxmlsetups mml:mfenced
1949 \mathml_mfenced{#1}
1950\stopxmlsetups
1951
1952\defineoverlay [mml:enclose:box] [\useMPgraphic{mml:enclose:box}]
1953\defineoverlay [mml:enclose:roundedbox] [\useMPgraphic{mml:enclose:roundedbox}]
1954\defineoverlay [mml:enclose:circle] [\useMPgraphic{mml:enclose:circle}]
1955\defineoverlay [mml:enclose:left] [\useMPgraphic{mml:enclose:left}]
1956\defineoverlay [mml:enclose:right] [\useMPgraphic{mml:enclose:right}]
1957\defineoverlay [mml:enclose:top] [\useMPgraphic{mml:enclose:top}]
1958\defineoverlay [mml:enclose:bottom] [\useMPgraphic{mml:enclose:bottom}]
1959\defineoverlay [mml:enclose:updiagonalstrike] [\useMPgraphic{mml:enclose:updiagonalstrike}]
1960\defineoverlay [mml:enclose:downdiagonalstrike] [\useMPgraphic{mml:enclose:downdiagonalstrike}]
1961\defineoverlay [mml:enclose:horizontalstrike] [\useMPgraphic{mml:enclose:horizontalstrike}]
1962\defineoverlay [mml:enclose:verticalstrike] [\useMPgraphic{mml:enclose:verticalstrike}]
1963
1964\startuseMPgraphic{mml:enclose:box}
1965 draw OverlayBox withpen pencircle scaled (ExHeight10) ;
1966\stopuseMPgraphic
1967\startuseMPgraphic{mml:enclose:roundedbox}
1968 draw OverlayBox cornered .5ExHeight withpen pencircle scaled (ExHeight10) ;
1969\stopuseMPgraphic
1970\startuseMPgraphic{mml:enclose:circle}
1971 draw fullcircle xysized(bbwidth(OverlayBox),bbheight(OverlayBox)) withpen pencircle scaled (ExHeight10) ;
1972\stopuseMPgraphic
1973\startuseMPgraphic{mml:enclose:left}
1974 draw leftboundary OverlayBox withpen pencircle scaled (ExHeight10) ;
1975 setbounds currentpicture to OverlayBox ;
1976\stopuseMPgraphic
1977\startuseMPgraphic{mml:enclose:right}
1978 draw rightboundary OverlayBox withpen pencircle scaled (ExHeight10) ;
1979 setbounds currentpicture to OverlayBox ;
1980\stopuseMPgraphic
1981\startuseMPgraphic{mml:enclose:top}
1982 draw topboundary OverlayBox withpen pencircle scaled (ExHeight10) ;
1983 setbounds currentpicture to OverlayBox ;
1984\stopuseMPgraphic
1985\startuseMPgraphic{mml:enclose:bottom}
1986 draw bottomboundary OverlayBox withpen pencircle scaled (ExHeight10) ;
1987 setbounds currentpicture to OverlayBox ;
1988\stopuseMPgraphic
1989\startuseMPgraphic{mml:enclose:updiagonalstrike}
1990 path p ; p := OverlayBox enlarged -.25ExHeight ;
1991 draw llcorner p -- urcorner p withpen pencircle scaled (ExHeight10) ;
1992 setbounds currentpicture to OverlayBox ;
1993\stopuseMPgraphic
1994\startuseMPgraphic{mml:enclose:downdiagonalstrike}
1995 path p ; p := OverlayBox enlarged -.25ExHeight ;
1996 draw ulcorner p -- lrcorner p withpen pencircle scaled (ExHeight10) ;
1997 setbounds currentpicture to OverlayBox ;
1998\stopuseMPgraphic
1999\startuseMPgraphic{mml:enclose:horizontalstrike}
2000 path p ; p := OverlayBox enlarged -.25ExHeight ;
2001 draw .5[llcorner p,ulcorner p] -- .5[lrcorner p,urcorner p] withpen pencircle scaled (ExHeight10) ;
2002 setbounds currentpicture to OverlayBox ;
2003\stopuseMPgraphic
2004\startuseMPgraphic{mml:enclose:verticalstrike}
2005 path p ; p := OverlayBox enlarged -.25ExHeight ;
2006 draw .5[llcorner p,lrcorner p] -- .5[ulcorner p,urcorner p] withpen pencircle scaled (ExHeight10) ;
2007 setbounds currentpicture to OverlayBox ;
2008\stopuseMPgraphic
2009
2010\startxmlsetups mml:menclose
2011 \edef\mmlmenclosenotation{\mathml_menclosepattern{#1}}
2012 \ifempty\mmlmenclosenotation
2013 \xmlflush{#1}
2014 \else
2015 \doifelse \mmlmenclosenotation {mml:enclose:longdiv} {
2016 \overline{\left)\strut\xmlflush{#1}\right.}
2017 } {
2018 \doifelse \mmlmenclosenotation {mml:enclose:actuarial} {
2019 \overline{\left.\strut\xmlflush{#1}\right\vert}
2020 } {
2021 \doifelse \mmlmenclosenotation {mml:enclose:radical} {
2022 \sqrt{\xmlflush{#1}}
2023 } {
2024
2025 \vcenter {
2026 \framed
2027 [frame=off,strut=no,background={\mmlmenclosenotation}]
2028 {
2029 \startpickupmath
2030 \normalexpanded{\doifelseinset {mml:enclose:longdiv} {\mmlmenclosenotation}} {
2031 \overline{\left)\strut\xmlflush{#1}\right.}
2032 } {
2033 \normalexpanded{\doifelseinset {mml:enclose:actuarial} {\mmlmenclosenotation}} {
2034 \overline{\left.\strut\xmlflush{#1}\right\vert}
2035 } {
2036 \normalexpanded{\doifelseinset {mml:enclose:radical} {\mmlmenclosenotation}} {
2037 \sqrt{\xmlflush{#1}}
2038 } {
2039 \normalexpanded{\doifelseinset {mml:enclose:rule} {\mmlmenclosenotation}} {
2040 \overline{\strut\xmlflush{#1}}
2041 } {
2042 \xmlflush{#1}
2043 }
2044 }
2045 }
2046 }
2047 \stoppickupmath
2048 }
2049 }
2050 }
2051 }
2052 }
2053 \fi
2054\stopxmlsetups
2055
2056\xmlmapvalue {mml:mfrac:linethickness} {thin} {.2pt}
2057\xmlmapvalue {mml:mfrac:linethickness} {medium} {.4pt}
2058\xmlmapvalue {mml:mfrac:linethickness} {thick} {.8pt}
2059\xmlmapvalue {mml:mfrac:linethickness} {0} {0pt}
2060
2061\startxmlsetups mml:mfrac
2062 \begingroup
2063 \edef\mmlfraclinethickness{\xmlatt{#1}{linethickness}}
2064 \ifempty\mmlfraclinethickness
2065 \doifelse{\xmlatt{#1}{bevelled}}{true} {
2066 \left.\mmlfirst{#1}\middle\mmlsecond{#1}\right.
2067 } {
2068 \mmlfrac{\mmlfirst{#1}}{\mmlsecond{#1}}
2069 }
2070 \else
2071 \doifelse {\xmlval{mml:mfrac:linethickness}{\mmlfraclinethickness}{}} {} {
2072 \scratchdimen\xmlval{mml:mfrac:linethickness}\mmlfraclinethickness{.4pt}
2073 } {
2074
2075 \setdimensionwithunit\scratchdimen\mmlfraclinethickness{pt}
2076 }
2077
2078 \Uabove\scratchdimen{\mmlfirst{#1}}{\mmlsecond{#1}}
2079
2080 \fi
2081 \endgroup
2082\stopxmlsetups
2083
2084\startxmlsetups mml:ms
2085 \hbox {
2086 \tf
2087 \ifxmlattempty{#1}{lquote}\symbol[leftquotation]\else\xmllastatt\fi
2088 \applymmlsometext{#1}{\xmlflush{#1}}
2089 \ifxmlattempty{#1}{rquote}\symbol[rightquotation]\else\xmllastatt\fi
2090 }
2091\stopxmlsetups
2092
2093\startxmlsetups mml:mstyle
2094 \begingroup
2095 \pushmathstyle
2096 \setmmlmathstyle{#1}
2097 \setmmlscriptlevel{#1}
2098 \xmlflush{#1}
2099 \popmathstyle
2100 \endgroup
2101\stopxmlsetups
2102
2103\setupMMLappearance[text][\c!alternative=\v!b]
2104
2105\startxmlsetups mml:mtext
2106 \text {
2107 \applymmlsometext{#1}{
2108 \ifcstok{\MMLtextalternative}\v!a
2109 \ignorespaces
2110 \xmlflush{#1}
2111 \removeunwantedspaces
2112 \else
2113 \xmlflush{#1}
2114 \fi
2115 }
2116 }
2117\stopxmlsetups
2118
2119\startxmlsetups mml:merror
2120 \hbox{\startimath\displaystyle\xmlflush{#1}\stopimath}
2121\stopxmlsetups
2122
2123\startxmlsetups mml:mphantom
2124 \phantom{\triggermathstyle\normalmathstyle\ignorespaces\xmlflush{#1}\removeunwantedspaces}
2125\stopxmlsetups
2126
2127\startxmlsetups mml:mpadded
2128 \xmlflush{#1}
2129\stopxmlsetups
2130
2131
2132
2133\startxmlsetups mml:maction
2134 \xmlflush{#1}
2135\stopxmlsetups
2136
2137\startxmlsetups mml:mrow
2138 \begingroup
2139 \xmlflush{#1}
2140 \endgroup
2141\stopxmlsetups
2142
2143\startxmlsetups mml:msqrt
2144 \sqrt{\xmlflush{#1}}
2145\stopxmlsetups
2146
2147\startxmlsetups mml:mroot
2148 \root[{\mmlsecond{#1}}]{\mmlfirst{#1}}
2149\stopxmlsetups
2150
2151\setupMMLappearance[scripts][\c!alternative=\v!a]
2152
2153
2154
2155
2156\let\mmlnucleus\relax
2157
2158
2159
2160
2161
2162\startxmlsetups mml:msub
2163 \iftok{\utfmathclass{\xmlraw{#1}{mml:*[1]}}}{limop}
2164 \mmlfirst{#1}
2165 \normalsubscript{\mmlsecond{#1}}
2166 \orelse\ifcstok{\MMLscriptsalternative}\v!a
2167 {\mmlfirst{#1}}
2168 \normalsubscript{\mmlsecond{#1}}
2169 \else
2170 \mmlfirst{#1}
2171 \normalsubscript{\mmlsecond{#1}}
2172 \fi
2173\stopxmlsetups
2174
2175\startxmlsetups mml:msup
2176 \iftok{\utfmathclass{\xmlraw{#1}{mml:*[1]}}}{limop}
2177 \mmlfirst{#1}
2178 \normalsuperscript{\mmlsecond{#1}}
2179 \orelse\ifcstok{\MMLscriptsalternative}\v!a
2180 {\mmlfirst{#1}}
2181 \normalsuperscript{\mmlsecond{#1}}
2182 \else
2183 \mmlfirst{#1}
2184 \normalsuperscript{\mmlsecond{#1}}
2185 \fi
2186\stopxmlsetups
2187
2188
2189
2190\startxmlsetups mml:msubsup
2191 \iftok{\utfmathclass{\xmlraw{#1}{mml:*[1]}}}{limop}
2192 \mmlfirst{#1}
2193 \normalsubscript{\mmlsecond{#1}}
2194 \normalsuperscript{\mmlthird{#1}}
2195 \orelse\ifcstok{\MMLscriptsalternative}\v!a
2196 {\mmlfirst{#1}}
2197 \normalsubscript{\mmlsecond{#1}}
2198 \normalsuperscript{\mmlthird {#1}}
2199 \else
2200 \mmlfirst{#1}
2201 \normalsubscript{\mmlsecond{#1}}
2202 \normalsuperscript{\mmlthird {#1}}
2203 \fi
2204\stopxmlsetups
2205
2206
2207
2208\protected\def\mmlexecutecommand#1
2209 {\ifcsname#1\endcsname
2210 \expandafter\firstoftwoarguments
2211 \else
2212 \expandafter\secondoftwoarguments
2213 \fi
2214 \lastnamedcs}
2215
2216\let\mmlextensible\mathml_extensible
2217
2218\definemathtriplet [\v!mathematics] [mmlovertriplet]
2219\definemathtriplet [\v!mathematics] [mmlundertriplet]
2220\definemathtriplet [\v!mathematics] [mmldoubletriplet]
2221
2222
2223
2224\starttexdefinition protected mmlfencedfirst #1
2225 \xmlelement{#1}{1}
2226\stoptexdefinition
2227\starttexdefinition protected mmlfencedsecond #1
2228 \xmlelement{#1}{2}
2229\stoptexdefinition
2230\starttexdefinition protected mmlfencedthird #1
2231 \xmlelement{#1}{3}
2232\stoptexdefinition
2233
2234
2235
2236\starttexdefinition protected mmloverabove #1
2237 \mmlexecutecommand{\utfmathfiller\mmlovertoken} {\mmlfencedsecond{#1}} \relax
2238\stoptexdefinition
2239\starttexdefinition protected mmloverbase #1
2240 \mmlexecutecommand{\utfmathfiller\mmlbasetoken} {\mmlfencedfirst{#1}} \relax
2241\stoptexdefinition
2242\starttexdefinition protected mmloverbasefiller #1
2243 \mmlexecutecommand{e\utfmathcommandfiller\mmlbasetoken} \relax {\mmlfencedsecond{#1}} {}
2244\stoptexdefinition
2245\starttexdefinition protected mmloveraccent #1
2246 \mmlexecutecommand{\utfmathcommandabove\mmlovertoken} \relax {\mmlfencedfirst{#1}}
2247\stoptexdefinition
2248
2249\starttexdefinition protected mmlovertext #1
2250 \mmlovertriplet {\mmloverbase{#1}} {\mmloverabove{#1}} {}
2251\stoptexdefinition
2252\starttexdefinition protected mmloveraccentchecker #1
2253 \edef\mmlovertoken{\mmlextensible{\xmlraw{#1}{mml:*[2]}}}
2254 \doifelseutfmathabove\mmlovertoken \mmloveraccent \mmlovertext {#1}
2255\stoptexdefinition
2256
2257\startxmlsetups mml:mover
2258 \edef\mmlbasetoken{\mmlextensible{\xmlraw{#1}{mml:*[1]}}}
2259 \doifelseutfmathlimop\mmlbasetoken
2260 {\mmllimopover{#1}}
2261 {\doifelseutfmathfiller\mmlbasetoken \mmloverbasefiller \mmloveraccentchecker {#1}}
2262\stopxmlsetups
2263
2264\starttexdefinition mmllimopover #1
2265 \remapmathoperator{\mmlbasetoken}\normalsuperscript{\mmlfencedsecond{#1}}
2266\stoptexdefinition
2267
2268
2269
2270\starttexdefinition protected mmlunderbelow #1
2271 \mmlexecutecommand{\utfmathfiller\mmlundertoken} {\mmlfencedsecond{#1}} \relax
2272\stoptexdefinition
2273\starttexdefinition protected mmlunderbase #1
2274 \mmlexecutecommand{\utfmathfiller\mmlbasetoken} {\mmlfencedfirst{#1}} \relax
2275\stoptexdefinition
2276\starttexdefinition protected mmlunderbasefiller #1
2277 \mmlexecutecommand{e\utfmathcommandfiller\mmlbasetoken} \relax {} {\mmlfencedsecond{#1}}
2278\stoptexdefinition
2279\starttexdefinition protected mmlunderaccent #1
2280 \mmlexecutecommand{\utfmathcommandbelow\mmlundertoken} \relax {\mmlfencedfirst{#1}}
2281\stoptexdefinition
2282
2283\starttexdefinition protected mmlundertext #1
2284 \mmlundertriplet {\mmlunderbase{#1}} {} {\mmlunderbelow{#1}}
2285\stoptexdefinition
2286\starttexdefinition protected mmlunderaccentchecker #1
2287 \edef\mmlundertoken{\mmlextensible{\xmlraw{#1}{mml:*[2]}}}
2288 \doifelseutfmathbelow\mmlundertoken \mmlunderaccent \mmlundertext {#1}
2289\stoptexdefinition
2290
2291\startxmlsetups mml:munder
2292 \edef\mmlbasetoken{\mmlextensible{\xmlraw{#1}{mml:*[1]}}}
2293 \doifelseutfmathlimop\mmlbasetoken
2294 {\mmllimopunder{#1}}
2295 {\doifelseutfmathfiller\mmlbasetoken \mmlunderbasefiller \mmlunderaccentchecker {#1}}
2296\stopxmlsetups
2297
2298\starttexdefinition mmllimopunder #1
2299 \remapmathoperator{\mmlbasetoken}\normalsubscript{\mmlfencedsecond{#1}}
2300\stoptexdefinition
2301
2302
2303
2304\starttexdefinition protected mmlunderoveraccentcheckerUO #1
2305 \edef\mmlundercommand{\utfmathcommandbelow\mmlundertoken}
2306 \edef\mmlovercommand {\utfmathcommandabove\mmlovertoken}
2307 \edef\mmlbasecommand {\mmlovercommand\mmlundercommand}
2308 \ifcsname\mmlbasecommand\endcsname
2309 \lastnamedcs {\mmlfencedfirst{#1}}
2310 \orelse\ifcsname\mmlundercommand\endcsname
2311 \ifcsname\mmlovercommand\endcsname
2312 \lastnamedcs {\csname\mmlundercommand\endcsname{\mmlfencedfirst{#1}}}
2313 \else
2314 \mmldoubletriplet {\csname\mmlundercommand\endcsname{\mmlfencedfirst{#1}}} {\mmlfencedthird{#1}\mmlfencedthird{#1}} {}
2315 \fi
2316 \orelse\ifcsname\mmlovercommand\endcsname
2317 \mmldoubletriplet {\csname\mmlovercommand\endcsname{\mmlfencedfirst{#1}}} {} {\mmlfencedsecond{#1}}
2318 \else
2319 \mmlunderoveraccentcheckerTT {#1}
2320 \fi
2321\stoptexdefinition
2322\starttexdefinition protected mmlunderoveraccentcheckerUT #1
2323 \edef\mmlundercommand{\utfmathcommandbelow\mmlundertoken}
2324 \edef\mmlbasecommand {\mmlundercommand text}
2325 \ifcsname\mmlbasecommand\endcsname
2326 \lastnamedcs {\mmlfencedfirst{#1}} {\mmlfencedthird{#1}}
2327 \orelse\ifcsname\mmlundercommand\endcsname
2328 \mmldoubletriplet {\csname\mmlundercommand\endcsname{\mmlfencedfirst{#1}}} {\mmlfencedthird{#1}} {}
2329 \else
2330 \mmlunderoveraccentcheckerTT {#1}
2331 \fi
2332\stoptexdefinition
2333\starttexdefinition protected mmlunderoveraccentcheckerOT #1
2334 \edef\mmlovercommand{\utfmathcommandabove\mmlovertoken}
2335 \edef\mmlbasecommand{\mmlovercommand text}
2336 \ifcsname\mmlbasecommand\endcsname
2337 \lastnamedcs {\mmlfencedfirst{#1}} {\mmlfencedsecond{#1}}
2338 \orelse\ifcsname\mmlovercommand\endcsname
2339 \mmldoubletriplet {\csname\mmlovercommand\endcsname{\mmlfencedfirst{#1}}} {} {\mmlfencedsecond{#1}}
2340 \else
2341 \mmlunderoveraccentcheckerTT {#1}
2342 \fi
2343\stoptexdefinition
2344\starttexdefinition protected mmlunderoveraccentcheckerTT #1
2345 \mmldoubletriplet {\mmlfencedfirst{#1}} {\mmlfencedthird{#1}} {\mmlfencedsecond{#1}} \relax
2346\stoptexdefinition
2347\starttexdefinition protected mmlunderoveraccentchecker #1
2348 \edef\mmlundertoken{\mmlextensible{\xmlraw{#1}{mml:*[2]}}}
2349 \edef\mmlovertoken {\mmlextensible{\xmlraw{#1}{mml:*[3]}}}
2350 \doifelseutfmathbelow\mmlundertoken {
2351 \doifelseutfmathabove\mmlovertoken \mmlunderoveraccentcheckerUO \mmlunderoveraccentcheckerUT {#1}
2352 } {
2353 \doifelseutfmathabove\mmlovertoken \mmlunderoveraccentcheckerOT \mmlunderoveraccentcheckerTT {#1}
2354 }
2355\stoptexdefinition
2356
2357\starttexdefinition protected mmlunderoverbasefiller #1
2358 \mmlexecutecommand{e\utfmathcommandfiller\mmlbasetoken} \relax {\mmlfencedthird{#1}} {\mmlfencedsecond{#1}}
2359\stoptexdefinition
2360
2361\startxmlsetups mml:munderover
2362 \edef\mmlbasetoken{\mmlextensible{\xmlraw{#1}{mml:*[1]}}}
2363 \doifelseutfmathlimop\mmlbasetoken
2364 {\mmllimopunderover{#1}}
2365 {\doifelseutfmathfiller\mmlbasetoken \mmlunderoverbasefiller \mmlunderoveraccentchecker {#1}}
2366\stopxmlsetups
2367
2368\starttexdefinition mmllimopunderover #1
2369 \remapmathoperator{\mmlbasetoken}\normalsuperscript{\mmlfencedthird{#1}}\normalsubscript{\mmlfencedsecond{#1}}
2370\stoptexdefinition
2371
2372
2373
2374\startxmlsetups mml:mtable
2375 \vcenter {
2376 \hbox {
2377 \mathml_mtable{#1}
2378 }
2379 }
2380\stopxmlsetups
2381
2382\startxmlsetups mml:mcolumn
2383 \vbox{\mathml_mcolumn{#1}}
2384\stopxmlsetups
2385
2386\def\mmlsetfakewidth#1{\setbox\scratchbox\hbox{#1}\scratchdimen\wd\scratchbox}
2387
2388\def\mmlmcolumndigitspace {\mmlsetfakewidth {0}\kern\scratchdimen}
2389\def\mmlmcolumndigitrule {\mmlsetfakewidth {0}\vrule \s!width \scratchdimen \s!height .2\points \s!depth .2\points\relax}
2390\def\mmlmcolumnsymbolrule {\mmlsetfakewidth{\times}\vrule \s!width \scratchdimen \s!height .2\points \s!depth .2\points\relax}
2391\def\mmlmcolumnpunctuationrule{\mmlsetfakewidth {.}\vrule \s!width \scratchdimen \s!height .2\points \s!depth .2\points\relax}
2392
2393\setupMMLappearance[mspace][\c!option=]
2394
2395\startxmlsetups mml:mspace
2396 \begingroup
2397 \edef\mmlspacetext{\xmlatt{#1}{spacing}}
2398 \ifempty\mmlspacetext
2399 \scratchwidth \xmlattdef{#1}{width} \!!zeropoint
2400 \scratchheight\xmlattdef{#1}{height}\!!zeropoint
2401 \scratchdepth \xmlattdef{#1}{depth} \!!zeropoint
2402 \ifzeropt\scratchheight
2403 \ifzeropt\scratchdepth\else
2404 \novrule\s!depth\scratchdepth\s!height\zeropoint\s!width\zeropoint
2405 \fi
2406 \else
2407 \novrule\s!depth\zeropoint\s!height\scratchheight\s!width\zeropoint
2408 \fi
2409 \ifzeropt\scratchwidth
2410
2411 \orelse\ifx\MMLmspaceoption\v!test
2412 \hbox to \scratchwidth{\showstruts\strut\hss\lower2\exheight\hbox{\infofont\xmlattdef{#1}{width}}\hss\strut}
2413 \else
2414 \hskip\scratchwidth
2415 \fi
2416 \orelse\ifx\MMLmspaceoption\v!test
2417 \hbox{\showstruts\strut\phantom{\triggermathstyle\normalmathstyle\mmlspacetext}\strut}
2418 \else
2419 \phantom{\triggermathstyle\normalmathstyle\mmlspacetext}
2420 \fi
2421 \endgroup
2422\stopxmlsetups
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450\startxmlsetups mml:mglyph
2451 \begingroup
2452 \edef\mmlglyphfontfamily{\xmlatt {#1}{fontfamily}}
2453 \edef\mmlglyphalt {\xmlattdef{#1}{alt}{unknown}}
2454 \edef\mmlglyphindex {\xmlatt {#1}{index}}
2455 \ifempty\mmlglyphfontfamily
2456 \hbox{\tttf[no fontfamily specified for \mmlglyphalt]}
2457 \orelse\ifempty\mmlglyphindex
2458 \hbox{\tttf[no index specified for \mmlglyphalt]}
2459 \else
2460 \hbox{\getglyph\mmlglyphfontfamily\mmlglyphindex}
2461 \fi
2462 \endgroup
2463\stopxmlsetups
2464
2465\startxmlsetups mml:maligngroup \stopxmlsetups
2466\startxmlsetups mml:malignmark \stopxmlsetups
2467
2468\startxmlsetups mml:none \stopxmlsetups
2469\startxmlsetups mml:mprescripts \stopxmlsetups
2470
2471\startxmlsetups mml:mmultiscripts
2472 \mathml_mmultiscripts{#1}
2473\stopxmlsetups
2474
2475
2476
2477\definebuffer[mml]
2478
2479\permanent\protected\def\stopmml{\xmlprocessbuffer{@mml@}{\thedefinedbuffer{mml}}{}}
2480
2481\stopmodule
2482
2483\protect \endinput
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499 |