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
data/lib/mml/base/ms.rb
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Ms
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathbackground, :string
|
|
11
|
+
attribute :mathvariant, :string
|
|
12
|
+
attribute :mathcolor, :string
|
|
13
|
+
attribute :mathsize, :string
|
|
14
|
+
attribute :lquote, :string
|
|
15
|
+
attribute :rquote, :string
|
|
16
|
+
attribute :value, :string
|
|
17
|
+
|
|
18
|
+
xml do
|
|
19
|
+
namespace Mml::Namespace
|
|
20
|
+
element "ms"
|
|
21
|
+
mixed_content
|
|
22
|
+
|
|
23
|
+
map_content to: :value
|
|
24
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
25
|
+
map_attribute "mathvariant", to: :mathvariant
|
|
26
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
27
|
+
map_attribute "mathsize", to: :mathsize
|
|
28
|
+
map_attribute "lquote", to: :lquote, render_empty: true
|
|
29
|
+
map_attribute "rquote", to: :rquote, render_empty: true
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Mscarries
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :scriptsizemultiplier, :float
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :mathcolor, :string
|
|
13
|
+
attribute :position, :integer
|
|
14
|
+
attribute :location, :string
|
|
15
|
+
attribute :crossout, :string
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
namespace Mml::Namespace
|
|
19
|
+
element "mscarries"
|
|
20
|
+
mixed_content
|
|
21
|
+
|
|
22
|
+
map_attribute "scriptsizemultiplier", to: :scriptsizemultiplier
|
|
23
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
24
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
25
|
+
map_attribute "position", to: :position
|
|
26
|
+
map_attribute "location", to: :location
|
|
27
|
+
map_attribute "crossout", to: :crossout
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Mscarry
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :location, :string
|
|
13
|
+
attribute :crossout, :string
|
|
14
|
+
|
|
15
|
+
xml do
|
|
16
|
+
namespace Mml::Namespace
|
|
17
|
+
element "mscarry"
|
|
18
|
+
mixed_content
|
|
19
|
+
|
|
20
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
21
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
22
|
+
map_attribute "location", to: :location
|
|
23
|
+
map_attribute "crossout", to: :crossout
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Msgroup
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :position, :integer
|
|
13
|
+
attribute :shift, :integer
|
|
14
|
+
attribute :msgroup_text, :string
|
|
15
|
+
|
|
16
|
+
xml do
|
|
17
|
+
namespace Mml::Namespace
|
|
18
|
+
element "msgroup"
|
|
19
|
+
mixed_content
|
|
20
|
+
|
|
21
|
+
map_content to: :msgroup_text
|
|
22
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
23
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
24
|
+
map_attribute "position", to: :position
|
|
25
|
+
map_attribute "shift", to: :shift
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Msline
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :position, :integer
|
|
13
|
+
attribute :length, :integer
|
|
14
|
+
attribute :leftoverhang, :string
|
|
15
|
+
attribute :rightoverhang, :string
|
|
16
|
+
attribute :mslinethickness, :string
|
|
17
|
+
|
|
18
|
+
xml do
|
|
19
|
+
namespace Mml::Namespace
|
|
20
|
+
element "msline"
|
|
21
|
+
|
|
22
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
23
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
24
|
+
map_attribute "position", to: :position
|
|
25
|
+
map_attribute "length", to: :length
|
|
26
|
+
map_attribute "leftoverhang", to: :leftoverhang
|
|
27
|
+
map_attribute "rightoverhang", to: :rightoverhang
|
|
28
|
+
map_attribute "mslinethickness", to: :mslinethickness
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Mspace
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :mathvariant, :string
|
|
13
|
+
attribute :mathsize, :string
|
|
14
|
+
attribute :dir, :string
|
|
15
|
+
attribute :width, :string
|
|
16
|
+
attribute :height, :string
|
|
17
|
+
attribute :depth, :string
|
|
18
|
+
attribute :linebreak, :string
|
|
19
|
+
attribute :indentalign, :string
|
|
20
|
+
attribute :indentshift, :string
|
|
21
|
+
attribute :indenttarget, :string
|
|
22
|
+
attribute :indentalignfirst, :string
|
|
23
|
+
attribute :indentshiftfirst, :string
|
|
24
|
+
attribute :indentalignlast, :string
|
|
25
|
+
attribute :indentshiftlast, :string
|
|
26
|
+
|
|
27
|
+
xml do
|
|
28
|
+
namespace Mml::Namespace
|
|
29
|
+
element "mspace"
|
|
30
|
+
|
|
31
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
32
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
33
|
+
map_attribute "mathvariant", to: :mathvariant
|
|
34
|
+
map_attribute "mathsize", to: :mathsize
|
|
35
|
+
map_attribute "dir", to: :dir
|
|
36
|
+
map_attribute "width", to: :width
|
|
37
|
+
map_attribute "height", to: :height
|
|
38
|
+
map_attribute "depth", to: :depth
|
|
39
|
+
map_attribute "linebreak", to: :linebreak
|
|
40
|
+
map_attribute "indentalign", to: :indentalign
|
|
41
|
+
map_attribute "indentshift", to: :indentshift
|
|
42
|
+
map_attribute "indenttarget", to: :indenttarget
|
|
43
|
+
map_attribute "indentalignfirst", to: :indentalignfirst
|
|
44
|
+
map_attribute "indentshiftfirst", to: :indentshiftfirst
|
|
45
|
+
map_attribute "indentalignlast", to: :indentalignlast
|
|
46
|
+
map_attribute "indentshiftlast", to: :indentshiftlast
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Msqrt
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
|
|
13
|
+
xml do
|
|
14
|
+
namespace Mml::Namespace
|
|
15
|
+
element "msqrt"
|
|
16
|
+
mixed_content
|
|
17
|
+
|
|
18
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
19
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Msrow
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :position, :integer
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
namespace Mml::Namespace
|
|
16
|
+
element "msrow"
|
|
17
|
+
mixed_content
|
|
18
|
+
|
|
19
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
20
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
21
|
+
map_attribute "position", to: :position
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Mstack
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :align, :string
|
|
13
|
+
attribute :stackalign, :string
|
|
14
|
+
attribute :charalign, :string
|
|
15
|
+
attribute :charspacing, :string
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
namespace Mml::Namespace
|
|
19
|
+
element "mstack"
|
|
20
|
+
mixed_content
|
|
21
|
+
|
|
22
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
23
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
24
|
+
map_attribute "align", to: :align
|
|
25
|
+
map_attribute "stackalign", to: :stackalign
|
|
26
|
+
map_attribute "charalign", to: :charalign
|
|
27
|
+
map_attribute "charspacing", to: :charspacing
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Mstyle
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
include UniversalPresentationAttributes
|
|
11
|
+
|
|
12
|
+
attribute :scriptsizemultiplier, :integer
|
|
13
|
+
attribute :scriptminsize, :string
|
|
14
|
+
attribute :infixlinebreakstyle, :string
|
|
15
|
+
attribute :decimalpoint, :string
|
|
16
|
+
attribute :accent, :string
|
|
17
|
+
attribute :accentunder, :string
|
|
18
|
+
attribute :align, :string
|
|
19
|
+
attribute :alignmentscope, :string
|
|
20
|
+
attribute :bevelled, :string
|
|
21
|
+
attribute :charalign, :string
|
|
22
|
+
attribute :charspacing, :string
|
|
23
|
+
attribute :close, :string
|
|
24
|
+
attribute :columnalign, :string
|
|
25
|
+
attribute :columnlines, :string
|
|
26
|
+
attribute :columnspacing, :string
|
|
27
|
+
attribute :columnspan, :integer
|
|
28
|
+
attribute :columnwidth, :string
|
|
29
|
+
attribute :crossout, :string
|
|
30
|
+
attribute :denomalign, :string
|
|
31
|
+
attribute :depth, :string
|
|
32
|
+
attribute :edge, :string
|
|
33
|
+
attribute :equalcolumns, :string
|
|
34
|
+
attribute :equalrows, :string
|
|
35
|
+
attribute :form, :string
|
|
36
|
+
attribute :frame, :string
|
|
37
|
+
attribute :framespacing, :string
|
|
38
|
+
attribute :height, :string
|
|
39
|
+
attribute :indentalign, :string
|
|
40
|
+
attribute :indentalignfirst, :string
|
|
41
|
+
attribute :indentalignlast, :string
|
|
42
|
+
attribute :indentshift, :string
|
|
43
|
+
attribute :indentshiftfirst, :string
|
|
44
|
+
attribute :indentshiftlast, :string
|
|
45
|
+
attribute :indenttarget, :string
|
|
46
|
+
attribute :largeop, :string
|
|
47
|
+
attribute :leftoverhang, :string
|
|
48
|
+
attribute :length, :integer
|
|
49
|
+
attribute :linebreak, :string
|
|
50
|
+
attribute :linebreakmultchar, :string
|
|
51
|
+
attribute :linebreakstyle, :string
|
|
52
|
+
attribute :lineleading, :string
|
|
53
|
+
attribute :linethickness, :string
|
|
54
|
+
attribute :location, :string
|
|
55
|
+
attribute :longdivstyle, :string
|
|
56
|
+
attribute :lquote, :string
|
|
57
|
+
attribute :lspace, :string
|
|
58
|
+
attribute :mathsize, :string
|
|
59
|
+
attribute :mathvariant, :string
|
|
60
|
+
attribute :maxsize, :string
|
|
61
|
+
attribute :minsize, :string
|
|
62
|
+
attribute :movablelimits, :string
|
|
63
|
+
attribute :mslinethickness, :string
|
|
64
|
+
attribute :notation, :string
|
|
65
|
+
attribute :numalign, :string
|
|
66
|
+
attribute :open, :string
|
|
67
|
+
attribute :position, :integer
|
|
68
|
+
attribute :rightoverhang, :string
|
|
69
|
+
attribute :rowalign, :string
|
|
70
|
+
attribute :rowlines, :string
|
|
71
|
+
attribute :rowspacing, :string
|
|
72
|
+
attribute :rowspan, :integer
|
|
73
|
+
attribute :rquote, :string
|
|
74
|
+
attribute :rspace, :string
|
|
75
|
+
attribute :selection, :integer
|
|
76
|
+
attribute :separators, :string
|
|
77
|
+
attribute :shift, :integer
|
|
78
|
+
attribute :stackalign, :string
|
|
79
|
+
attribute :stretchy, :string
|
|
80
|
+
attribute :subscriptshift, :string
|
|
81
|
+
attribute :superscriptshift, :string
|
|
82
|
+
attribute :symmetric, :string
|
|
83
|
+
attribute :valign, :string
|
|
84
|
+
attribute :width, :string
|
|
85
|
+
attribute :veryverythinmathspace, :string
|
|
86
|
+
attribute :verythinmathspace, :string
|
|
87
|
+
attribute :thinmathspace, :string
|
|
88
|
+
attribute :mediummathspace, :string
|
|
89
|
+
attribute :thickmathspace, :string
|
|
90
|
+
attribute :verythickmathspace, :string
|
|
91
|
+
attribute :veryverythickmathspace, :string
|
|
92
|
+
|
|
93
|
+
# rubocop:disable Metrics/BlockLength
|
|
94
|
+
xml do
|
|
95
|
+
namespace Mml::Namespace
|
|
96
|
+
element "mstyle"
|
|
97
|
+
mixed_content
|
|
98
|
+
|
|
99
|
+
map_attribute "scriptsizemultiplier", to: :scriptsizemultiplier
|
|
100
|
+
map_attribute "scriptminsize", to: :scriptminsize
|
|
101
|
+
map_attribute "infixlinebreakstyle", to: :infixlinebreakstyle
|
|
102
|
+
map_attribute "decimalpoint", to: :decimalpoint
|
|
103
|
+
map_attribute "accent", to: :accent
|
|
104
|
+
map_attribute "accentunder", to: :accentunder
|
|
105
|
+
map_attribute "align", to: :align
|
|
106
|
+
map_attribute "alignmentscope", to: :alignmentscope
|
|
107
|
+
map_attribute "bevelled", to: :bevelled
|
|
108
|
+
map_attribute "charalign", to: :charalign
|
|
109
|
+
map_attribute "charspacing", to: :charspacing
|
|
110
|
+
map_attribute "close", to: :close
|
|
111
|
+
map_attribute "columnalign", to: :columnalign
|
|
112
|
+
map_attribute "columnlines", to: :columnlines
|
|
113
|
+
map_attribute "columnspacing", to: :columnspacing
|
|
114
|
+
map_attribute "columnspan", to: :columnspan
|
|
115
|
+
map_attribute "columnwidth", to: :columnwidth
|
|
116
|
+
map_attribute "crossout", to: :crossout
|
|
117
|
+
map_attribute "denomalign", to: :denomalign
|
|
118
|
+
map_attribute "depth", to: :depth
|
|
119
|
+
map_attribute "edge", to: :edge
|
|
120
|
+
map_attribute "equalcolumns", to: :equalcolumns
|
|
121
|
+
map_attribute "equalrows", to: :equalrows
|
|
122
|
+
map_attribute "form", to: :form
|
|
123
|
+
map_attribute "frame", to: :frame
|
|
124
|
+
map_attribute "framespacing", to: :framespacing
|
|
125
|
+
map_attribute "height", to: :height
|
|
126
|
+
map_attribute "indentalign", to: :indentalign
|
|
127
|
+
map_attribute "indentalignfirst", to: :indentalignfirst
|
|
128
|
+
map_attribute "indentalignlast", to: :indentalignlast
|
|
129
|
+
map_attribute "indentshift", to: :indentshift
|
|
130
|
+
map_attribute "indentshiftfirst", to: :indentshiftfirst
|
|
131
|
+
map_attribute "indentshiftlast", to: :indentshiftlast
|
|
132
|
+
map_attribute "indenttarget", to: :indenttarget
|
|
133
|
+
map_attribute "largeop", to: :largeop
|
|
134
|
+
map_attribute "leftoverhang", to: :leftoverhang
|
|
135
|
+
map_attribute "length", to: :length
|
|
136
|
+
map_attribute "linebreak", to: :linebreak
|
|
137
|
+
map_attribute "linebreakmultchar", to: :linebreakmultchar
|
|
138
|
+
map_attribute "linebreakstyle", to: :linebreakstyle
|
|
139
|
+
map_attribute "lineleading", to: :lineleading
|
|
140
|
+
map_attribute "linethickness", to: :linethickness
|
|
141
|
+
map_attribute "location", to: :location
|
|
142
|
+
map_attribute "longdivstyle", to: :longdivstyle
|
|
143
|
+
map_attribute "lquote", to: :lquote
|
|
144
|
+
map_attribute "lspace", to: :lspace
|
|
145
|
+
map_attribute "mathsize", to: :mathsize
|
|
146
|
+
map_attribute "mathvariant", to: :mathvariant
|
|
147
|
+
map_attribute "maxsize", to: :maxsize
|
|
148
|
+
map_attribute "minsize", to: :minsize
|
|
149
|
+
map_attribute "movablelimits", to: :movablelimits
|
|
150
|
+
map_attribute "mslinethickness", to: :mslinethickness
|
|
151
|
+
map_attribute "notation", to: :notation
|
|
152
|
+
map_attribute "numalign", to: :numalign
|
|
153
|
+
map_attribute "open", to: :open
|
|
154
|
+
map_attribute "position", to: :position
|
|
155
|
+
map_attribute "rightoverhang", to: :rightoverhang
|
|
156
|
+
map_attribute "rowalign", to: :rowalign
|
|
157
|
+
map_attribute "rowlines", to: :rowlines
|
|
158
|
+
map_attribute "rowspacing", to: :rowspacing
|
|
159
|
+
map_attribute "rowspan", to: :rowspan
|
|
160
|
+
map_attribute "rquote", to: :rquote
|
|
161
|
+
map_attribute "rspace", to: :rspace
|
|
162
|
+
map_attribute "selection", to: :selection
|
|
163
|
+
map_attribute "separators", to: :separators
|
|
164
|
+
map_attribute "shift", to: :shift
|
|
165
|
+
map_attribute "stackalign", to: :stackalign
|
|
166
|
+
map_attribute "stretchy", to: :stretchy
|
|
167
|
+
map_attribute "subscriptshift", to: :subscriptshift
|
|
168
|
+
map_attribute "superscriptshift", to: :superscriptshift
|
|
169
|
+
map_attribute "symmetric", to: :symmetric
|
|
170
|
+
map_attribute "valign", to: :valign
|
|
171
|
+
map_attribute "width", to: :width
|
|
172
|
+
map_attribute "veryverythinmathspace", to: :veryverythinmathspace
|
|
173
|
+
map_attribute "verythinmathspace", to: :verythinmathspace
|
|
174
|
+
map_attribute "thinmathspace", to: :thinmathspace
|
|
175
|
+
map_attribute "mediummathspace", to: :mediummathspace
|
|
176
|
+
map_attribute "thickmathspace", to: :thickmathspace
|
|
177
|
+
map_attribute "verythickmathspace", to: :verythickmathspace
|
|
178
|
+
map_attribute "veryverythickmathspace", to: :veryverythickmathspace
|
|
179
|
+
end
|
|
180
|
+
# rubocop:enable Metrics/BlockLength
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Msub
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathbackground, :string
|
|
11
|
+
attribute :subscriptshift, :string
|
|
12
|
+
attribute :mathcolor, :string
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
namespace Mml::Namespace
|
|
16
|
+
element "msub"
|
|
17
|
+
mixed_content
|
|
18
|
+
|
|
19
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
20
|
+
map_attribute "subscriptshift", to: :subscriptshift
|
|
21
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Msubsup
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :subscriptshift, :string
|
|
13
|
+
attribute :superscriptshift, :string
|
|
14
|
+
|
|
15
|
+
xml do
|
|
16
|
+
namespace Mml::Namespace
|
|
17
|
+
element "msubsup"
|
|
18
|
+
mixed_content
|
|
19
|
+
|
|
20
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
21
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
22
|
+
map_attribute "subscriptshift", to: :subscriptshift
|
|
23
|
+
map_attribute "superscriptshift", to: :superscriptshift
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Msup
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :superscriptshift, :string
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
namespace Mml::Namespace
|
|
16
|
+
element "msup"
|
|
17
|
+
mixed_content
|
|
18
|
+
|
|
19
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
20
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
21
|
+
map_attribute "superscriptshift", to: :superscriptshift
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Mtable
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :align, :string
|
|
13
|
+
attribute :rowalign, :string
|
|
14
|
+
attribute :columnalign, :string
|
|
15
|
+
attribute :alignmentscope, :string
|
|
16
|
+
attribute :groupalign, :string
|
|
17
|
+
attribute :displaystyle, :string
|
|
18
|
+
attribute :scriptlevel, :string
|
|
19
|
+
attribute :columnwidth, :string
|
|
20
|
+
attribute :width, :string
|
|
21
|
+
attribute :rowspacing, :string
|
|
22
|
+
attribute :columnspacing, :string
|
|
23
|
+
attribute :rowlines, :string
|
|
24
|
+
attribute :columnlines, :string
|
|
25
|
+
attribute :frame, :string
|
|
26
|
+
attribute :framespacing, :string
|
|
27
|
+
attribute :equalrows, :string
|
|
28
|
+
attribute :equalcolumns, :string
|
|
29
|
+
attribute :side, :string
|
|
30
|
+
attribute :mlabeledtr_value, :mlabeledtr, collection: true
|
|
31
|
+
attribute :mtr_value, :mtr, collection: true
|
|
32
|
+
|
|
33
|
+
xml do
|
|
34
|
+
namespace Mml::Namespace
|
|
35
|
+
element "mtable"
|
|
36
|
+
mixed_content
|
|
37
|
+
|
|
38
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
39
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
40
|
+
map_attribute "align", to: :align
|
|
41
|
+
map_attribute "rowalign", to: :rowalign
|
|
42
|
+
map_attribute "columnalign", to: :columnalign
|
|
43
|
+
map_attribute "alignmentscope", to: :alignmentscope
|
|
44
|
+
map_attribute "groupalign", to: :groupalign
|
|
45
|
+
map_attribute "displaystyle", to: :displaystyle
|
|
46
|
+
map_attribute "scriptlevel", to: :scriptlevel
|
|
47
|
+
map_attribute "columnwidth", to: :columnwidth
|
|
48
|
+
map_attribute "width", to: :width
|
|
49
|
+
map_attribute "rowspacing", to: :rowspacing
|
|
50
|
+
map_attribute "columnspacing", to: :columnspacing
|
|
51
|
+
map_attribute "rowlines", to: :rowlines
|
|
52
|
+
map_attribute "columnlines", to: :columnlines
|
|
53
|
+
map_attribute "frame", to: :frame
|
|
54
|
+
map_attribute "framespacing", to: :framespacing
|
|
55
|
+
map_attribute "equalrows", to: :equalrows
|
|
56
|
+
map_attribute "equalcolumns", to: :equalcolumns
|
|
57
|
+
map_attribute "side", to: :side
|
|
58
|
+
map_element "mlabeledtr", to: :mlabeledtr_value
|
|
59
|
+
map_element "mtr", to: :mtr_value
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
data/lib/mml/base/mtd.rb
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Mtd
|
|
6
|
+
# NOTE: class_eval resolves constants in module's lexical scope.
|
|
7
|
+
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
12
|
+
attribute :rowalign, :string
|
|
13
|
+
attribute :columnalign, :string
|
|
14
|
+
attribute :groupalign, :string
|
|
15
|
+
attribute :rowspan, :integer
|
|
16
|
+
attribute :columnspan, :integer
|
|
17
|
+
|
|
18
|
+
xml do
|
|
19
|
+
namespace Mml::Namespace
|
|
20
|
+
element "mtd"
|
|
21
|
+
mixed_content
|
|
22
|
+
|
|
23
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
24
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
25
|
+
map_attribute "rowalign", to: :rowalign
|
|
26
|
+
map_attribute "columnalign", to: :columnalign
|
|
27
|
+
map_attribute "groupalign", to: :groupalign
|
|
28
|
+
map_attribute "rowspan", to: :rowspan
|
|
29
|
+
map_attribute "columnspan", to: :columnspan
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|