] >
These modes provide additional mathematics constructs and their representation in p-MathML.
The p-MathML extension module pmathx.modes in the directory GLOSS/mv/pmath/
contains code for quick authoring of much standard mathematics. These look rather like
p-MathML constructs, but they are all unofficial and synthetic
, hence they live in
this module.
I'll just give examples here. See the source for how the code was generated.
Quick subscript, superscript, under, over, etc:
Quick fractions,
Quantifiers,
Constructions with fences,
Overline and underline,
Series and products,
!declare-prefix @prefix[x] @uri[http://gloss.bham.ac.uk/mv/pmath/pmathx] { !declare-prefix @prefix[m] @uri[http://gloss.bham.ac.uk/mv/pmath/pmathml] {
!mode @name[x:mrow-item] @template[m:mrow-item] @type[execute] !hook @mode[m:mrow-item] @action[execute]
Quick infix sup, sup, under, over operators, etc:
eg
!elt @fullname[$sub||sup||under||over] !infix @name[$\{m:pref\}m$q] !process-tokens @mode[m:math-object] !elt @fullname[$subsup||underover] !infix @name[$\{m:pref\}m$q] !process-tokens @mode[m:math-object] !process-tokens @mode[m:math-object]
Quick fractions eg
!elt @fullname[by] !infix @name[$\{m:pref\}mfrac] !process-tokens @mode[m:math-object]
Quantifiers.
fa !element @name[$\{m:pref\}mrow] !element @name[$\{m:pref\}mrow] !element @name[$\{m:pref\}mo] !entity-reference @name[#x02200]; !process-tokens @mode[m:math-object] !element @name[$\{m:pref\}mo] !entity-reference @name[#x000A0]; !process-tokens @mode[m:math-object] ex !element @name[$\{m:pref\}mrow] !element @name[$\{m:pref\}mrow] !element @name[$\{m:pref\}mo] !entity-reference @name[#x02203]; !process-tokens @mode[m:math-object] !element @name[$\{m:pref\}mo] !entity-reference @name[#x000A0]; !process-tokens @mode[m:math-object]
Constructions that use fences.
setl !element @name[$\{m:pref\}mfenced] !attribute @name[open][\{] !attribute @name[close][\}] !process-tokens @mode[m:mrow-content] setp !element @name[$\{m:pref\}mfenced] !attribute @name[open][\{] !attribute @name[close][\}] !element @name[$\{m:pref\}mrow] !process-tokens @mode[m:math-object] !element @name[$\{m:pref\}mo] !attribute @name[form] [infix] [:] !process-tokens @mode[m:math-object] abs !element @name[$\{m:pref\}mfenced] !attribute @name[open][|] !attribute @name[close][|] !element @name[$\{m:pref\}mrow] !process-tokens @mode[m:math-object]
Overline, underline, etc.
overline !element @name[$\{m:pref\}mover] @accent[true] !process-tokens @mode[m:math-object] !element @name[$\{m:pref\}mo] !entity-reference @name[#x000AF] ; TO DO: should this be 000AF 00304 or 00305? underline !element @name[$\{m:pref\}munder] @accent[true] !process-tokens @mode[m:math-object] !element @name[$\{m:pref\}mo] !entity-reference @name[#x00332] ; TO DO: should this be 0005F 00331 or 00332?
Summations, products etc.
series !element @name[$\{m:pref\}mrow] !element @name[$\{m:pref\}munderover] !element @name[$\{m:pref\}mo] !entity-reference @name[#x02211] !process-tokens @mode[m:math-object] ; underscript !process-tokens @mode[m:math-object] ; overscript !element @name[$\{m:pref\}mrow] !process-tokens @mode[m:mrow-content] ; content product !element @name[$\{m:pref\}mrow] !element @name[$\{m:pref\}munderover] !element @name[$\{m:pref\}mo] !entity-reference @name[#x0220F] !process-tokens @mode[m:math-object] ; underscript !process-tokens @mode[m:math-object] ; overscript !element @name[$\{m:pref\}mrow] !process-tokens @mode[m:mrow-content] ; content
div !element @name[$\{m:pref\}mrow] !element @name[$\{m:pref\}mo]!entity-reference @name[#x02207] !element @name[$\{m:pref\}mo]!entity-reference @name[#x000B7] !element @name[$\{m:pref\}mrow] !process-tokens @mode[m:math-object] grad !element @name[$\{m:pref\}mrow] !element @name[$\{m:pref\}mo]!entity-reference @name[#x02207] !element @name[$\{m:pref\}mrow] !process-tokens @mode[m:math-object] curl !element @name[$\{m:pref\}mrow] !element @name[$\{m:pref\}mo]!entity-reference @name[#x02207] !element @name[$\{m:pref\}mo]!entity-reference @name[#x000D7] !element @name[$\{m:pref\}mrow] !process-tokens @mode[m:math-object]
!include @mode[m:mrow-item] @hook[execute] !mode @name[x:token-dictionary] @template[m:token-dictionary] @type[execute] !hook @mode[m:token-dictionary] @action[execute]
Some other stuff I have added.
factorial ${m:token-type}="mo" ${m:form}="postfix" ${m:text}="!" supremum ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="sup" infimum ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="inf" divides ${m:token-type}="mo" ${m:form}="infix" ${ref}="#02223" log ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="log" ln ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="ln" exp ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="exp" sin ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="sin" cos ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="cos" tan ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="tan" sinh ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="sinh" cosh ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="cosh" tanh ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="tanh" max ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="max" min ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="min" lim ${m:token-type}="mo" ${m:form}="prefix" ${m:text}="lim"
!include @mode[m:token-dictionary] @hook[execute] }; !declare-prefix }; !declare-prefix
This file is part of the GLOSS system, Copyright Richard Kaye http://gloss.bham.ac.uk/. Usage permitted under the GPL. No Warranty.
This page is copyright. Web page design and creation by GLOSS.