mml 2.2.1 → 2.3.0
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/.rubocop_todo.yml +14 -4
- data/CLAUDE.md +79 -0
- data/README.adoc +166 -43
- data/lib/mml/base/deprecated_font_attributes.rb +31 -0
- data/lib/mml/base/maction.rb +28 -0
- data/lib/mml/base/maligngroup.rb +26 -0
- data/lib/mml/base/malignmark.rb +26 -0
- data/lib/mml/base/math.rb +23 -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 +33 -0
- data/lib/mml/base/mfraction.rb +33 -0
- data/lib/mml/base/mglyph.rb +42 -0
- data/lib/mml/base/mi.rb +32 -0
- data/lib/mml/base/mlabeledtr.rb +37 -0
- data/lib/mml/base/mlongdiv.rb +31 -0
- data/lib/mml/base/mmultiscripts.rb +31 -0
- data/lib/mml/base/mn.rb +32 -0
- data/lib/mml/base/mo.rb +76 -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 +29 -0
- data/lib/mml/base/ms.rb +37 -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 +189 -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 +57 -0
- data/lib/mml/base/mtd.rb +29 -0
- data/lib/mml/base/mtext.rb +32 -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 +23 -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/v4_attributes.rb +30 -0
- data/lib/mml/base.rb +51 -0
- data/lib/mml/common_elements.rb +85 -0
- data/lib/mml/context_configuration.rb +118 -0
- data/lib/mml/context_options.rb +64 -0
- data/lib/mml/namespace.rb +10 -0
- data/lib/mml/v3/common_elements.rb +8 -0
- data/lib/mml/v3/configuration.rb +4 -96
- data/lib/mml/v3/maction.rb +2 -14
- data/lib/mml/v3/maligngroup.rb +2 -12
- data/lib/mml/v3/malignmark.rb +2 -12
- data/lib/mml/v3/math.rb +3 -10
- 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 +3 -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 +3 -30
- data/lib/mml/v3/mo.rb +4 -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 +3 -18
- data/lib/mml/v3/ms.rb +4 -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 +5 -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 +3 -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/semantics.rb +3 -12
- data/lib/mml/v3.rb +51 -77
- data/lib/mml/v4/a.rb +4 -13
- data/lib/mml/v4/common_elements.rb +13 -0
- data/lib/mml/v4/configuration.rb +4 -97
- data/lib/mml/v4/maction.rb +4 -19
- data/lib/mml/v4/maligngroup.rb +4 -17
- data/lib/mml/v4/malignmark.rb +4 -17
- data/lib/mml/v4/math.rb +4 -14
- data/lib/mml/v4/menclose.rb +4 -18
- data/lib/mml/v4/merror.rb +4 -16
- data/lib/mml/v4/mfenced.rb +4 -25
- data/lib/mml/v4/mfrac.rb +4 -24
- data/lib/mml/v4/mfraction.rb +4 -20
- data/lib/mml/v4/mglyph.rb +4 -35
- data/lib/mml/v4/mi.rb +4 -30
- data/lib/mml/v4/mlabeledtr.rb +6 -23
- data/lib/mml/v4/mlongdiv.rb +4 -18
- data/lib/mml/v4/mmultiscripts.rb +4 -24
- data/lib/mml/v4/mn.rb +4 -29
- data/lib/mml/v4/mo.rb +4 -75
- data/lib/mml/v4/mover.rb +4 -20
- data/lib/mml/v4/mpadded.rb +4 -26
- data/lib/mml/v4/mphantom.rb +4 -16
- data/lib/mml/v4/mprescripts.rb +4 -11
- data/lib/mml/v4/mroot.rb +4 -16
- data/lib/mml/v4/mrow.rb +4 -20
- data/lib/mml/v4/ms.rb +4 -34
- data/lib/mml/v4/mscarries.rb +4 -20
- data/lib/mml/v4/mscarry.rb +4 -16
- data/lib/mml/v4/msgroup.rb +4 -18
- data/lib/mml/v4/msline.rb +4 -21
- data/lib/mml/v4/mspace.rb +4 -49
- data/lib/mml/v4/msqrt.rb +4 -16
- data/lib/mml/v4/msrow.rb +4 -18
- data/lib/mml/v4/mstack.rb +4 -24
- data/lib/mml/v4/mstyle.rb +4 -186
- data/lib/mml/v4/msub.rb +4 -18
- data/lib/mml/v4/msubsup.rb +4 -20
- data/lib/mml/v4/msup.rb +4 -18
- data/lib/mml/v4/mtable.rb +4 -55
- data/lib/mml/v4/mtd.rb +4 -20
- data/lib/mml/v4/mtext.rb +4 -29
- data/lib/mml/v4/mtr.rb +4 -25
- data/lib/mml/v4/munder.rb +4 -22
- data/lib/mml/v4/munderover.rb +4 -22
- data/lib/mml/v4/namespace.rb +1 -4
- data/lib/mml/v4/none.rb +6 -11
- data/lib/mml/v4/semantics.rb +4 -12
- data/lib/mml/v4.rb +52 -74
- data/lib/mml/version.rb +1 -1
- data/lib/mml/versioned_parser.rb +46 -0
- data/lib/mml.rb +34 -6
- metadata +60 -4
- data/lib/mml/v3/common_attributes.rb +0 -22
- data/lib/mml/v4/common_attributes.rb +0 -26
|
@@ -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,189 @@
|
|
|
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
|
+
attribute :mathcolor, :string
|
|
11
|
+
attribute :mathbackground, :string
|
|
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 :dir, :string
|
|
33
|
+
attribute :edge, :string
|
|
34
|
+
attribute :equalcolumns, :string
|
|
35
|
+
attribute :equalrows, :string
|
|
36
|
+
attribute :form, :string
|
|
37
|
+
attribute :frame, :string
|
|
38
|
+
attribute :framespacing, :string
|
|
39
|
+
attribute :height, :string
|
|
40
|
+
attribute :indentalign, :string
|
|
41
|
+
attribute :indentalignfirst, :string
|
|
42
|
+
attribute :indentalignlast, :string
|
|
43
|
+
attribute :indentshift, :string
|
|
44
|
+
attribute :indentshiftfirst, :string
|
|
45
|
+
attribute :indentshiftlast, :string
|
|
46
|
+
attribute :indenttarget, :string
|
|
47
|
+
attribute :largeop, :string
|
|
48
|
+
attribute :leftoverhang, :string
|
|
49
|
+
attribute :length, :integer
|
|
50
|
+
attribute :linebreak, :string
|
|
51
|
+
attribute :linebreakmultchar, :string
|
|
52
|
+
attribute :linebreakstyle, :string
|
|
53
|
+
attribute :lineleading, :string
|
|
54
|
+
attribute :linethickness, :string
|
|
55
|
+
attribute :location, :string
|
|
56
|
+
attribute :longdivstyle, :string
|
|
57
|
+
attribute :lquote, :string
|
|
58
|
+
attribute :lspace, :string
|
|
59
|
+
attribute :mathsize, :string
|
|
60
|
+
attribute :mathvariant, :string
|
|
61
|
+
attribute :maxsize, :string
|
|
62
|
+
attribute :minsize, :string
|
|
63
|
+
attribute :movablelimits, :string
|
|
64
|
+
attribute :mslinethickness, :string
|
|
65
|
+
attribute :notation, :string
|
|
66
|
+
attribute :numalign, :string
|
|
67
|
+
attribute :open, :string
|
|
68
|
+
attribute :position, :integer
|
|
69
|
+
attribute :rightoverhang, :string
|
|
70
|
+
attribute :rowalign, :string
|
|
71
|
+
attribute :rowlines, :string
|
|
72
|
+
attribute :rowspacing, :string
|
|
73
|
+
attribute :rowspan, :integer
|
|
74
|
+
attribute :rquote, :string
|
|
75
|
+
attribute :rspace, :string
|
|
76
|
+
attribute :selection, :integer
|
|
77
|
+
attribute :separators, :string
|
|
78
|
+
attribute :shift, :integer
|
|
79
|
+
attribute :stackalign, :string
|
|
80
|
+
attribute :stretchy, :string
|
|
81
|
+
attribute :subscriptshift, :string
|
|
82
|
+
attribute :superscriptshift, :string
|
|
83
|
+
attribute :symmetric, :string
|
|
84
|
+
attribute :valign, :string
|
|
85
|
+
attribute :width, :string
|
|
86
|
+
attribute :veryverythinmathspace, :string
|
|
87
|
+
attribute :verythinmathspace, :string
|
|
88
|
+
attribute :thinmathspace, :string
|
|
89
|
+
attribute :mediummathspace, :string
|
|
90
|
+
attribute :thickmathspace, :string
|
|
91
|
+
attribute :verythickmathspace, :string
|
|
92
|
+
attribute :veryverythickmathspace, :string
|
|
93
|
+
|
|
94
|
+
# rubocop:disable Metrics/BlockLength
|
|
95
|
+
xml do
|
|
96
|
+
namespace Mml::Namespace
|
|
97
|
+
element "mstyle"
|
|
98
|
+
mixed_content
|
|
99
|
+
|
|
100
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
101
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
102
|
+
map_attribute "scriptsizemultiplier", to: :scriptsizemultiplier
|
|
103
|
+
map_attribute "scriptminsize", to: :scriptminsize
|
|
104
|
+
map_attribute "infixlinebreakstyle", to: :infixlinebreakstyle
|
|
105
|
+
map_attribute "decimalpoint", to: :decimalpoint
|
|
106
|
+
map_attribute "accent", to: :accent
|
|
107
|
+
map_attribute "accentunder", to: :accentunder
|
|
108
|
+
map_attribute "align", to: :align
|
|
109
|
+
map_attribute "alignmentscope", to: :alignmentscope
|
|
110
|
+
map_attribute "bevelled", to: :bevelled
|
|
111
|
+
map_attribute "charalign", to: :charalign
|
|
112
|
+
map_attribute "charspacing", to: :charspacing
|
|
113
|
+
map_attribute "close", to: :close
|
|
114
|
+
map_attribute "columnalign", to: :columnalign
|
|
115
|
+
map_attribute "columnlines", to: :columnlines
|
|
116
|
+
map_attribute "columnspacing", to: :columnspacing
|
|
117
|
+
map_attribute "columnspan", to: :columnspan
|
|
118
|
+
map_attribute "columnwidth", to: :columnwidth
|
|
119
|
+
map_attribute "crossout", to: :crossout
|
|
120
|
+
map_attribute "denomalign", to: :denomalign
|
|
121
|
+
map_attribute "depth", to: :depth
|
|
122
|
+
map_attribute "dir", to: :dir
|
|
123
|
+
map_attribute "edge", to: :edge
|
|
124
|
+
map_attribute "equalcolumns", to: :equalcolumns
|
|
125
|
+
map_attribute "equalrows", to: :equalrows
|
|
126
|
+
map_attribute "form", to: :form
|
|
127
|
+
map_attribute "frame", to: :frame
|
|
128
|
+
map_attribute "framespacing", to: :framespacing
|
|
129
|
+
map_attribute "height", to: :height
|
|
130
|
+
map_attribute "indentalign", to: :indentalign
|
|
131
|
+
map_attribute "indentalignfirst", to: :indentalignfirst
|
|
132
|
+
map_attribute "indentalignlast", to: :indentalignlast
|
|
133
|
+
map_attribute "indentshift", to: :indentshift
|
|
134
|
+
map_attribute "indentshiftfirst", to: :indentshiftfirst
|
|
135
|
+
map_attribute "indentshiftlast", to: :indentshiftlast
|
|
136
|
+
map_attribute "indenttarget", to: :indenttarget
|
|
137
|
+
map_attribute "largeop", to: :largeop
|
|
138
|
+
map_attribute "leftoverhang", to: :leftoverhang
|
|
139
|
+
map_attribute "length", to: :length
|
|
140
|
+
map_attribute "linebreak", to: :linebreak
|
|
141
|
+
map_attribute "linebreakmultchar", to: :linebreakmultchar
|
|
142
|
+
map_attribute "linebreakstyle", to: :linebreakstyle
|
|
143
|
+
map_attribute "lineleading", to: :lineleading
|
|
144
|
+
map_attribute "linethickness", to: :linethickness
|
|
145
|
+
map_attribute "location", to: :location
|
|
146
|
+
map_attribute "longdivstyle", to: :longdivstyle
|
|
147
|
+
map_attribute "lquote", to: :lquote
|
|
148
|
+
map_attribute "lspace", to: :lspace
|
|
149
|
+
map_attribute "mathsize", to: :mathsize
|
|
150
|
+
map_attribute "mathvariant", to: :mathvariant
|
|
151
|
+
map_attribute "maxsize", to: :maxsize
|
|
152
|
+
map_attribute "minsize", to: :minsize
|
|
153
|
+
map_attribute "movablelimits", to: :movablelimits
|
|
154
|
+
map_attribute "mslinethickness", to: :mslinethickness
|
|
155
|
+
map_attribute "notation", to: :notation
|
|
156
|
+
map_attribute "numalign", to: :numalign
|
|
157
|
+
map_attribute "open", to: :open
|
|
158
|
+
map_attribute "position", to: :position
|
|
159
|
+
map_attribute "rightoverhang", to: :rightoverhang
|
|
160
|
+
map_attribute "rowalign", to: :rowalign
|
|
161
|
+
map_attribute "rowlines", to: :rowlines
|
|
162
|
+
map_attribute "rowspacing", to: :rowspacing
|
|
163
|
+
map_attribute "rowspan", to: :rowspan
|
|
164
|
+
map_attribute "rquote", to: :rquote
|
|
165
|
+
map_attribute "rspace", to: :rspace
|
|
166
|
+
map_attribute "selection", to: :selection
|
|
167
|
+
map_attribute "separators", to: :separators
|
|
168
|
+
map_attribute "shift", to: :shift
|
|
169
|
+
map_attribute "stackalign", to: :stackalign
|
|
170
|
+
map_attribute "stretchy", to: :stretchy
|
|
171
|
+
map_attribute "subscriptshift", to: :subscriptshift
|
|
172
|
+
map_attribute "superscriptshift", to: :superscriptshift
|
|
173
|
+
map_attribute "symmetric", to: :symmetric
|
|
174
|
+
map_attribute "valign", to: :valign
|
|
175
|
+
map_attribute "width", to: :width
|
|
176
|
+
map_attribute "veryverythinmathspace", to: :veryverythinmathspace
|
|
177
|
+
map_attribute "verythinmathspace", to: :verythinmathspace
|
|
178
|
+
map_attribute "thinmathspace", to: :thinmathspace
|
|
179
|
+
map_attribute "mediummathspace", to: :mediummathspace
|
|
180
|
+
map_attribute "thickmathspace", to: :thickmathspace
|
|
181
|
+
map_attribute "verythickmathspace", to: :verythickmathspace
|
|
182
|
+
map_attribute "veryverythickmathspace", to: :veryverythickmathspace
|
|
183
|
+
end
|
|
184
|
+
# rubocop:enable Metrics/BlockLength
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
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,57 @@
|
|
|
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 :columnwidth, :string
|
|
17
|
+
attribute :width, :string
|
|
18
|
+
attribute :rowspacing, :string
|
|
19
|
+
attribute :columnspacing, :string
|
|
20
|
+
attribute :rowlines, :string
|
|
21
|
+
attribute :columnlines, :string
|
|
22
|
+
attribute :frame, :string
|
|
23
|
+
attribute :framespacing, :string
|
|
24
|
+
attribute :equalrows, :string
|
|
25
|
+
attribute :equalcolumns, :string
|
|
26
|
+
attribute :mlabeledtr_value, :mlabeledtr, collection: true
|
|
27
|
+
attribute :mtr_value, :mtr, collection: true
|
|
28
|
+
|
|
29
|
+
xml do
|
|
30
|
+
namespace Mml::Namespace
|
|
31
|
+
element "mtable"
|
|
32
|
+
mixed_content
|
|
33
|
+
|
|
34
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
35
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
36
|
+
map_attribute "align", to: :align
|
|
37
|
+
map_attribute "rowalign", to: :rowalign
|
|
38
|
+
map_attribute "columnalign", to: :columnalign
|
|
39
|
+
map_attribute "alignmentscope", to: :alignmentscope
|
|
40
|
+
map_attribute "columnwidth", to: :columnwidth
|
|
41
|
+
map_attribute "width", to: :width
|
|
42
|
+
map_attribute "rowspacing", to: :rowspacing
|
|
43
|
+
map_attribute "columnspacing", to: :columnspacing
|
|
44
|
+
map_attribute "rowlines", to: :rowlines
|
|
45
|
+
map_attribute "columnlines", to: :columnlines
|
|
46
|
+
map_attribute "frame", to: :frame
|
|
47
|
+
map_attribute "framespacing", to: :framespacing
|
|
48
|
+
map_attribute "equalrows", to: :equalrows
|
|
49
|
+
map_attribute "equalcolumns", to: :equalcolumns
|
|
50
|
+
map_element "mlabeledtr", to: :mlabeledtr_value
|
|
51
|
+
map_element "mtr", to: :mtr_value
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
data/lib/mml/base/mtd.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
|
|
15
|
+
xml do
|
|
16
|
+
namespace Mml::Namespace
|
|
17
|
+
element "mtd"
|
|
18
|
+
mixed_content
|
|
19
|
+
|
|
20
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
21
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
22
|
+
map_attribute "rowalign", to: :rowalign
|
|
23
|
+
map_attribute "columnalign", to: :columnalign
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Mtext
|
|
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 :value, :string
|
|
11
|
+
attribute :mathcolor, :string
|
|
12
|
+
attribute :mathbackground, :string
|
|
13
|
+
attribute :mathvariant, :string
|
|
14
|
+
attribute :mathsize, :string
|
|
15
|
+
attribute :dir, :string
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
namespace Mml::Namespace
|
|
19
|
+
element "mtext"
|
|
20
|
+
|
|
21
|
+
map_content to: :value
|
|
22
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
23
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
24
|
+
map_attribute "mathvariant", to: :mathvariant
|
|
25
|
+
map_attribute "mathsize", to: :mathsize
|
|
26
|
+
map_attribute "dir", to: :dir
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
data/lib/mml/base/mtr.rb
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Mtr
|
|
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 :mtd_value, :mtd, collection: true
|
|
15
|
+
|
|
16
|
+
attribute :groupalign, :string
|
|
17
|
+
|
|
18
|
+
xml do
|
|
19
|
+
namespace Mml::Namespace
|
|
20
|
+
element "mtr"
|
|
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_element "mtd", to: :mtd_value
|
|
28
|
+
|
|
29
|
+
map_attribute "groupalign", to: :groupalign
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Munder
|
|
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 :accentunder, :string
|
|
12
|
+
attribute :mathcolor, :string
|
|
13
|
+
attribute :content, :string
|
|
14
|
+
attribute :align, :string
|
|
15
|
+
|
|
16
|
+
xml do
|
|
17
|
+
namespace Mml::Namespace
|
|
18
|
+
element "munder"
|
|
19
|
+
mixed_content
|
|
20
|
+
|
|
21
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
22
|
+
map_attribute "accentunder", to: :accentunder
|
|
23
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
24
|
+
map_attribute "align", to: :align
|
|
25
|
+
map_content to: :content
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
module Munderover
|
|
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 :accent, :string
|
|
13
|
+
attribute :accentunder, :string
|
|
14
|
+
attribute :align, :string
|
|
15
|
+
|
|
16
|
+
xml do
|
|
17
|
+
namespace Mml::Namespace
|
|
18
|
+
element "munderover"
|
|
19
|
+
mixed_content
|
|
20
|
+
|
|
21
|
+
map_attribute "mathcolor", to: :mathcolor
|
|
22
|
+
map_attribute "mathbackground", to: :mathbackground
|
|
23
|
+
map_attribute "accent", to: :accent
|
|
24
|
+
map_attribute "accentunder", to: :accentunder
|
|
25
|
+
map_attribute "align", to: :align
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|