mml 2.3.0 → 2.3.2
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 +83 -18
- data/Gemfile +0 -2
- data/README.adoc +176 -47
- data/Rakefile +16 -1
- data/lib/mml/base/common_attributes.rb +44 -0
- data/lib/mml/base/content/annotation.rb +28 -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 +22 -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/maction.rb +1 -0
- data/lib/mml/base/math.rb +47 -0
- data/lib/mml/base/menclose.rb +1 -1
- data/lib/mml/base/mfenced.rb +2 -2
- data/lib/mml/base/mglyph.rb +2 -2
- data/lib/mml/base/mi.rb +9 -6
- data/lib/mml/base/mlabeledtr.rb +2 -6
- data/lib/mml/base/mn.rb +3 -2
- data/lib/mml/base/mo.rb +3 -3
- data/lib/mml/base/mrow.rb +0 -2
- data/lib/mml/base/ms.rb +4 -6
- data/lib/mml/base/mscarries.rb +1 -1
- data/lib/mml/base/mspace.rb +0 -2
- data/lib/mml/base/mstyle.rb +4 -8
- data/lib/mml/base/mtable.rb +8 -0
- data/lib/mml/base/mtd.rb +6 -0
- data/lib/mml/base/mtext.rb +0 -2
- data/lib/mml/base/semantics.rb +4 -2
- data/lib/mml/base/universal_presentation_attributes.rb +46 -0
- data/lib/mml/base/v3_common.rb +16 -0
- data/lib/mml/base/v3_presentation_attributes.rb +15 -0
- data/lib/mml/base/v4_attributes.rb +4 -18
- data/lib/mml/base.rb +11 -0
- data/lib/mml/common_elements.rb +336 -0
- data/lib/mml/context_configuration.rb +29 -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 +34 -0
- 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 +1 -1
- data/lib/mml/v3/math.rb +7 -1
- data/lib/mml/v3/mi.rb +1 -0
- data/lib/mml/v3/mn.rb +1 -0
- data/lib/mml/v3/mo.rb +1 -0
- data/lib/mml/v3/mrow.rb +1 -0
- data/lib/mml/v3/ms.rb +1 -0
- data/lib/mml/v3/mstyle.rb +1 -0
- data/lib/mml/v3/mtext.rb +1 -0
- data/lib/mml/v3/relations.rb +50 -0
- 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 +25 -0
- data/lib/mml/v4/a.rb +4 -3
- 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 +33 -0
- 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 +1 -2
- data/lib/mml/v4/maligngroup.rb +0 -1
- data/lib/mml/v4/malignmark.rb +0 -1
- data/lib/mml/v4/math.rb +1 -1
- data/lib/mml/v4/menclose.rb +0 -1
- data/lib/mml/v4/merror.rb +0 -1
- data/lib/mml/v4/mfenced.rb +0 -1
- data/lib/mml/v4/mfrac.rb +0 -1
- data/lib/mml/v4/mfraction.rb +0 -1
- data/lib/mml/v4/mglyph.rb +0 -1
- data/lib/mml/v4/mi.rb +1 -1
- data/lib/mml/v4/mlabeledtr.rb +0 -1
- data/lib/mml/v4/mlongdiv.rb +0 -1
- data/lib/mml/v4/mmultiscripts.rb +0 -1
- data/lib/mml/v4/mn.rb +1 -1
- data/lib/mml/v4/mo.rb +1 -1
- data/lib/mml/v4/mover.rb +0 -1
- data/lib/mml/v4/mpadded.rb +0 -1
- data/lib/mml/v4/mphantom.rb +0 -1
- data/lib/mml/v4/mprescripts.rb +0 -1
- data/lib/mml/v4/mroot.rb +0 -1
- data/lib/mml/v4/mrow.rb +1 -1
- data/lib/mml/v4/ms.rb +1 -1
- data/lib/mml/v4/mscarries.rb +0 -1
- data/lib/mml/v4/mscarry.rb +0 -1
- data/lib/mml/v4/msgroup.rb +0 -1
- data/lib/mml/v4/msline.rb +0 -1
- data/lib/mml/v4/mspace.rb +0 -1
- data/lib/mml/v4/msqrt.rb +0 -1
- data/lib/mml/v4/msrow.rb +0 -1
- data/lib/mml/v4/mstack.rb +0 -1
- data/lib/mml/v4/mstyle.rb +1 -1
- data/lib/mml/v4/msub.rb +0 -1
- data/lib/mml/v4/msubsup.rb +0 -1
- data/lib/mml/v4/msup.rb +0 -1
- data/lib/mml/v4/mtable.rb +0 -1
- data/lib/mml/v4/mtd.rb +0 -1
- data/lib/mml/v4/mtext.rb +1 -1
- data/lib/mml/v4/mtr.rb +0 -1
- data/lib/mml/v4/munder.rb +0 -1
- data/lib/mml/v4/munderover.rb +0 -1
- data/lib/mml/v4/none.rb +0 -1
- data/lib/mml/v4/relations.rb +37 -0
- data/lib/mml/v4/semantics.rb +0 -1
- 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 +421 -44
- data/lib/mml/version.rb +1 -1
- data/lib/mml/versioned_parser.rb +1 -1
- data/lib/mml.rb +3 -1
- 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 +17 -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/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
- data/schemas/mathml4/mathml4-content.rnc +382 -0
- data/schemas/mathml4/mathml4-core.rnc +361 -0
- data/schemas/mathml4/mathml4-presentation.rnc +358 -0
- data/schemas/mathml4/mathml4-strict-content.rnc +86 -0
- data/schemas/mathml4/mathml4.rnc +21 -0
- data/schemas/mathml4/mathml4.rnc.1 +21 -0
- data/schemas/mathml4/mathml4.rng +37 -0
- metadata +249 -2
data/lib/mml/base/mlabeledtr.rb
CHANGED
|
@@ -7,15 +7,14 @@ module Mml
|
|
|
7
7
|
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
8
|
def self.included(klass)
|
|
9
9
|
klass.class_eval do
|
|
10
|
+
include CommonAttributes
|
|
11
|
+
|
|
10
12
|
attribute :mathbackground, :string
|
|
11
13
|
attribute :columnalign, :string
|
|
12
14
|
attribute :mathcolor, :string
|
|
13
15
|
attribute :rowalign, :string
|
|
14
|
-
attribute :id, :string
|
|
15
16
|
attribute :mtd_value, :mtd, collection: true
|
|
16
17
|
|
|
17
|
-
attribute :groupalign, :string
|
|
18
|
-
|
|
19
18
|
xml do
|
|
20
19
|
namespace Mml::Namespace
|
|
21
20
|
element "mlabeledtr"
|
|
@@ -25,10 +24,7 @@ module Mml
|
|
|
25
24
|
map_attribute "columnalign", to: :columnalign
|
|
26
25
|
map_attribute "mathcolor", to: :mathcolor
|
|
27
26
|
map_attribute "rowalign", to: :rowalign
|
|
28
|
-
map_attribute "id", to: :id
|
|
29
27
|
map_element "mtd", to: :mtd_value
|
|
30
|
-
|
|
31
|
-
map_attribute "groupalign", to: :groupalign
|
|
32
28
|
end
|
|
33
29
|
end
|
|
34
30
|
end
|
data/lib/mml/base/mn.rb
CHANGED
|
@@ -12,18 +12,19 @@ module Mml
|
|
|
12
12
|
attribute :mathbackground, :string
|
|
13
13
|
attribute :mathvariant, :string
|
|
14
14
|
attribute :mathsize, :string
|
|
15
|
-
attribute :
|
|
15
|
+
attribute :mglyph_value, :mglyph, collection: true
|
|
16
16
|
|
|
17
17
|
xml do
|
|
18
18
|
namespace Mml::Namespace
|
|
19
19
|
element "mn"
|
|
20
|
+
mixed_content
|
|
20
21
|
|
|
21
22
|
map_content to: :value
|
|
22
23
|
map_attribute "mathcolor", to: :mathcolor
|
|
23
24
|
map_attribute "mathbackground", to: :mathbackground
|
|
24
25
|
map_attribute "mathvariant", to: :mathvariant
|
|
25
26
|
map_attribute "mathsize", to: :mathsize
|
|
26
|
-
|
|
27
|
+
map_element "mglyph", to: :mglyph_value
|
|
27
28
|
end
|
|
28
29
|
end
|
|
29
30
|
end
|
data/lib/mml/base/mo.rb
CHANGED
|
@@ -12,7 +12,6 @@ module Mml
|
|
|
12
12
|
attribute :mathbackground, :string
|
|
13
13
|
attribute :mathvariant, :string
|
|
14
14
|
attribute :mathsize, :string
|
|
15
|
-
attribute :dir, :string
|
|
16
15
|
attribute :form, :string
|
|
17
16
|
attribute :lspace, :string
|
|
18
17
|
attribute :rspace, :string
|
|
@@ -20,6 +19,7 @@ module Mml
|
|
|
20
19
|
attribute :symmetric, :string
|
|
21
20
|
attribute :maxsize, :string
|
|
22
21
|
attribute :minsize, :string
|
|
22
|
+
attribute :fence, :string
|
|
23
23
|
attribute :largeop, :string
|
|
24
24
|
attribute :movablelimits, :string
|
|
25
25
|
attribute :accent, :string
|
|
@@ -41,20 +41,20 @@ module Mml
|
|
|
41
41
|
element "mo"
|
|
42
42
|
|
|
43
43
|
map_content to: :value
|
|
44
|
-
map_attribute "dir", to: :dir
|
|
45
44
|
map_attribute "form", to: :form
|
|
46
45
|
map_attribute "accent", to: :accent
|
|
47
46
|
map_attribute "lspace", to: :lspace
|
|
48
47
|
map_attribute "rspace", to: :rspace
|
|
49
48
|
map_attribute "maxsize", to: :maxsize
|
|
50
49
|
map_attribute "minsize", to: :minsize
|
|
50
|
+
map_attribute "fence", to: :fence
|
|
51
51
|
map_attribute "largeop", to: :largeop
|
|
52
52
|
map_attribute "stretchy", to: :stretchy
|
|
53
|
-
map_attribute "mathsize", to: :mathsize
|
|
54
53
|
map_attribute "linebreak", to: :linebreak
|
|
55
54
|
map_attribute "symmetric", to: :symmetric
|
|
56
55
|
map_attribute "mathcolor", to: :mathcolor
|
|
57
56
|
map_attribute "mathvariant", to: :mathvariant
|
|
57
|
+
map_attribute "mathsize", to: :mathsize
|
|
58
58
|
map_attribute "lineleading", to: :lineleading
|
|
59
59
|
map_attribute "indentalign", to: :indentalign
|
|
60
60
|
map_attribute "indentshift", to: :indentshift
|
data/lib/mml/base/mrow.rb
CHANGED
|
@@ -10,7 +10,6 @@ module Mml
|
|
|
10
10
|
attribute :mathbackground, :string
|
|
11
11
|
attribute :mathcolor, :string
|
|
12
12
|
attribute :content, :string
|
|
13
|
-
attribute :dir, :string
|
|
14
13
|
|
|
15
14
|
xml do
|
|
16
15
|
namespace Mml::Namespace
|
|
@@ -18,7 +17,6 @@ module Mml
|
|
|
18
17
|
mixed_content
|
|
19
18
|
|
|
20
19
|
map_content to: :content
|
|
21
|
-
map_attribute "dir", to: :dir
|
|
22
20
|
map_attribute "mathcolor", to: :mathcolor
|
|
23
21
|
map_attribute "mathbackground", to: :mathbackground
|
|
24
22
|
end
|
data/lib/mml/base/ms.rb
CHANGED
|
@@ -8,13 +8,12 @@ module Mml
|
|
|
8
8
|
def self.included(klass)
|
|
9
9
|
klass.class_eval do
|
|
10
10
|
attribute :mathbackground, :string
|
|
11
|
-
attribute :mathvariant, :string
|
|
12
11
|
attribute :mathcolor, :string
|
|
13
12
|
attribute :mathsize, :string
|
|
13
|
+
attribute :mathvariant, :string
|
|
14
14
|
attribute :lquote, :string
|
|
15
15
|
attribute :rquote, :string
|
|
16
16
|
attribute :value, :string
|
|
17
|
-
attribute :dir, :string
|
|
18
17
|
|
|
19
18
|
xml do
|
|
20
19
|
namespace Mml::Namespace
|
|
@@ -23,12 +22,11 @@ module Mml
|
|
|
23
22
|
|
|
24
23
|
map_content to: :value
|
|
25
24
|
map_attribute "mathbackground", to: :mathbackground
|
|
26
|
-
map_attribute "mathvariant", to: :mathvariant
|
|
27
25
|
map_attribute "mathcolor", to: :mathcolor
|
|
28
26
|
map_attribute "mathsize", to: :mathsize
|
|
29
|
-
map_attribute "
|
|
30
|
-
map_attribute "
|
|
31
|
-
map_attribute "
|
|
27
|
+
map_attribute "mathvariant", to: :mathvariant
|
|
28
|
+
map_attribute "lquote", to: :lquote, render_empty: true
|
|
29
|
+
map_attribute "rquote", to: :rquote, render_empty: true
|
|
32
30
|
end
|
|
33
31
|
end
|
|
34
32
|
end
|
data/lib/mml/base/mscarries.rb
CHANGED
|
@@ -7,7 +7,7 @@ module Mml
|
|
|
7
7
|
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
8
|
def self.included(klass)
|
|
9
9
|
klass.class_eval do
|
|
10
|
-
attribute :scriptsizemultiplier, :
|
|
10
|
+
attribute :scriptsizemultiplier, :float
|
|
11
11
|
attribute :mathbackground, :string
|
|
12
12
|
attribute :mathcolor, :string
|
|
13
13
|
attribute :position, :integer
|
data/lib/mml/base/mspace.rb
CHANGED
|
@@ -10,7 +10,6 @@ module Mml
|
|
|
10
10
|
attribute :mathcolor, :string
|
|
11
11
|
attribute :mathbackground, :string
|
|
12
12
|
attribute :mathvariant, :string
|
|
13
|
-
attribute :mathsize, :string
|
|
14
13
|
attribute :dir, :string
|
|
15
14
|
attribute :width, :string
|
|
16
15
|
attribute :height, :string
|
|
@@ -31,7 +30,6 @@ module Mml
|
|
|
31
30
|
map_attribute "mathcolor", to: :mathcolor
|
|
32
31
|
map_attribute "mathbackground", to: :mathbackground
|
|
33
32
|
map_attribute "mathvariant", to: :mathvariant
|
|
34
|
-
map_attribute "mathsize", to: :mathsize
|
|
35
33
|
map_attribute "dir", to: :dir
|
|
36
34
|
map_attribute "width", to: :width
|
|
37
35
|
map_attribute "height", to: :height
|
data/lib/mml/base/mstyle.rb
CHANGED
|
@@ -7,8 +7,8 @@ module Mml
|
|
|
7
7
|
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
8
|
def self.included(klass)
|
|
9
9
|
klass.class_eval do
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
include UniversalPresentationAttributes
|
|
11
|
+
|
|
12
12
|
attribute :scriptsizemultiplier, :integer
|
|
13
13
|
attribute :scriptminsize, :string
|
|
14
14
|
attribute :infixlinebreakstyle, :string
|
|
@@ -29,7 +29,6 @@ module Mml
|
|
|
29
29
|
attribute :crossout, :string
|
|
30
30
|
attribute :denomalign, :string
|
|
31
31
|
attribute :depth, :string
|
|
32
|
-
attribute :dir, :string
|
|
33
32
|
attribute :edge, :string
|
|
34
33
|
attribute :equalcolumns, :string
|
|
35
34
|
attribute :equalrows, :string
|
|
@@ -56,7 +55,6 @@ module Mml
|
|
|
56
55
|
attribute :longdivstyle, :string
|
|
57
56
|
attribute :lquote, :string
|
|
58
57
|
attribute :lspace, :string
|
|
59
|
-
attribute :mathsize, :string
|
|
60
58
|
attribute :mathvariant, :string
|
|
61
59
|
attribute :maxsize, :string
|
|
62
60
|
attribute :minsize, :string
|
|
@@ -82,6 +80,7 @@ module Mml
|
|
|
82
80
|
attribute :superscriptshift, :string
|
|
83
81
|
attribute :symmetric, :string
|
|
84
82
|
attribute :valign, :string
|
|
83
|
+
attribute :voffset, :string
|
|
85
84
|
attribute :width, :string
|
|
86
85
|
attribute :veryverythinmathspace, :string
|
|
87
86
|
attribute :verythinmathspace, :string
|
|
@@ -97,8 +96,6 @@ module Mml
|
|
|
97
96
|
element "mstyle"
|
|
98
97
|
mixed_content
|
|
99
98
|
|
|
100
|
-
map_attribute "mathcolor", to: :mathcolor
|
|
101
|
-
map_attribute "mathbackground", to: :mathbackground
|
|
102
99
|
map_attribute "scriptsizemultiplier", to: :scriptsizemultiplier
|
|
103
100
|
map_attribute "scriptminsize", to: :scriptminsize
|
|
104
101
|
map_attribute "infixlinebreakstyle", to: :infixlinebreakstyle
|
|
@@ -119,7 +116,6 @@ module Mml
|
|
|
119
116
|
map_attribute "crossout", to: :crossout
|
|
120
117
|
map_attribute "denomalign", to: :denomalign
|
|
121
118
|
map_attribute "depth", to: :depth
|
|
122
|
-
map_attribute "dir", to: :dir
|
|
123
119
|
map_attribute "edge", to: :edge
|
|
124
120
|
map_attribute "equalcolumns", to: :equalcolumns
|
|
125
121
|
map_attribute "equalrows", to: :equalrows
|
|
@@ -146,7 +142,6 @@ module Mml
|
|
|
146
142
|
map_attribute "longdivstyle", to: :longdivstyle
|
|
147
143
|
map_attribute "lquote", to: :lquote
|
|
148
144
|
map_attribute "lspace", to: :lspace
|
|
149
|
-
map_attribute "mathsize", to: :mathsize
|
|
150
145
|
map_attribute "mathvariant", to: :mathvariant
|
|
151
146
|
map_attribute "maxsize", to: :maxsize
|
|
152
147
|
map_attribute "minsize", to: :minsize
|
|
@@ -172,6 +167,7 @@ module Mml
|
|
|
172
167
|
map_attribute "superscriptshift", to: :superscriptshift
|
|
173
168
|
map_attribute "symmetric", to: :symmetric
|
|
174
169
|
map_attribute "valign", to: :valign
|
|
170
|
+
map_attribute "voffset", to: :voffset
|
|
175
171
|
map_attribute "width", to: :width
|
|
176
172
|
map_attribute "veryverythinmathspace", to: :veryverythinmathspace
|
|
177
173
|
map_attribute "verythinmathspace", to: :verythinmathspace
|
data/lib/mml/base/mtable.rb
CHANGED
|
@@ -13,6 +13,9 @@ module Mml
|
|
|
13
13
|
attribute :rowalign, :string
|
|
14
14
|
attribute :columnalign, :string
|
|
15
15
|
attribute :alignmentscope, :string
|
|
16
|
+
attribute :groupalign, :string
|
|
17
|
+
attribute :displaystyle, :string
|
|
18
|
+
attribute :scriptlevel, :string
|
|
16
19
|
attribute :columnwidth, :string
|
|
17
20
|
attribute :width, :string
|
|
18
21
|
attribute :rowspacing, :string
|
|
@@ -23,6 +26,7 @@ module Mml
|
|
|
23
26
|
attribute :framespacing, :string
|
|
24
27
|
attribute :equalrows, :string
|
|
25
28
|
attribute :equalcolumns, :string
|
|
29
|
+
attribute :side, :string
|
|
26
30
|
attribute :mlabeledtr_value, :mlabeledtr, collection: true
|
|
27
31
|
attribute :mtr_value, :mtr, collection: true
|
|
28
32
|
|
|
@@ -37,6 +41,9 @@ module Mml
|
|
|
37
41
|
map_attribute "rowalign", to: :rowalign
|
|
38
42
|
map_attribute "columnalign", to: :columnalign
|
|
39
43
|
map_attribute "alignmentscope", to: :alignmentscope
|
|
44
|
+
map_attribute "groupalign", to: :groupalign
|
|
45
|
+
map_attribute "displaystyle", to: :displaystyle
|
|
46
|
+
map_attribute "scriptlevel", to: :scriptlevel
|
|
40
47
|
map_attribute "columnwidth", to: :columnwidth
|
|
41
48
|
map_attribute "width", to: :width
|
|
42
49
|
map_attribute "rowspacing", to: :rowspacing
|
|
@@ -47,6 +54,7 @@ module Mml
|
|
|
47
54
|
map_attribute "framespacing", to: :framespacing
|
|
48
55
|
map_attribute "equalrows", to: :equalrows
|
|
49
56
|
map_attribute "equalcolumns", to: :equalcolumns
|
|
57
|
+
map_attribute "side", to: :side
|
|
50
58
|
map_element "mlabeledtr", to: :mlabeledtr_value
|
|
51
59
|
map_element "mtr", to: :mtr_value
|
|
52
60
|
end
|
data/lib/mml/base/mtd.rb
CHANGED
|
@@ -11,6 +11,9 @@ module Mml
|
|
|
11
11
|
attribute :mathbackground, :string
|
|
12
12
|
attribute :rowalign, :string
|
|
13
13
|
attribute :columnalign, :string
|
|
14
|
+
attribute :groupalign, :string
|
|
15
|
+
attribute :rowspan, :integer
|
|
16
|
+
attribute :columnspan, :integer
|
|
14
17
|
|
|
15
18
|
xml do
|
|
16
19
|
namespace Mml::Namespace
|
|
@@ -21,6 +24,9 @@ module Mml
|
|
|
21
24
|
map_attribute "mathbackground", to: :mathbackground
|
|
22
25
|
map_attribute "rowalign", to: :rowalign
|
|
23
26
|
map_attribute "columnalign", to: :columnalign
|
|
27
|
+
map_attribute "groupalign", to: :groupalign
|
|
28
|
+
map_attribute "rowspan", to: :rowspan
|
|
29
|
+
map_attribute "columnspan", to: :columnspan
|
|
24
30
|
end
|
|
25
31
|
end
|
|
26
32
|
end
|
data/lib/mml/base/mtext.rb
CHANGED
|
@@ -12,7 +12,6 @@ module Mml
|
|
|
12
12
|
attribute :mathbackground, :string
|
|
13
13
|
attribute :mathvariant, :string
|
|
14
14
|
attribute :mathsize, :string
|
|
15
|
-
attribute :dir, :string
|
|
16
15
|
|
|
17
16
|
xml do
|
|
18
17
|
namespace Mml::Namespace
|
|
@@ -23,7 +22,6 @@ module Mml
|
|
|
23
22
|
map_attribute "mathbackground", to: :mathbackground
|
|
24
23
|
map_attribute "mathvariant", to: :mathvariant
|
|
25
24
|
map_attribute "mathsize", to: :mathsize
|
|
26
|
-
map_attribute "dir", to: :dir
|
|
27
25
|
end
|
|
28
26
|
end
|
|
29
27
|
end
|
data/lib/mml/base/semantics.rb
CHANGED
|
@@ -7,14 +7,16 @@ module Mml
|
|
|
7
7
|
# Use fully qualified names (e.g., Mml::Namespace).
|
|
8
8
|
def self.included(klass)
|
|
9
9
|
klass.class_eval do
|
|
10
|
-
attribute :
|
|
10
|
+
attribute :definition_url, :string
|
|
11
|
+
attribute :semantics_encoding, :string
|
|
11
12
|
|
|
12
13
|
xml do
|
|
13
14
|
namespace Mml::Namespace
|
|
14
15
|
element "semantics"
|
|
15
16
|
mixed_content
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
map_attribute "definitionURL", to: :definition_url
|
|
19
|
+
map_attribute "encoding", to: :semantics_encoding
|
|
18
20
|
end
|
|
19
21
|
end
|
|
20
22
|
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
# Universal MathML presentation attributes allowed on all presentation elements.
|
|
6
|
+
# These exist in MathML 3 and later (displaystyle, scriptlevel were introduced in v3).
|
|
7
|
+
module UniversalPresentationAttributes
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
include CommonAttributes
|
|
11
|
+
|
|
12
|
+
attribute :displaystyle, :string
|
|
13
|
+
attribute :scriptlevel, :string
|
|
14
|
+
attribute :mathcolor, :string
|
|
15
|
+
attribute :mathbackground, :string
|
|
16
|
+
attribute :mathsize, :string
|
|
17
|
+
|
|
18
|
+
xml do
|
|
19
|
+
namespace Mml::Namespace
|
|
20
|
+
map_attribute "displaystyle", to: :displaystyle
|
|
21
|
+
map_attribute "scriptlevel", to: :scriptlevel
|
|
22
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
23
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
24
|
+
map_attribute "mathsize", to: :mathsize
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# V4-only attributes not present in V3.
|
|
31
|
+
module V4OnlyAttributes
|
|
32
|
+
def self.included(klass)
|
|
33
|
+
klass.class_eval do
|
|
34
|
+
attribute :intent, :string
|
|
35
|
+
attribute :arg, :string
|
|
36
|
+
|
|
37
|
+
xml do
|
|
38
|
+
namespace Mml::Namespace
|
|
39
|
+
map_attribute "intent", to: :intent
|
|
40
|
+
map_attribute "arg", to: :arg
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
# V3-specific attributes that apply to multiple element types.
|
|
6
|
+
# Includes dir attribute (v3+) and displaystyle/scriptlevel (v3+).
|
|
7
|
+
module V3Common
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :dir, :string
|
|
11
|
+
include V3PresentationAttributes
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
# V3 presentation attributes (displaystyle, scriptlevel).
|
|
6
|
+
# These are universal in MathML 3 and later.
|
|
7
|
+
module V3PresentationAttributes
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
include UniversalPresentationAttributes
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -2,27 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
module Mml
|
|
4
4
|
module Base
|
|
5
|
-
#
|
|
6
|
-
#
|
|
5
|
+
# V4 attributes module (for backward compatibility).
|
|
6
|
+
# Now composes UniversalPresentationAttributes + V4OnlyAttributes.
|
|
7
7
|
module V4Attributes
|
|
8
8
|
def self.included(klass)
|
|
9
9
|
klass.class_eval do
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
attribute :displaystyle, :string
|
|
13
|
-
attribute :scriptlevel, :integer
|
|
14
|
-
attribute :mathcolor, :string
|
|
15
|
-
attribute :mathbackground, :string
|
|
16
|
-
|
|
17
|
-
xml do
|
|
18
|
-
namespace Mml::Namespace
|
|
19
|
-
map_attribute "intent", to: :intent
|
|
20
|
-
map_attribute "arg", to: :arg
|
|
21
|
-
map_attribute "displaystyle", to: :displaystyle
|
|
22
|
-
map_attribute "scriptlevel", to: :scriptlevel
|
|
23
|
-
map_attribute "mathcolor", to: :mathcolor
|
|
24
|
-
map_attribute "mathbackground", to: :mathbackground
|
|
25
|
-
end
|
|
10
|
+
include UniversalPresentationAttributes
|
|
11
|
+
include V4OnlyAttributes
|
|
26
12
|
end
|
|
27
13
|
end
|
|
28
14
|
end
|
data/lib/mml/base.rb
CHANGED
|
@@ -43,9 +43,20 @@ module Mml
|
|
|
43
43
|
autoload :Munderover, "#{__dir__}/base/munderover"
|
|
44
44
|
autoload :None, "#{__dir__}/base/none"
|
|
45
45
|
autoload :Semantics, "#{__dir__}/base/semantics"
|
|
46
|
+
autoload :CommonAttributes, "#{__dir__}/base/common_attributes"
|
|
47
|
+
autoload :UniversalPresentationAttributes,
|
|
48
|
+
"#{__dir__}/base/universal_presentation_attributes"
|
|
49
|
+
autoload :V3Common, "#{__dir__}/base/v3_common"
|
|
50
|
+
autoload :V3PresentationAttributes,
|
|
51
|
+
"#{__dir__}/base/v3_presentation_attributes"
|
|
52
|
+
autoload :V4OnlyAttributes,
|
|
53
|
+
"#{__dir__}/base/universal_presentation_attributes"
|
|
46
54
|
autoload :V4Attributes, "#{__dir__}/base/v4_attributes"
|
|
47
55
|
autoload :DeprecatedFontAttributes,
|
|
48
56
|
"#{__dir__}/base/deprecated_font_attributes"
|
|
49
57
|
autoload :V3Only, "#{__dir__}/base/v3_only"
|
|
58
|
+
autoload :Content, "#{__dir__}/base/content_loader"
|
|
59
|
+
autoload :Declare, "#{__dir__}/base/content/declare"
|
|
60
|
+
autoload :Share, "#{__dir__}/base/content/share"
|
|
50
61
|
end
|
|
51
62
|
end
|