mml 2.2.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitmodules +9 -0
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +36 -17
- data/CLAUDE.md +79 -0
- data/Gemfile +0 -2
- data/README.adoc +334 -82
- data/Rakefile +16 -1
- data/lib/mml/base/content/annotation.rb +30 -0
- data/lib/mml/base/content/annotation_xml.rb +31 -0
- data/lib/mml/base/content/apply.rb +27 -0
- data/lib/mml/base/content/arith.rb +243 -0
- data/lib/mml/base/content/bind.rb +27 -0
- data/lib/mml/base/content/bvar.rb +20 -0
- data/lib/mml/base/content/calculus.rb +103 -0
- data/lib/mml/base/content/cbytes.rb +24 -0
- data/lib/mml/base/content/cerror.rb +24 -0
- data/lib/mml/base/content/ci.rb +77 -0
- data/lib/mml/base/content/cn.rb +33 -0
- data/lib/mml/base/content/condition.rb +20 -0
- data/lib/mml/base/content/constants.rb +173 -0
- data/lib/mml/base/content/cs.rb +22 -0
- data/lib/mml/base/content/csymbol.rb +79 -0
- data/lib/mml/base/content/declare.rb +34 -0
- data/lib/mml/base/content/degree.rb +20 -0
- data/lib/mml/base/content/elementary_functions.rb +309 -0
- data/lib/mml/base/content/fn.rb +25 -0
- data/lib/mml/base/content/functions.rb +85 -0
- data/lib/mml/base/content/interval.rb +24 -0
- data/lib/mml/base/content/inverse.rb +25 -0
- data/lib/mml/base/content/lambda.rb +20 -0
- data/lib/mml/base/content/linear_algebra.rb +122 -0
- data/lib/mml/base/content/logic.rb +93 -0
- data/lib/mml/base/content/otherwise.rb +20 -0
- data/lib/mml/base/content/piece.rb +20 -0
- data/lib/mml/base/content/piecewise.rb +20 -0
- data/lib/mml/base/content/relations.rb +113 -0
- data/lib/mml/base/content/reln.rb +19 -0
- data/lib/mml/base/content/semantics.rb +27 -0
- data/lib/mml/base/content/sep.rb +19 -0
- data/lib/mml/base/content/sets.rb +163 -0
- data/lib/mml/base/content/share.rb +24 -0
- data/lib/mml/base/content/statistics.rb +95 -0
- data/lib/mml/base/content/vector_calculus.rb +63 -0
- data/lib/mml/base/content_loader.rb +195 -0
- data/lib/mml/base/deprecated_font_attributes.rb +31 -0
- data/lib/mml/base/maction.rb +29 -0
- data/lib/mml/base/maligngroup.rb +26 -0
- data/lib/mml/base/malignmark.rb +26 -0
- data/lib/mml/base/math.rb +64 -0
- data/lib/mml/base/menclose.rb +27 -0
- data/lib/mml/base/merror.rb +25 -0
- data/lib/mml/base/mfenced.rb +34 -0
- data/lib/mml/base/mfrac.rb +35 -0
- data/lib/mml/base/mfraction.rb +33 -0
- data/lib/mml/base/mglyph.rb +44 -0
- data/lib/mml/base/mi.rb +37 -0
- data/lib/mml/base/mlabeledtr.rb +33 -0
- data/lib/mml/base/mlongdiv.rb +31 -0
- data/lib/mml/base/mmultiscripts.rb +31 -0
- data/lib/mml/base/mn.rb +35 -0
- data/lib/mml/base/mo.rb +74 -0
- data/lib/mml/base/mover.rb +29 -0
- data/lib/mml/base/mpadded.rb +35 -0
- data/lib/mml/base/mphantom.rb +25 -0
- data/lib/mml/base/mprescripts.rb +24 -0
- data/lib/mml/base/mroot.rb +25 -0
- data/lib/mml/base/mrow.rb +27 -0
- data/lib/mml/base/ms.rb +35 -0
- data/lib/mml/base/mscarries.rb +33 -0
- data/lib/mml/base/mscarry.rb +29 -0
- data/lib/mml/base/msgroup.rb +31 -0
- data/lib/mml/base/msline.rb +34 -0
- data/lib/mml/base/mspace.rb +52 -0
- data/lib/mml/base/msqrt.rb +25 -0
- data/lib/mml/base/msrow.rb +27 -0
- data/lib/mml/base/mstack.rb +33 -0
- data/lib/mml/base/mstyle.rb +185 -0
- data/lib/mml/base/msub.rb +27 -0
- data/lib/mml/base/msubsup.rb +29 -0
- data/lib/mml/base/msup.rb +27 -0
- data/lib/mml/base/mtable.rb +65 -0
- data/lib/mml/base/mtd.rb +35 -0
- data/lib/mml/base/mtext.rb +30 -0
- data/lib/mml/base/mtr.rb +35 -0
- data/lib/mml/base/munder.rb +31 -0
- data/lib/mml/base/munderover.rb +31 -0
- data/lib/mml/base/none.rb +24 -0
- data/lib/mml/base/semantics.rb +25 -0
- data/lib/mml/base/universal_presentation_attributes.rb +42 -0
- data/lib/mml/base/v3_common.rb +16 -0
- data/lib/mml/base/v3_only/operator_attrs.rb +24 -0
- data/lib/mml/base/v3_only/style_attrs.rb +31 -0
- data/lib/mml/base/v3_only/table_attrs.rb +28 -0
- data/lib/mml/base/v3_only.rb +11 -0
- data/lib/mml/base/v3_presentation_attributes.rb +15 -0
- data/lib/mml/base/v4_attributes.rb +16 -0
- data/lib/mml/base.rb +61 -0
- data/lib/mml/common_elements.rb +419 -0
- data/lib/mml/context_configuration.rb +147 -0
- data/lib/mml/context_options.rb +64 -0
- data/lib/mml/namespace.rb +10 -0
- data/lib/mml/v2/annotation.rb +9 -0
- data/lib/mml/v2/annotation_xml.rb +9 -0
- data/lib/mml/v2/apply.rb +9 -0
- data/lib/mml/v2/arith.rb +93 -0
- data/lib/mml/v2/bind.rb +9 -0
- data/lib/mml/v2/bvar.rb +9 -0
- data/lib/mml/v2/calculus.rb +33 -0
- data/lib/mml/v2/ci.rb +9 -0
- data/lib/mml/v2/cn.rb +9 -0
- data/lib/mml/v2/common_elements.rb +34 -0
- data/lib/mml/v2/condition.rb +9 -0
- data/lib/mml/v2/configuration.rb +13 -0
- data/lib/mml/v2/constants.rb +65 -0
- data/lib/mml/v2/csymbol.rb +9 -0
- data/lib/mml/v2/degree.rb +9 -0
- data/lib/mml/v2/elementary_functions.rb +121 -0
- data/lib/mml/v2/fn.rb +9 -0
- data/lib/mml/v2/functions.rb +29 -0
- data/lib/mml/v2/interval.rb +9 -0
- data/lib/mml/v2/inverse.rb +9 -0
- data/lib/mml/v2/lambda.rb +9 -0
- data/lib/mml/v2/linear_algebra.rb +41 -0
- data/lib/mml/v2/logic.rb +33 -0
- data/lib/mml/v2/maction.rb +9 -0
- data/lib/mml/v2/maligngroup.rb +9 -0
- data/lib/mml/v2/malignmark.rb +9 -0
- data/lib/mml/v2/math.rb +11 -0
- data/lib/mml/v2/menclose.rb +9 -0
- data/lib/mml/v2/merror.rb +9 -0
- data/lib/mml/v2/mfenced.rb +9 -0
- data/lib/mml/v2/mfrac.rb +9 -0
- data/lib/mml/v2/mfraction.rb +9 -0
- data/lib/mml/v2/mglyph.rb +9 -0
- data/lib/mml/v2/mi.rb +9 -0
- data/lib/mml/v2/mlabeledtr.rb +9 -0
- data/lib/mml/v2/mlongdiv.rb +9 -0
- data/lib/mml/v2/mmultiscripts.rb +9 -0
- data/lib/mml/v2/mn.rb +9 -0
- data/lib/mml/v2/mo.rb +10 -0
- data/lib/mml/v2/mover.rb +9 -0
- data/lib/mml/v2/mpadded.rb +9 -0
- data/lib/mml/v2/mphantom.rb +9 -0
- data/lib/mml/v2/mprescripts.rb +9 -0
- data/lib/mml/v2/mroot.rb +9 -0
- data/lib/mml/v2/mrow.rb +9 -0
- data/lib/mml/v2/ms.rb +9 -0
- data/lib/mml/v2/mscarries.rb +9 -0
- data/lib/mml/v2/mscarry.rb +9 -0
- data/lib/mml/v2/msgroup.rb +9 -0
- data/lib/mml/v2/msline.rb +9 -0
- data/lib/mml/v2/mspace.rb +9 -0
- data/lib/mml/v2/msqrt.rb +9 -0
- data/lib/mml/v2/msrow.rb +9 -0
- data/lib/mml/v2/mstack.rb +9 -0
- data/lib/mml/v2/mstyle.rb +10 -0
- data/lib/mml/v2/msub.rb +9 -0
- data/lib/mml/v2/msubsup.rb +9 -0
- data/lib/mml/v2/msup.rb +9 -0
- data/lib/mml/v2/mtable.rb +9 -0
- data/lib/mml/v2/mtd.rb +9 -0
- data/lib/mml/v2/mtext.rb +9 -0
- data/lib/mml/v2/mtr.rb +9 -0
- data/lib/mml/v2/munder.rb +9 -0
- data/lib/mml/v2/munderover.rb +9 -0
- data/lib/mml/v2/namespace.rb +7 -0
- data/lib/mml/v2/none.rb +9 -0
- data/lib/mml/v2/otherwise.rb +9 -0
- data/lib/mml/v2/piece.rb +9 -0
- data/lib/mml/v2/piecewise.rb +9 -0
- data/lib/mml/v2/relations.rb +41 -0
- data/lib/mml/v2/reln.rb +13 -0
- data/lib/mml/v2/semantics.rb +9 -0
- data/lib/mml/v2/sep.rb +9 -0
- data/lib/mml/v2/sets.rb +57 -0
- data/lib/mml/v2/statistics.rb +33 -0
- data/lib/mml/v2/vector_calculus.rb +21 -0
- data/lib/mml/v2.rb +311 -0
- data/lib/mml/v3/annotation.rb +10 -0
- data/lib/mml/v3/annotation_xml.rb +10 -0
- data/lib/mml/v3/apply.rb +10 -0
- data/lib/mml/v3/arith.rb +115 -0
- data/lib/mml/v3/bind.rb +10 -0
- data/lib/mml/v3/calculus.rb +40 -0
- data/lib/mml/v3/cbytes.rb +10 -0
- data/lib/mml/v3/cerror.rb +10 -0
- data/lib/mml/v3/ci.rb +10 -0
- data/lib/mml/v3/cn.rb +10 -0
- data/lib/mml/v3/common_elements.rb +42 -0
- data/lib/mml/v3/configuration.rb +4 -96
- data/lib/mml/v3/constants.rb +80 -0
- data/lib/mml/v3/constructs.rb +55 -0
- data/lib/mml/v3/cs.rb +10 -0
- data/lib/mml/v3/csymbol.rb +10 -0
- data/lib/mml/v3/deprecated_content.rb +29 -0
- data/lib/mml/v3/elementary_functions.rb +145 -0
- data/lib/mml/v3/functions.rb +35 -0
- data/lib/mml/v3/linear_algebra.rb +50 -0
- data/lib/mml/v3/logic.rb +40 -0
- data/lib/mml/v3/maction.rb +3 -15
- data/lib/mml/v3/maligngroup.rb +2 -12
- data/lib/mml/v3/malignmark.rb +2 -12
- data/lib/mml/v3/math.rb +7 -8
- data/lib/mml/v3/menclose.rb +3 -14
- data/lib/mml/v3/merror.rb +3 -12
- data/lib/mml/v3/mfenced.rb +3 -21
- data/lib/mml/v3/mfrac.rb +3 -20
- data/lib/mml/v3/mfraction.rb +3 -20
- data/lib/mml/v3/mglyph.rb +3 -38
- data/lib/mml/v3/mi.rb +4 -30
- data/lib/mml/v3/mlabeledtr.rb +2 -23
- data/lib/mml/v3/mlongdiv.rb +3 -18
- data/lib/mml/v3/mmultiscripts.rb +3 -20
- data/lib/mml/v3/mn.rb +4 -30
- data/lib/mml/v3/mo.rb +5 -78
- data/lib/mml/v3/mover.rb +3 -16
- data/lib/mml/v3/mpadded.rb +3 -22
- data/lib/mml/v3/mphantom.rb +3 -12
- data/lib/mml/v3/mprescripts.rb +2 -10
- data/lib/mml/v3/mroot.rb +3 -12
- data/lib/mml/v3/mrow.rb +4 -18
- data/lib/mml/v3/ms.rb +5 -36
- data/lib/mml/v3/mscarries.rb +3 -20
- data/lib/mml/v3/mscarry.rb +3 -16
- data/lib/mml/v3/msgroup.rb +3 -18
- data/lib/mml/v3/msline.rb +2 -20
- data/lib/mml/v3/mspace.rb +3 -50
- data/lib/mml/v3/msqrt.rb +3 -12
- data/lib/mml/v3/msrow.rb +3 -14
- data/lib/mml/v3/mstack.rb +3 -20
- data/lib/mml/v3/mstyle.rb +6 -204
- data/lib/mml/v3/msub.rb +3 -14
- data/lib/mml/v3/msubsup.rb +3 -16
- data/lib/mml/v3/msup.rb +3 -14
- data/lib/mml/v3/mtable.rb +3 -53
- data/lib/mml/v3/mtd.rb +3 -16
- data/lib/mml/v3/mtext.rb +4 -30
- data/lib/mml/v3/mtr.rb +2 -21
- data/lib/mml/v3/munder.rb +3 -18
- data/lib/mml/v3/munderover.rb +3 -18
- data/lib/mml/v3/namespace.rb +1 -4
- data/lib/mml/v3/none.rb +2 -10
- data/lib/mml/v3/relations.rb +50 -0
- data/lib/mml/v3/semantics.rb +3 -12
- data/lib/mml/v3/sets.rb +70 -0
- data/lib/mml/v3/statistics.rb +40 -0
- data/lib/mml/v3/vector_calculus.rb +25 -0
- data/lib/mml/v3.rb +74 -75
- data/lib/mml/v4/a.rb +3 -13
- data/lib/mml/v4/annotation.rb +10 -0
- data/lib/mml/v4/annotation_xml.rb +14 -0
- data/lib/mml/v4/apply.rb +9 -0
- data/lib/mml/v4/arith.rb +93 -0
- data/lib/mml/v4/calculus.rb +25 -0
- data/lib/mml/v4/cbytes.rb +9 -0
- data/lib/mml/v4/cerror.rb +9 -0
- data/lib/mml/v4/ci.rb +9 -0
- data/lib/mml/v4/cn.rb +9 -0
- data/lib/mml/v4/common_elements.rb +46 -0
- data/lib/mml/v4/configuration.rb +4 -97
- data/lib/mml/v4/constants.rb +65 -0
- data/lib/mml/v4/constructs.rb +49 -0
- data/lib/mml/v4/cs.rb +9 -0
- data/lib/mml/v4/csymbol.rb +9 -0
- data/lib/mml/v4/deprecated_content.rb +25 -0
- data/lib/mml/v4/elementary_functions.rb +118 -0
- data/lib/mml/v4/factorof.rb +9 -0
- data/lib/mml/v4/functions.rb +30 -0
- data/lib/mml/v4/limit.rb +9 -0
- data/lib/mml/v4/linear_algebra.rb +41 -0
- data/lib/mml/v4/logic.rb +33 -0
- data/lib/mml/v4/maction.rb +3 -19
- data/lib/mml/v4/maligngroup.rb +3 -17
- data/lib/mml/v4/malignmark.rb +3 -17
- data/lib/mml/v4/math.rb +4 -14
- data/lib/mml/v4/menclose.rb +3 -18
- data/lib/mml/v4/merror.rb +3 -16
- data/lib/mml/v4/mfenced.rb +3 -25
- data/lib/mml/v4/mfrac.rb +3 -24
- data/lib/mml/v4/mfraction.rb +3 -20
- data/lib/mml/v4/mglyph.rb +3 -35
- data/lib/mml/v4/mi.rb +4 -30
- data/lib/mml/v4/mlabeledtr.rb +5 -23
- data/lib/mml/v4/mlongdiv.rb +3 -18
- data/lib/mml/v4/mmultiscripts.rb +3 -24
- data/lib/mml/v4/mn.rb +4 -29
- data/lib/mml/v4/mo.rb +4 -75
- data/lib/mml/v4/mover.rb +3 -20
- data/lib/mml/v4/mpadded.rb +3 -26
- data/lib/mml/v4/mphantom.rb +3 -16
- data/lib/mml/v4/mprescripts.rb +3 -11
- data/lib/mml/v4/mroot.rb +3 -16
- data/lib/mml/v4/mrow.rb +4 -20
- data/lib/mml/v4/ms.rb +4 -34
- data/lib/mml/v4/mscarries.rb +3 -20
- data/lib/mml/v4/mscarry.rb +3 -16
- data/lib/mml/v4/msgroup.rb +3 -18
- data/lib/mml/v4/msline.rb +3 -21
- data/lib/mml/v4/mspace.rb +3 -49
- data/lib/mml/v4/msqrt.rb +3 -16
- data/lib/mml/v4/msrow.rb +3 -18
- data/lib/mml/v4/mstack.rb +3 -24
- data/lib/mml/v4/mstyle.rb +4 -186
- data/lib/mml/v4/msub.rb +3 -18
- data/lib/mml/v4/msubsup.rb +3 -20
- data/lib/mml/v4/msup.rb +3 -18
- data/lib/mml/v4/mtable.rb +3 -55
- data/lib/mml/v4/mtd.rb +3 -20
- data/lib/mml/v4/mtext.rb +4 -29
- data/lib/mml/v4/mtr.rb +3 -25
- data/lib/mml/v4/munder.rb +3 -22
- data/lib/mml/v4/munderover.rb +3 -22
- data/lib/mml/v4/namespace.rb +1 -4
- data/lib/mml/v4/none.rb +5 -11
- data/lib/mml/v4/relations.rb +37 -0
- data/lib/mml/v4/semantics.rb +3 -12
- data/lib/mml/v4/sets.rb +57 -0
- data/lib/mml/v4/statistics.rb +33 -0
- data/lib/mml/v4/tendsto.rb +9 -0
- data/lib/mml/v4/vector_calculus.rb +21 -0
- data/lib/mml/v4.rb +426 -71
- data/lib/mml/version.rb +1 -1
- data/lib/mml/versioned_parser.rb +46 -0
- data/lib/mml.rb +36 -6
- data/reference-docs/mathml-source/pubtext/mathmlspec.dtd +150 -0
- data/reference-docs/mathml-source/pubtext/xmlspec.dtd +2649 -0
- data/reference-docs/mathml-source/readme.txt +40 -0
- data/reference-docs/mathml-source/run +296 -0
- data/reference-docs/mathml-source/style/html/html2xhtml.xsl +216 -0
- data/reference-docs/mathml-source/style/html/images.xsl +98 -0
- data/reference-docs/mathml-source/style/html/mml6.xsl +1156 -0
- data/reference-docs/mathml-source/style/html/mmldiff.xsl +566 -0
- data/reference-docs/mathml-source/style/html/mmlspec.xsl +2531 -0
- data/reference-docs/mathml-source/style/html/slices-common.xsl +312 -0
- data/reference-docs/mathml-source/style/html/slices.xsl +48 -0
- data/reference-docs/mathml-source/style/html/xmlspec.xsl +2542 -0
- data/reference-docs/mathml-source/style/pdf/mathmlspec.xsl +2510 -0
- data/reference-docs/mathml-source/xml/changes.xml +773 -0
- data/reference-docs/mathml-source/xml/character-set.xml +1011 -0
- data/reference-docs/mathml-source/xml/content-element-def.xml +6143 -0
- data/reference-docs/mathml-source/xml/content-markup.xml +8178 -0
- data/reference-docs/mathml-source/xml/contributors.xml +425 -0
- data/reference-docs/mathml-source/xml/dom-bindings.xml +20 -0
- data/reference-docs/mathml-source/xml/dom-intro.xml +114 -0
- data/reference-docs/mathml-source/xml/fundamentals.xml +1646 -0
- data/reference-docs/mathml-source/xml/glossary.xml +519 -0
- data/reference-docs/mathml-source/xml/interface.xml +1096 -0
- data/reference-docs/mathml-source/xml/introduction.xml +724 -0
- data/reference-docs/mathml-source/xml/mathml-css-sample.xml +304 -0
- data/reference-docs/mathml-source/xml/mathml-dom.xml +3813 -0
- data/reference-docs/mathml-source/xml/mathml-spec.xml +356 -0
- data/reference-docs/mathml-source/xml/mixing.xml +982 -0
- data/reference-docs/mathml-source/xml/operator-dict.xml +551 -0
- data/reference-docs/mathml-source/xml/parsing.xml +2565 -0
- data/reference-docs/mathml-source/xml/presentation-markup.xml +6834 -0
- data/reference-docs/mathml-source/xml/references.xml +323 -0
- data/reference-docs/mathml-source/xml/validation-grammar.xml +877 -0
- data/schemas/README.adoc +15 -0
- data/schemas/mathml2/CVS/Entries +4 -0
- data/schemas/mathml2/CVS/Repository +1 -0
- data/schemas/mathml2/CVS/Root +1 -0
- data/schemas/mathml2/common/CVS/Entries +4 -0
- data/schemas/mathml2/common/CVS/Repository +1 -0
- data/schemas/mathml2/common/CVS/Root +1 -0
- data/schemas/mathml2/common/common-attribs.xsd +41 -0
- data/schemas/mathml2/common/math.xsd +126 -0
- data/schemas/mathml2/common/xlink-href.xsd +20 -0
- data/schemas/mathml2/content/CVS/Entries +16 -0
- data/schemas/mathml2/content/CVS/Repository +1 -0
- data/schemas/mathml2/content/CVS/Root +1 -0
- data/schemas/mathml2/content/arith.xsd +90 -0
- data/schemas/mathml2/content/calculus.xsd +146 -0
- data/schemas/mathml2/content/common-attrib.xsd +30 -0
- data/schemas/mathml2/content/constants.xsd +83 -0
- data/schemas/mathml2/content/constructs.xsd +260 -0
- data/schemas/mathml2/content/elementary-functions.xsd +117 -0
- data/schemas/mathml2/content/functions.xsd +73 -0
- data/schemas/mathml2/content/linear-algebra.xsd +173 -0
- data/schemas/mathml2/content/logic.xsd +53 -0
- data/schemas/mathml2/content/relations.xsd +55 -0
- data/schemas/mathml2/content/semantics.xsd +85 -0
- data/schemas/mathml2/content/sets.xsd +236 -0
- data/schemas/mathml2/content/statistics.xsd +136 -0
- data/schemas/mathml2/content/tokens.xsd +120 -0
- data/schemas/mathml2/content/tokens.xsd.~1.3.~ +119 -0
- data/schemas/mathml2/content/vector-calculus.xsd +88 -0
- data/schemas/mathml2/mathml2.xsd +59 -0
- data/schemas/mathml2/presentation/CVS/Entries +12 -0
- data/schemas/mathml2/presentation/CVS/Repository +1 -0
- data/schemas/mathml2/presentation/CVS/Root +1 -0
- data/schemas/mathml2/presentation/action.xsd +44 -0
- data/schemas/mathml2/presentation/characters.xsd +37 -0
- data/schemas/mathml2/presentation/common-attribs.xsd +113 -0
- data/schemas/mathml2/presentation/common-types.xsd +103 -0
- data/schemas/mathml2/presentation/error.xsd +40 -0
- data/schemas/mathml2/presentation/layout.xsd +195 -0
- data/schemas/mathml2/presentation/scripts.xsd +186 -0
- data/schemas/mathml2/presentation/space.xsd +52 -0
- data/schemas/mathml2/presentation/style.xsd +69 -0
- data/schemas/mathml2/presentation/table.xsd +216 -0
- data/schemas/mathml2/presentation/tokens.xsd +124 -0
- data/schemas/mathml3/mathml3-common.xsd +99 -0
- data/schemas/mathml3/mathml3-content.xsd +684 -0
- data/schemas/mathml3/mathml3-presentation.xsd +2151 -0
- data/schemas/mathml3/mathml3-strict-content.xsd +186 -0
- data/schemas/mathml3/mathml3.xsd +9 -0
- metadata +308 -4
- data/lib/mml/v3/common_attributes.rb +0 -22
- data/lib/mml/v4/common_attributes.rb +0 -26
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
<div1 id="intro" role="chapter1"><head>Introduction</head>
|
|
2
|
+
<!-- $Id: introduction.xml,v 1.43 2003/09/08 13:04:48 davidc Exp $ -->
|
|
3
|
+
|
|
4
|
+
<div2 id="intro_notation"><head>Mathematics and its Notation</head>
|
|
5
|
+
|
|
6
|
+
<p>A distinguishing feature of mathematics is the use of a complex and
|
|
7
|
+
highly evolved system of two-dimensional symbolic notations. As
|
|
8
|
+
J.R. Pierce has written in his book on communication theory,
|
|
9
|
+
mathematics and its notations should not be viewed as one and the same
|
|
10
|
+
thing <bibref ref="Pierce1961"/>. Mathematical ideas exist independently of
|
|
11
|
+
the notations that represent them. However, the relation between meaning
|
|
12
|
+
and notation is subtle, and part of the power of mathematics to describe
|
|
13
|
+
and analyze derives from its ability to represent and manipulate ideas in
|
|
14
|
+
symbolic form. The challenge in putting mathematics on the World Wide Web
|
|
15
|
+
is to capture both notation and content (that is, meaning) in such a way
|
|
16
|
+
that documents can utilize the highly-evolved notational forms of written
|
|
17
|
+
and printed mathematics, and the potential for interconnectivity in
|
|
18
|
+
electronic media.</p>
|
|
19
|
+
|
|
20
|
+
<p>Mathematical notations are constantly evolving as people continue
|
|
21
|
+
to make innovations in ways of approaching and expressing ideas. Even
|
|
22
|
+
the commonplace notations of arithmetic have gone through an amazing
|
|
23
|
+
variety of styles, including many defunct ones advocated by leading
|
|
24
|
+
mathematical figures of their day <bibref ref="Cajori1928"/>. Modern
|
|
25
|
+
mathematical notation is the product of centuries of refinement, and
|
|
26
|
+
the notational conventions for high-quality typesetting are quite
|
|
27
|
+
complicated. For example, variables and letters which stand for
|
|
28
|
+
numbers are usually typeset today in a special mathematical italic
|
|
29
|
+
font subtly distinct from the usual text italic. Spacing around
|
|
30
|
+
symbols for operations such as +, -, × and / is slightly
|
|
31
|
+
different from that of text, to reflect conventions about operator
|
|
32
|
+
precedence. Entire books have been devoted to the conventions of
|
|
33
|
+
mathematical typesetting, from the alignment of superscripts and
|
|
34
|
+
subscripts, to rules for choosing parenthesis sizes, and on to
|
|
35
|
+
specialized notational practices for subfields of mathematics (for
|
|
36
|
+
instance, <bibref ref="Chaundy1954"/>, <bibref
|
|
37
|
+
ref="Swanson1979"/>, <bibref ref="Swanson1999"/>, <bibref
|
|
38
|
+
ref="Higham1993"/>, or in the &TeX; literature <bibref
|
|
39
|
+
ref="Knuth1986"/> and <bibref ref="Spivak1986"/>).</p>
|
|
40
|
+
|
|
41
|
+
<p>Notational conventions in mathematics, and in printed text in general,
|
|
42
|
+
guide the eye and make printed expressions much easier to read and
|
|
43
|
+
understand. Though we usually take them for granted, we rely on
|
|
44
|
+
hundreds of conventions such as paragraphs, capital letters, font
|
|
45
|
+
families and cases, and even the device of decimal-like numbering of
|
|
46
|
+
sections such as we are using in this document (an invention due to
|
|
47
|
+
G. Peano, who is probably better known for his axioms for the
|
|
48
|
+
natural numbers). Such notational conventions are perhaps even more important
|
|
49
|
+
for electronic media, where one must contend with the difficulties of
|
|
50
|
+
on-screen reading.</p>
|
|
51
|
+
|
|
52
|
+
<p>However, there is more to putting mathematics on the Web
|
|
53
|
+
than merely finding ways of displaying traditional
|
|
54
|
+
mathematical notation in a Web browser. The Web represents a
|
|
55
|
+
fundamental change in the underlying metaphor for knowledge
|
|
56
|
+
storage, a change in which <emph>interconnectivity</emph>
|
|
57
|
+
plays a central role. It is becoming increasingly important to
|
|
58
|
+
find ways of communicating mathematics which facilitate
|
|
59
|
+
automatic processing, searching and indexing, and reuse in
|
|
60
|
+
other mathematical applications and contexts. With this
|
|
61
|
+
advance in communication technology, there is an opportunity
|
|
62
|
+
to expand our ability to represent, encode, and ultimately to
|
|
63
|
+
communicate our mathematical insights and understanding with
|
|
64
|
+
each other. We believe that MathML is an important step in
|
|
65
|
+
developing mathematics on the Web.</p>
|
|
66
|
+
</div2>
|
|
67
|
+
|
|
68
|
+
<div2 id="intro_origin"><head>Origins and Goals</head>
|
|
69
|
+
|
|
70
|
+
<div3><head>The History of MathML</head>
|
|
71
|
+
|
|
72
|
+
<p>The problem of encoding mathematics for computer processing
|
|
73
|
+
or electronic communication is much older than the Web. The
|
|
74
|
+
common practice among scientists before the Web was to write
|
|
75
|
+
papers in some encoded form based on the ASCII character set,
|
|
76
|
+
and e-mail them to each other. Several markup methods for
|
|
77
|
+
mathematics, in particular &TeX; <bibref ref="Knuth1986"/>,
|
|
78
|
+
were already in wide use in 1992 just before the Web rose to
|
|
79
|
+
prominence, <bibref ref="Poppelier1992"/>.</p>
|
|
80
|
+
|
|
81
|
+
<p>Since its inception, the Web has demonstrated itself to be
|
|
82
|
+
a very effective method of making information available to
|
|
83
|
+
widely separated groups of individuals. However, even though
|
|
84
|
+
the World Wide Web was initially conceived and implemented by
|
|
85
|
+
scientists for scientists, the possibilities for including
|
|
86
|
+
mathematical expressions in HTML has been very limited. At
|
|
87
|
+
present, most mathematics on the Web consists of text with
|
|
88
|
+
images of scientific notation (in <termdef id="td-gif"
|
|
89
|
+
term="Graphic Interchange Format">GIF</termdef> or <termdef
|
|
90
|
+
id="td-jpeg" term="Joint Photographic Exchange
|
|
91
|
+
Group">JPEG</termdef> format), which are difficult to read and
|
|
92
|
+
to author, or of entire documents in <termdef id="td-pdf"
|
|
93
|
+
term="Portable Document Format">PDF</termdef> form.</p>
|
|
94
|
+
|
|
95
|
+
<p>The World Wide Web Consortium (W3C) recognized that lack of
|
|
96
|
+
support for scientific communication was a serious
|
|
97
|
+
problem. Dave Raggett included a proposal for HTML Math in the
|
|
98
|
+
HTML 3.0 working draft in 1994. A panel discussion on
|
|
99
|
+
mathematical markup was held at the WWW Conference in
|
|
100
|
+
Darmstadt in April 1995. In November 1995, representatives
|
|
101
|
+
from Wolfram Research presented a proposal for doing mathematics in
|
|
102
|
+
HTML to the W3C team. In May 1996, the Digital Library
|
|
103
|
+
Initiative meeting in Champaign-Urbana played an important
|
|
104
|
+
role in bringing together many interested parties. Following
|
|
105
|
+
the meeting, an HTML Math Editorial Review Board was
|
|
106
|
+
formed. In the intervening years, this group has grown, and
|
|
107
|
+
was formally reconstituted as the first W3C Math Working Group
|
|
108
|
+
in March 1997. The second W3C Math Working Group was
|
|
109
|
+
chartered in July 1998 with a term which was later extended to run
|
|
110
|
+
to the end of the year 2000.</p>
|
|
111
|
+
|
|
112
|
+
<p>The MathML proposal reflects the interests and expertise of
|
|
113
|
+
a very diverse group. Many contributions to the development of
|
|
114
|
+
MathML deserve special mention, some of which we touch on
|
|
115
|
+
here. One such contribution concerns the question of
|
|
116
|
+
accessibility, especially for the visually handicapped.
|
|
117
|
+
T. V. Raman is particularly notable in this
|
|
118
|
+
regard. Neil Soiffer and Bruce Smith from Wolfram Research
|
|
119
|
+
shared their experience with the problems of representing
|
|
120
|
+
mathematics in connection with the design of Mathematica 3.0;
|
|
121
|
+
this expertise was an important influence in the design of the
|
|
122
|
+
presentation elements. Paul Topping from Design Science also
|
|
123
|
+
contributed his expertise in mathematical formatting and
|
|
124
|
+
editing. MathML has benefited from the participation of a
|
|
125
|
+
number of working group members involved in other mathematical
|
|
126
|
+
encoding efforts in the <termdef id="td-sgml" term="Standard
|
|
127
|
+
Generalized Markup Language">SGML</termdef> and
|
|
128
|
+
computer-algebra communities, including Stephen Buswell from
|
|
129
|
+
Stilo Technologies, Nico Poppelier at first with Elsevier
|
|
130
|
+
Science, Stéphane Dalmas from INRIA (Sophia Antipolis),
|
|
131
|
+
Stan Devitt at first with Waterloo Maple, Angel Diaz and
|
|
132
|
+
Robert S. Sutor from IBM, and Stephen M. Watt from
|
|
133
|
+
the University of Western Ontario. In particular, MathML has
|
|
134
|
+
been influenced by the OpenMath project, the work of the ISO
|
|
135
|
+
12083 working group, and Stilo Technologies' work on a
|
|
136
|
+
<quote>semantic</quote> mathematics DTD fragment. The American
|
|
137
|
+
Mathematical Society has played a key role in the development
|
|
138
|
+
of MathML. Among other things, it has provided two working
|
|
139
|
+
group chairs: Ron Whitney led the group from May 1996 to March
|
|
140
|
+
1997, and Patrick Ion, who has co-chaired the group with
|
|
141
|
+
Robert Miner from The Geometry Center from March 1997 to
|
|
142
|
+
June 1998, and since July 1998 with Angel Diaz of IBM.</p>
|
|
143
|
+
|
|
144
|
+
</div3>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
<div3><head>Limitations of HTML</head>
|
|
148
|
+
|
|
149
|
+
<p>The demand for effective means of electronic scientific
|
|
150
|
+
communication remains high. Ever increasingly, researchers,
|
|
151
|
+
scientists, engineers, educators, students and technicians
|
|
152
|
+
find themselves working at dispersed locations and relying on
|
|
153
|
+
electronic communication. At the same time, the image-based
|
|
154
|
+
methods that are currently the predominant means of
|
|
155
|
+
transmitting scientific notation over the Web are primitive
|
|
156
|
+
and inadequate. Document quality is poor, authoring is
|
|
157
|
+
difficult, and mathematical information contained in images is
|
|
158
|
+
not available for searching, indexing, or reuse in other
|
|
159
|
+
applications.</p>
|
|
160
|
+
|
|
161
|
+
<p>The most obvious problems with HTML for mathematical
|
|
162
|
+
communication are of two types.</p>
|
|
163
|
+
|
|
164
|
+
<p><emph>Display Problems.</emph> Consider the equation
|
|
165
|
+
<graphic role="inline" valign="bottom"
|
|
166
|
+
source="image/f1001.gif" alt="2^{2^x} = 10"/>. This equation
|
|
167
|
+
is sized to match the surrounding line in 14pt type on the
|
|
168
|
+
system where it was authored. Of course, on other systems, or
|
|
169
|
+
for other font sizes, the equation is too small or too
|
|
170
|
+
large. A second point to observe is that the equation image
|
|
171
|
+
was generated against a white background. Thus, if a reader or
|
|
172
|
+
browser resets the page background to another color, the
|
|
173
|
+
anti-aliasing in the image results in white
|
|
174
|
+
<quote>halos</quote>. Next, consider the equation <graphic
|
|
175
|
+
role="inline" valign="bottom" source="image/f1002.gif"
|
|
176
|
+
alt="x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}"/>, which is an example
|
|
177
|
+
with the equation's horizontal alignment axis above the tops
|
|
178
|
+
of the lower-case letters in the surrounding text.</p>
|
|
179
|
+
|
|
180
|
+
<p>This equation has a descender which places the baseline for
|
|
181
|
+
the equation at a point about a third of the way from the
|
|
182
|
+
bottom of the image. One can pad the image like this:
|
|
183
|
+
<graphic role="inline" source="image/f1003.gif"
|
|
184
|
+
alt="x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}"/>,
|
|
185
|
+
so that the centerline of the image and the baseline of the
|
|
186
|
+
equation coincide, but this causes problems with the
|
|
187
|
+
inter-line spacing, resulting in the equation becoming
|
|
188
|
+
difficult to read. Moreover, center alignment of images is
|
|
189
|
+
handled in slightly different ways by different browsers,
|
|
190
|
+
making it impossible to guarantee proper alignment for
|
|
191
|
+
different clients.</p>
|
|
192
|
+
|
|
193
|
+
<p>Image-based equations are generally harder to see, read and
|
|
194
|
+
comprehend than the surrounding text in the browser
|
|
195
|
+
window. Moreover, these problems become worse when the
|
|
196
|
+
document is printed. The resolution of the equations as images
|
|
197
|
+
will be around 70 dots per inch, while the surrounding text
|
|
198
|
+
will typically be 300, 600 or more dots per inch. The
|
|
199
|
+
disparity in quality is judged to be unacceptable by most
|
|
200
|
+
people.</p>
|
|
201
|
+
|
|
202
|
+
<p><emph>Encoding Problems.</emph> Consider trying to search
|
|
203
|
+
this document for part of an equation, for example, the
|
|
204
|
+
<quote>=10</quote> from the first equation above. In a similar
|
|
205
|
+
vein, consider trying to cut and paste an equation into
|
|
206
|
+
another application; even more demanding is to cut and paste a
|
|
207
|
+
sub-expression. Using image-based methods, neither of these
|
|
208
|
+
common needs can be adequately addressed. Although the use of
|
|
209
|
+
the <kw>alt</kw> attribute in the document source can help, it is clear
|
|
210
|
+
that highly interactive Web documents must provide a more
|
|
211
|
+
sophisticated interface between browsers and mathematical
|
|
212
|
+
notation.</p>
|
|
213
|
+
|
|
214
|
+
<p>Another problem with encoding mathematics as images is that
|
|
215
|
+
it requires more bandwidth. Markup describing an equation is
|
|
216
|
+
typically smaller and more compressible than an image of the
|
|
217
|
+
equation. In addition, by using markup-based encoding, more
|
|
218
|
+
of the rendering process is moved to the client machine.</p>
|
|
219
|
+
</div3>
|
|
220
|
+
|
|
221
|
+
<div3><head>Requirements for Mathematics Markup</head>
|
|
222
|
+
|
|
223
|
+
<p>Some display problems associated with including
|
|
224
|
+
mathematical notation in HTML documents as images could be
|
|
225
|
+
addressed by improving image handling by browsers. However,
|
|
226
|
+
even if image handling were improved, the problem of making
|
|
227
|
+
the information contained in mathematical expressions
|
|
228
|
+
available to other applications would remain. Therefore, in
|
|
229
|
+
planning for the future, it is not sufficient merely to
|
|
230
|
+
upgrade image-based methods. To integrate mathematical
|
|
231
|
+
material fully into Web documents, a markup-based encoding of
|
|
232
|
+
mathematical notation and content is required.</p>
|
|
233
|
+
|
|
234
|
+
<p>In designing any markup language, it is essential to
|
|
235
|
+
consider carefully the needs of its potential users. In the
|
|
236
|
+
case of MathML, the needs of potential users cover a broad
|
|
237
|
+
spectrum, from education to research, and on to commerce.</p>
|
|
238
|
+
|
|
239
|
+
<p>The education community is a large and important group that
|
|
240
|
+
must be able to put scientific curriculum materials on the
|
|
241
|
+
Web. At the same time, educators often have limited time and
|
|
242
|
+
equipment, and are severely hampered by the difficulty of
|
|
243
|
+
authoring technical Web documents. Students and teachers need
|
|
244
|
+
to be able to create mathematical content quickly and easily,
|
|
245
|
+
using intuitive, easy-to-learn, low-cost tools.</p>
|
|
246
|
+
|
|
247
|
+
<p>Electronic textbooks are another way of using the Web which will
|
|
248
|
+
potentially be very important in education. Management consultant
|
|
249
|
+
Peter Drucker has prophesied the end of big-campus residential higher
|
|
250
|
+
education and its distribution over the Web. Electronic textbooks
|
|
251
|
+
will need to be interactive, allowing intercommunication between the
|
|
252
|
+
text and scientific software and graphics.</p>
|
|
253
|
+
|
|
254
|
+
<p>The academic and commercial research communities generate large
|
|
255
|
+
volume of dense scientific material. Increasingly, research
|
|
256
|
+
publications are being stored in databases, such as the highly
|
|
257
|
+
successful <loc href="http://xxx.lanl.gov">physics and mathematics
|
|
258
|
+
preprint server and archive</loc> at Los Alamos National
|
|
259
|
+
Laboratory. This is especially true in some areas of physics and
|
|
260
|
+
mathematics where academic journal prices have been increasing at an
|
|
261
|
+
unsustainable rate. In addition, databases of information on
|
|
262
|
+
mathematical research, such as <loc
|
|
263
|
+
href="http://www.ams.org/mathscinet">Mathematical Reviews</loc> and
|
|
264
|
+
<loc href="http://www.zblmath.fiz-karlsruhe.de">Zentralblatt für
|
|
265
|
+
Mathematik</loc>, offer millions of records on the Web containing
|
|
266
|
+
mathematics.</p>
|
|
267
|
+
|
|
268
|
+
<p>To accommodate the research community, a design for
|
|
269
|
+
mathematical markup must facilitate the maintenance and
|
|
270
|
+
operation of large document collections, for which automatic
|
|
271
|
+
searching and indexing are important. Because of the large
|
|
272
|
+
collection of legacy documents containing mathematics, especially in
|
|
273
|
+
&TeX;, the ability to convert between existing formats and any
|
|
274
|
+
new one is also very important to the research community.
|
|
275
|
+
Finally, the ability to maintain information for archival
|
|
276
|
+
purposes is vital to academic research.</p>
|
|
277
|
+
|
|
278
|
+
<p>Corporate and academic scientists and engineers also use
|
|
279
|
+
technical documents in their work to collaborate, to record
|
|
280
|
+
results of experiments and computer simulations, and to verify
|
|
281
|
+
calculations. For such uses, mathematics on the Web must
|
|
282
|
+
provide a standard way of sharing information that can be
|
|
283
|
+
easily read, processed and generated using commonly available,
|
|
284
|
+
easy-to-use tools.</p>
|
|
285
|
+
|
|
286
|
+
<p>Another general design requirement is the ability to render
|
|
287
|
+
mathematical material in other media such as speech or
|
|
288
|
+
braille, which is extremely important for the visually
|
|
289
|
+
impaired.</p>
|
|
290
|
+
|
|
291
|
+
<p>Commercial publishers are also involved with mathematics on
|
|
292
|
+
the Web at all levels from electronic versions of print books
|
|
293
|
+
to interactive textbooks and academic journals. Publishers
|
|
294
|
+
require a method of putting mathematics on the Web that is
|
|
295
|
+
capable of high-quality output, robust enough for large-scale
|
|
296
|
+
commercial use, and preferably compatible with their previous,
|
|
297
|
+
often SGML-based, production systems.</p>
|
|
298
|
+
</div3>
|
|
299
|
+
|
|
300
|
+
<div3 id="intro_goals"><head>Design Goals of MathML</head>
|
|
301
|
+
|
|
302
|
+
<p>In order to meet the diverse needs of the scientific
|
|
303
|
+
community, MathML has been designed with the following
|
|
304
|
+
ultimate goals in mind.</p>
|
|
305
|
+
|
|
306
|
+
<p>MathML should:
|
|
307
|
+
<ulist>
|
|
308
|
+
<item>
|
|
309
|
+
<p>Encode mathematical material suitable for teaching
|
|
310
|
+
and scientific communication at all levels.</p>
|
|
311
|
+
</item>
|
|
312
|
+
<item>
|
|
313
|
+
<p>Encode both mathematical notation and mathematical meaning.</p>
|
|
314
|
+
</item>
|
|
315
|
+
<item>
|
|
316
|
+
<p>Facilitate conversion to and from other mathematical
|
|
317
|
+
formats, both presentational and semantic. Output formats should include:
|
|
318
|
+
<ulist>
|
|
319
|
+
<item>
|
|
320
|
+
<p>graphical displays</p>
|
|
321
|
+
</item>
|
|
322
|
+
<item>
|
|
323
|
+
<p>speech synthesizers</p>
|
|
324
|
+
</item>
|
|
325
|
+
<item>
|
|
326
|
+
<p>input for computer algebra systems</p>
|
|
327
|
+
</item>
|
|
328
|
+
<item>
|
|
329
|
+
<p>other mathematics typesetting languages, such as &TeX;</p>
|
|
330
|
+
</item>
|
|
331
|
+
<item>
|
|
332
|
+
<p>plain text displays, e.g. VT100 emulators</p>
|
|
333
|
+
</item>
|
|
334
|
+
<item>
|
|
335
|
+
<p>print media, including braille</p>
|
|
336
|
+
</item>
|
|
337
|
+
</ulist>
|
|
338
|
+
</p>
|
|
339
|
+
<p>It is recognized that conversion to and from other notational
|
|
340
|
+
systems or media may entail loss of information in the process.</p>
|
|
341
|
+
</item>
|
|
342
|
+
<item>
|
|
343
|
+
<p>Allow the passing of information intended for
|
|
344
|
+
specific renderers and applications.</p>
|
|
345
|
+
</item>
|
|
346
|
+
<item>
|
|
347
|
+
<p>Support efficient browsing of lengthy expressions.</p>
|
|
348
|
+
</item>
|
|
349
|
+
<item>
|
|
350
|
+
<p>Provide for extensibility.</p>
|
|
351
|
+
</item>
|
|
352
|
+
<item>
|
|
353
|
+
<p>Be well suited to template and other mathematics editing techniques.</p>
|
|
354
|
+
</item>
|
|
355
|
+
<item>
|
|
356
|
+
<p>Be human legible, and simple for software to generate and process.</p>
|
|
357
|
+
</item>
|
|
358
|
+
</ulist>
|
|
359
|
+
</p>
|
|
360
|
+
|
|
361
|
+
<p>No matter how successfully MathML may achieve its goals as
|
|
362
|
+
a markup language, it is clear that MathML will only be useful
|
|
363
|
+
if it is implemented well. To this end, the W3C Math Working
|
|
364
|
+
Group has identified a short list of additional implementation
|
|
365
|
+
goals. These goals attempt to describe concisely the minimal
|
|
366
|
+
functionality MathML rendering and processing software should
|
|
367
|
+
try to provide.
|
|
368
|
+
</p>
|
|
369
|
+
|
|
370
|
+
<ulist>
|
|
371
|
+
|
|
372
|
+
<item>
|
|
373
|
+
<p>MathML expressions in HTML (and XHTML) pages should render
|
|
374
|
+
properly in popular Web browsers, in accordance with reader and author
|
|
375
|
+
viewing preferences, and at the highest quality possible given the
|
|
376
|
+
capabilities of the platform.</p></item>
|
|
377
|
+
|
|
378
|
+
<item>
|
|
379
|
+
<p>HTML (and XHTML) documents containing MathML expressions should
|
|
380
|
+
print properly and at high-quality printer resolutions.</p></item>
|
|
381
|
+
|
|
382
|
+
<item>
|
|
383
|
+
<p>MathML expressions in Web pages should be able to react to
|
|
384
|
+
user gestures, such those as with a mouse, and to coordinate
|
|
385
|
+
communication with other applications through the
|
|
386
|
+
browser.</p></item>
|
|
387
|
+
|
|
388
|
+
<item>
|
|
389
|
+
<p>Mathematical expression editors and converters should be developed
|
|
390
|
+
to facilitate the creation of Web pages containing MathML
|
|
391
|
+
expressions.</p></item>
|
|
392
|
+
|
|
393
|
+
</ulist>
|
|
394
|
+
|
|
395
|
+
<p>These goals have begun to be addressed for the near term by using embedded
|
|
396
|
+
elements such as Java applets, plug-ins and ActiveX controls to render
|
|
397
|
+
MathML. However, the extent to which these goals are ultimately met depends on the
|
|
398
|
+
cooperation and support of browser vendors, and other software developers. The W3C
|
|
399
|
+
Math Working Group has continued to work with the working groups for the Document
|
|
400
|
+
Object Model (DOM) and the Extensible Style Language (XSL) to ensure that the
|
|
401
|
+
needs of the scientific community will be met in the future, and feels that MathML
|
|
402
|
+
2.0 shows considerable progress in this area over the situation that obtained at
|
|
403
|
+
the time of the MathML 1.0 Recommendation (April 1998) <bibref diff="add"
|
|
404
|
+
ref="MathML1"/>.</p>
|
|
405
|
+
|
|
406
|
+
</div3>
|
|
407
|
+
|
|
408
|
+
</div2>
|
|
409
|
+
|
|
410
|
+
<div2 id="intro_role"><head>The Role of MathML on the Web</head>
|
|
411
|
+
|
|
412
|
+
<div3><head>Layered Design of Mathematical Web Services</head>
|
|
413
|
+
|
|
414
|
+
<p>The design goals of MathML require a system for encoding
|
|
415
|
+
mathematical material for the Web which is flexible and
|
|
416
|
+
extensible, suitable for interaction with external software,
|
|
417
|
+
and capable of producing high-quality rendering in several
|
|
418
|
+
media. Any markup language that encodes enough information to
|
|
419
|
+
do all these tasks well will of necessity involve some
|
|
420
|
+
complexity.</p>
|
|
421
|
+
|
|
422
|
+
<p>At the same time, it is important for many groups, such as
|
|
423
|
+
students, to have simple ways to include mathematics in Web
|
|
424
|
+
pages by hand. Similarly, other groups, such as the &TeX;
|
|
425
|
+
community, would be best served by a system which allowed the
|
|
426
|
+
direct entry of markup languages like &TeX; into Web pages. In
|
|
427
|
+
general, specific user groups are better served by specialized
|
|
428
|
+
kinds of input and output tailored to their needs. Therefore,
|
|
429
|
+
the ideal system for communicating mathematics on the Web
|
|
430
|
+
should provide both specialized services for input and output,
|
|
431
|
+
and general services for interchange of information and
|
|
432
|
+
rendering to multiple media.</p>
|
|
433
|
+
|
|
434
|
+
<p>In practical terms, the observation that mathematics on the
|
|
435
|
+
Web should provide for both specialized and general needs
|
|
436
|
+
naturally leads to the idea of a layered architecture. One
|
|
437
|
+
layer consists of powerful, general software tools exchanging,
|
|
438
|
+
processing and rendering suitably encoded mathematical data. A
|
|
439
|
+
second layer consists of specialized software tools, aimed at
|
|
440
|
+
specific user groups, which are capable of easily generating
|
|
441
|
+
encoded mathematical data that can then be shared with a
|
|
442
|
+
particular audience.</p>
|
|
443
|
+
|
|
444
|
+
<p>MathML is designed to provide the encoding of mathematical
|
|
445
|
+
information for the bottom, more general layer in a two-layer
|
|
446
|
+
architecture. It is intended to encode complex notational and
|
|
447
|
+
semantic structure in an explicit, regular, and
|
|
448
|
+
easy-to-process way for renderers, searching and indexing
|
|
449
|
+
software, and other mathematical applications.</p>
|
|
450
|
+
|
|
451
|
+
<p>As a consequence, raw MathML markup is <emph>not</emph>
|
|
452
|
+
primarily intended for direct use by authors. While MathML is
|
|
453
|
+
human-readable, which helps a lot in debugging it, in all but
|
|
454
|
+
the simplest cases it is too verbose and error-prone for hand
|
|
455
|
+
generation. Instead, it is anticipated that authors will use
|
|
456
|
+
equation editors, conversion programs, and other specialized
|
|
457
|
+
software tools to generate MathML. Alternatively, some
|
|
458
|
+
renderers and systems supporting mathematics may convert other
|
|
459
|
+
kinds of input directly included in Web pages into MathML on
|
|
460
|
+
the fly, in response to a cut-and-paste operation, for
|
|
461
|
+
example.</p>
|
|
462
|
+
|
|
463
|
+
<p>In some ways, MathML is analogous to other low-level,
|
|
464
|
+
communication formats such as Adobe's PostScript language. You
|
|
465
|
+
can create PostScript files in a variety of ways, depending on
|
|
466
|
+
your needs; experts write and modify them by hand, authors
|
|
467
|
+
create them with word processors, graphic artists with
|
|
468
|
+
illustration programs, and so on. Once you have a PostScript
|
|
469
|
+
file, however, you can share it with a very large audience,
|
|
470
|
+
since devices which render PostScript, such as printers and
|
|
471
|
+
screen previewers, are widely available.</p>
|
|
472
|
+
|
|
473
|
+
<p>Part of the reason for designing MathML as a markup
|
|
474
|
+
language for a low-level, general, communication layer is to
|
|
475
|
+
stimulate mathematical Web software development in the layer
|
|
476
|
+
above. MathML provides a way of coordinating the development
|
|
477
|
+
of modular authoring tools and rendering software. By making
|
|
478
|
+
it easier to develop a functional piece of a larger system,
|
|
479
|
+
MathML can stimulate a <quote>critical mass</quote> of
|
|
480
|
+
software development, greatly to the benefit of potential
|
|
481
|
+
users of mathematics on the Web.</p>
|
|
482
|
+
|
|
483
|
+
<p>One can envision a similar situation for mathematical data.
|
|
484
|
+
Authors are free to create MathML documents using the tools
|
|
485
|
+
best suited to their needs. For example, a student might
|
|
486
|
+
prefer to use a menu-driven equation editor that can write out
|
|
487
|
+
MathML to an XHTML file. A researcher might use a computer
|
|
488
|
+
algebra package that automatically encodes the mathematical
|
|
489
|
+
content of an expression, so that it can be cut from a Web
|
|
490
|
+
page and evaluated by a colleague. An academic journal
|
|
491
|
+
publisher might use a program that converts &TeX; markup to
|
|
492
|
+
HTML and MathML. Regardless of the method used to create a Web
|
|
493
|
+
page containing MathML, once it exists, all the advantages of
|
|
494
|
+
a powerful and general communication layer become available. A
|
|
495
|
+
variety of MathML software could all be used with the same
|
|
496
|
+
document to render it in speech or print, to send it to a
|
|
497
|
+
computer algebra system, or to manage it as part of a large
|
|
498
|
+
Web document collection. To render high-quality printed
|
|
499
|
+
mathematics the MathML encoding will often be converted back
|
|
500
|
+
to standard typesetting and composition languages, including
|
|
501
|
+
&TeX; which is widely appreciated for the job it does in this
|
|
502
|
+
regard. Finally, one may expect that eventually MathML will be
|
|
503
|
+
integrated into other arenas where mathematical formulas
|
|
504
|
+
occur, such as spreadsheets, statistical packages and
|
|
505
|
+
engineering tools.</p>
|
|
506
|
+
|
|
507
|
+
<p>The W3C Math Working Group has been working with vendors to ensure
|
|
508
|
+
that a variety of MathML software will soon be available, including
|
|
509
|
+
both rendering and authoring tools. A current list of MathML software
|
|
510
|
+
is maintained on the <loc href="http://www.w3.org/Math/">public Math
|
|
511
|
+
page at the World Wide Web Consortium</loc>.</p>
|
|
512
|
+
</div3>
|
|
513
|
+
|
|
514
|
+
<div3><head>Relation to Other Web Technology</head>
|
|
515
|
+
|
|
516
|
+
<p>The original conception of an HTML Math was a simple,
|
|
517
|
+
straightforward extension to HTML that would be natively
|
|
518
|
+
implemented in browsers. However, very early on, the
|
|
519
|
+
explosive growth of the Web made it clear that a general
|
|
520
|
+
extension mechanism was required, and that mathematics was
|
|
521
|
+
only one of many kinds of structured data which would have to
|
|
522
|
+
be integrated into the Web using such a mechanism.</p>
|
|
523
|
+
|
|
524
|
+
<p>Given that MathML must integrate into the Web as an
|
|
525
|
+
extension, it is extremely important that MathML, and MathML
|
|
526
|
+
software, can interact well with the existing Web environment.
|
|
527
|
+
In particular, MathML has been designed with three kinds of
|
|
528
|
+
interaction in mind. First, in order to create mathematical
|
|
529
|
+
Web content, it is important that existing mathematical markup
|
|
530
|
+
languages can be converted to MathML, and that existing
|
|
531
|
+
authoring tools can be modified to generate MathML. Second,
|
|
532
|
+
it must be possible to embed MathML markup seamlessly in HTML
|
|
533
|
+
markup, as it evolves, in such a way that it will be
|
|
534
|
+
accessible to future browsers, search engines, and all the
|
|
535
|
+
kinds of Web applications which now manipulate HTML. Finally,
|
|
536
|
+
it must be possible to render MathML embedded in HTML in
|
|
537
|
+
today's Web browsers in some fashion, even if it is less than
|
|
538
|
+
ideal. As HTML evolves into XHTML, all the preceding requirements
|
|
539
|
+
become increasingly needed.</p>
|
|
540
|
+
|
|
541
|
+
<p id="intro_bidi">The World Wide Web is a fully international and
|
|
542
|
+
collaborative movement. Mathematics is a language used all
|
|
543
|
+
over the world. The mathematical notation in science
|
|
544
|
+
and engineering is embedded in a matrix of local natural
|
|
545
|
+
languages. The W3C strives to be a constructive force
|
|
546
|
+
in the spread of possibilities for communication throughout
|
|
547
|
+
the world. Therefore MathML will encounter problems
|
|
548
|
+
of internationalization. This version of MathML is
|
|
549
|
+
not knowingly incompatible with the needs of languages
|
|
550
|
+
which are written from left to right. However the
|
|
551
|
+
default orientation of MathML 2 is left-to-right, and
|
|
552
|
+
it is clear that the needs for the writing of
|
|
553
|
+
mathematical formulas embedded in some natural languages
|
|
554
|
+
may not yet be met. So-called bi-directional technology
|
|
555
|
+
is still in development, and better support for formulas
|
|
556
|
+
in that context must be a matter for future developers.
|
|
557
|
+
</p>
|
|
558
|
+
|
|
559
|
+
<div4><head>Existing Mathematical Markup Languages</head>
|
|
560
|
+
|
|
561
|
+
<p>Perhaps the most important influence on mathematical markup
|
|
562
|
+
languages of the last two decades is the &TeX; typesetting
|
|
563
|
+
system developed by Donald Knuth <bibref ref="Knuth1986"/>.
|
|
564
|
+
&TeX; is a de facto standard in the mathematical research
|
|
565
|
+
community, and it is pervasive in the scientific community at
|
|
566
|
+
large. &TeX; sets a standard for quality of visual rendering,
|
|
567
|
+
and a great deal of effort has gone into ensuring MathML can
|
|
568
|
+
provide the same visual rendering quality. Moreover, because
|
|
569
|
+
of the many legacy documents in &TeX;, and because of the
|
|
570
|
+
large authoring community versed in &TeX;, a priority in the
|
|
571
|
+
design of MathML was the ability to convert &TeX; mathematics
|
|
572
|
+
input into MathML format. The feasibility of such conversion
|
|
573
|
+
has been demonstrated by prototype software.</p>
|
|
574
|
+
|
|
575
|
+
<p>Extensive work on encoding mathematics has also been done
|
|
576
|
+
in the SGML community, and SGML-based encoding schemes are
|
|
577
|
+
widely used by commercial publishers. ISO 12083 is an
|
|
578
|
+
important markup language which contains a DTD fragment
|
|
579
|
+
primarily intended for describing the visual presentation of
|
|
580
|
+
mathematical notation. Because ISO 12083 mathematical notation
|
|
581
|
+
and its derivatives share many presentational aspects with
|
|
582
|
+
&TeX;, and because SGML enforces structure and regularity more
|
|
583
|
+
than &TeX;, much of the work in ensuring MathML is compatible
|
|
584
|
+
with &TeX; also applies well to ISO 12083.</p>
|
|
585
|
+
|
|
586
|
+
<p>MathML also pays particular attention to compatibility with
|
|
587
|
+
other mathematical software, and in particular, with computer
|
|
588
|
+
algebra systems. Many of the presentation elements of MathML
|
|
589
|
+
are derived in part from the mechanism of typesetting
|
|
590
|
+
boxes. The MathML content elements are heavily indebted to the
|
|
591
|
+
OpenMath project and the work by Stilo Technologies on a
|
|
592
|
+
mathematical DTD fragment. The OpenMath project has close ties
|
|
593
|
+
to both the SGML and computer algebra communities, and has
|
|
594
|
+
laid a foundation for an SGML- and XML-based means of
|
|
595
|
+
communication between mathematical software packages, amongst
|
|
596
|
+
other things. The feasibility of both generating and
|
|
597
|
+
interpreting MathML in computer algebra systems has been
|
|
598
|
+
demonstrated by prototype software.</p>
|
|
599
|
+
|
|
600
|
+
</div4>
|
|
601
|
+
|
|
602
|
+
<div4><head>HTML Extension Mechanisms</head>
|
|
603
|
+
|
|
604
|
+
<p>As noted above, the success of HTML has led to enormous
|
|
605
|
+
pressure to incorporate a wide variety of data types and
|
|
606
|
+
software applications into the Web. Each new format or
|
|
607
|
+
application potentially places new demands on HTML and on
|
|
608
|
+
browser vendors. For some time, it has been clear that a
|
|
609
|
+
general extension mechanism is necessary to accommodate new
|
|
610
|
+
extensions to HTML. At the very beginning, the working group
|
|
611
|
+
began its work thinking of a plain extension to HTML in the
|
|
612
|
+
spirit of the first mathematics support suggested for HTML
|
|
613
|
+
3.2. But for a good number of reasons, once we got into the
|
|
614
|
+
details, this proved to be not so good an idea. Since work
|
|
615
|
+
first began on MathML, XML <bibref ref="XML"/>,
|
|
616
|
+
has emerged as the dominant such
|
|
617
|
+
general extension mechanism.</p>
|
|
618
|
+
|
|
619
|
+
<p>XML stands for Extensible Markup Language. It is designed as a
|
|
620
|
+
simplified version of SGML, the meta-language used to define the
|
|
621
|
+
grammar and syntax of HTML. One of the goals of XML is to be suitable
|
|
622
|
+
for use on the Web, and in the context of this discussion it can be
|
|
623
|
+
viewed as the general mechanism for extending HTML. As its name
|
|
624
|
+
implies, extensibility is a key feature of XML; authors are free to
|
|
625
|
+
declare and use new elements and attributes. At the same time, XML
|
|
626
|
+
grammar and syntax rules carefully enforce regular document structure
|
|
627
|
+
to facilitate automatic processing and maintenance of large document
|
|
628
|
+
collections. Mathematically speaking XML is essentially a notation for
|
|
629
|
+
decorated rooted planar trees, and thus of great generality as an
|
|
630
|
+
encoding tool. </p>
|
|
631
|
+
|
|
632
|
+
<p>Since the setting up of the first W3C Math Working Group,
|
|
633
|
+
XML has garnered broad industry support, including that of
|
|
634
|
+
major browser vendors. The migration of HTML to an XML form
|
|
635
|
+
has been important to the W3C, and has resulted in the XHTML
|
|
636
|
+
Recommendation which delivers a new modularized form of HTML.
|
|
637
|
+
MathML can be viewed as another module which fits very well
|
|
638
|
+
with the new XHTML. Indeed in <specref ref="parsing_module"/>
|
|
639
|
+
there is a new DTD for mathematics which is the result of
|
|
640
|
+
collaboration with the W3C HTML Working Group.</p>
|
|
641
|
+
|
|
642
|
+
<p>Furthermore, other applications of XML for all kinds of
|
|
643
|
+
document publishing and processing promise to become
|
|
644
|
+
increasingly important. Consequently, both on theoretical and
|
|
645
|
+
pragmatic grounds, it has made a great deal of sense to
|
|
646
|
+
specify MathML as an XML application.</p>
|
|
647
|
+
|
|
648
|
+
</div4>
|
|
649
|
+
|
|
650
|
+
<div4><head>Browser Extension Mechanisms</head>
|
|
651
|
+
|
|
652
|
+
<p>By now, as opposed to the situation when the
|
|
653
|
+
<phrase diff="chg">MathML 1.0 Recommendation <bibref diff="add" ref="MathML1"/></phrase> was adopted, the
|
|
654
|
+
details of a general model for rendering and processing XML
|
|
655
|
+
extensions to HTML are largely clear. Formatting Properties,
|
|
656
|
+
developed by the Cascading Style Sheets and Formatting
|
|
657
|
+
Properties Working Group for CSS and made available through
|
|
658
|
+
the Document Object Model (DOM), will be applied to MathML
|
|
659
|
+
elements to obtain stylistic control over the presentation of
|
|
660
|
+
MathML. Further development of these Formatting Properties
|
|
661
|
+
falls within the charters of both the CSS&FP and the XSL
|
|
662
|
+
working groups. For an introduction to this topic see the
|
|
663
|
+
discussion in <specref ref="interf"/>. For detailed
|
|
664
|
+
commentary on how to render MathML with current systems
|
|
665
|
+
consult the
|
|
666
|
+
<loc href="http://www.w3.org/Math/">W3C Math WG Home Page</loc>.</p>
|
|
667
|
+
|
|
668
|
+
<p>Until style sheet mechanisms are capable of delivering
|
|
669
|
+
native browser rendering of MathML, however, it is necessary
|
|
670
|
+
to extend browser capabilities by using embedded elements to
|
|
671
|
+
render MathML. It is already possible to instruct a browser to
|
|
672
|
+
use a particular embedded renderer to process embedded XML
|
|
673
|
+
markup such as MathML, and to coordinate the resulting output
|
|
674
|
+
with the surrounding Web page, however the results are not yet
|
|
675
|
+
entirely as one wishes. See <specref ref="interf"/>.</p>
|
|
676
|
+
|
|
677
|
+
<p>For specialized processing, such as connecting to a
|
|
678
|
+
computer algebra system, the capability of calling out to
|
|
679
|
+
other programs is likely to remain highly desirable. However,
|
|
680
|
+
for such an interaction to be really satisfactory, it is
|
|
681
|
+
necessary to define a document object model rich enough to
|
|
682
|
+
facilitate complicated interactions between browsers and
|
|
683
|
+
embedded elements. For this reason, the W3C Math Working Group
|
|
684
|
+
has coordinated its efforts closely with the Document Object
|
|
685
|
+
Model (DOM) Working Group. The results are described in
|
|
686
|
+
<specref ref="dom-intro"/>.</p>
|
|
687
|
+
|
|
688
|
+
<p>For processing by embedded elements, and for
|
|
689
|
+
inter-communication between scientific software generally, a
|
|
690
|
+
style sheet-based layout model is in some ways less than
|
|
691
|
+
ideal. It can impose an additional implementation burden in a
|
|
692
|
+
setting where it may offer few advantages, and it imposes
|
|
693
|
+
implementation requirements for coordination between browsers
|
|
694
|
+
and embedded renderers that will likely be unavailable in the
|
|
695
|
+
immediate future.</p>
|
|
696
|
+
|
|
697
|
+
<p>For these reasons, the MathML specification defines an
|
|
698
|
+
attribute-based layout model, which has proven very effective
|
|
699
|
+
for high-quality rendering of complicated mathematical
|
|
700
|
+
expressions in several independent implementations. MathML
|
|
701
|
+
presentation attributes utilize W3C Formatting Properties
|
|
702
|
+
where possible. Also, MathML elements accept <att>class</att>, <att>style</att> and <att>id</att> attributes to facilitate their use with
|
|
703
|
+
CSS style sheets. However, at present, there are few settings
|
|
704
|
+
where CSS machinery is currently available to MathML
|
|
705
|
+
renderers. </p>
|
|
706
|
+
|
|
707
|
+
<p>The use of CSS style sheet mechanisms has been mentioned
|
|
708
|
+
above. The mechanisms of XSL have also recently become
|
|
709
|
+
available for the transformation of XML documents to effect
|
|
710
|
+
their rendering. Indeed the alternative forms of this present
|
|
711
|
+
recommendation, including the definitive public HTML version,
|
|
712
|
+
have been prepared from an underlying XML source using XSL
|
|
713
|
+
transformation language tools. As further developments in
|
|
714
|
+
this direction become available to MathML, it is anticipated
|
|
715
|
+
their use will become the dominant method of stylistic control
|
|
716
|
+
of MathML presentation meant for use in rendering environments
|
|
717
|
+
which support those mechanisms.</p>
|
|
718
|
+
</div4>
|
|
719
|
+
</div3>
|
|
720
|
+
</div2>
|
|
721
|
+
</div1>
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|