mml 2.3.1 → 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/.rubocop_todo.yml +61 -5
- data/lib/mml/base/common_attributes.rb +44 -0
- data/lib/mml/base/content/annotation.rb +0 -2
- data/lib/mml/base/content/share.rb +0 -2
- data/lib/mml/base/math.rb +10 -4
- data/lib/mml/base/mfrac.rb +0 -2
- data/lib/mml/base/mglyph.rb +0 -2
- data/lib/mml/base/mi.rb +4 -6
- data/lib/mml/base/mlabeledtr.rb +2 -2
- data/lib/mml/base/mn.rb +0 -2
- data/lib/mml/base/mo.rb +3 -1
- data/lib/mml/base/ms.rb +2 -2
- data/lib/mml/base/mspace.rb +0 -2
- data/lib/mml/base/mstyle.rb +2 -2
- data/lib/mml/base/universal_presentation_attributes.rb +4 -0
- data/lib/mml/base.rb +1 -0
- data/lib/mml/common_elements.rb +2 -0
- data/lib/mml/v4/a.rb +4 -2
- data/lib/mml/version.rb +1 -1
- data/schemas/README.adoc +10 -8
- 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 +10 -11
- data/schemas/mathml2/CVS/Entries +0 -4
- data/schemas/mathml2/CVS/Repository +0 -1
- data/schemas/mathml2/CVS/Root +0 -1
- data/schemas/mathml2/common/CVS/Entries +0 -4
- data/schemas/mathml2/common/CVS/Repository +0 -1
- data/schemas/mathml2/common/CVS/Root +0 -1
- data/schemas/mathml2/presentation/CVS/Entries +0 -12
- data/schemas/mathml2/presentation/CVS/Repository +0 -1
- data/schemas/mathml2/presentation/CVS/Root +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 73750a50313ce5f0c7d5ef5d1c3d7ed2ee0c11aa3259141f704673f947040f4b
|
|
4
|
+
data.tar.gz: e5036d53bbbe6cbb6ca1a758c02de579ca821d1913c984096381cc3cd84744a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd30363fe7b1ad6897efc0e201f36fb57ad4fd9ab596f720f0f8d567dde2525bdc1a8a512e13819e979145c448b106d8eb2cbc9a3c23563245eda5e84a2351d0
|
|
7
|
+
data.tar.gz: 3fe12e9c4f7717a478798e216ede213560942c1aa05c532cd59ccd6404186b5e5ed00be50bfe6d79d68171de85cda4b8ffe3366fb5fd1fc3031aa0aef9b90dcd
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,25 +1,63 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-04-
|
|
3
|
+
# on 2026-04-13 09:44:18 UTC using RuboCop version 1.86.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
# Configuration parameters: EnforcedStyleAlignWith.
|
|
12
|
+
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
13
|
+
Layout/BlockAlignment:
|
|
14
|
+
Exclude:
|
|
15
|
+
- 'spec/mml/v4_spec.rb'
|
|
16
|
+
|
|
17
|
+
# Offense count: 3
|
|
18
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
19
|
+
# Configuration parameters: AllowForAlignment.
|
|
20
|
+
Layout/CommentIndentation:
|
|
21
|
+
Exclude:
|
|
22
|
+
- 'spec/mml/v4_spec.rb'
|
|
23
|
+
|
|
24
|
+
# Offense count: 3
|
|
25
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
26
|
+
# Configuration parameters: EnforcedStyle.
|
|
27
|
+
# SupportedStyles: normal, indented_internal_methods
|
|
28
|
+
Layout/IndentationConsistency:
|
|
29
|
+
Exclude:
|
|
30
|
+
- 'spec/mml/v4_spec.rb'
|
|
31
|
+
|
|
32
|
+
# Offense count: 2
|
|
33
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
34
|
+
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
35
|
+
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
36
|
+
Layout/IndentationWidth:
|
|
37
|
+
Exclude:
|
|
38
|
+
- 'spec/mml/v4_spec.rb'
|
|
39
|
+
|
|
40
|
+
# Offense count: 135
|
|
10
41
|
# This cop supports safe autocorrection (--autocorrect).
|
|
11
42
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
12
43
|
# URISchemes: http, https
|
|
13
44
|
Layout/LineLength:
|
|
14
45
|
Enabled: false
|
|
15
46
|
|
|
47
|
+
# Offense count: 2
|
|
48
|
+
# Configuration parameters: AllowedPatterns.
|
|
49
|
+
# AllowedPatterns: (?-mix:(exactly|at_least|at_most)\(\d+\)\.times)
|
|
50
|
+
Lint/UnreachableLoop:
|
|
51
|
+
Exclude:
|
|
52
|
+
- 'spec/mml/v4_spec.rb'
|
|
53
|
+
|
|
16
54
|
# Offense count: 1
|
|
17
55
|
# This cop supports safe autocorrection (--autocorrect).
|
|
18
56
|
Lint/UselessAssignment:
|
|
19
57
|
Exclude:
|
|
20
58
|
- 'lib/mml/context_configuration.rb'
|
|
21
59
|
|
|
22
|
-
# Offense count:
|
|
60
|
+
# Offense count: 25
|
|
23
61
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
24
62
|
Metrics/AbcSize:
|
|
25
63
|
Enabled: false
|
|
@@ -30,17 +68,29 @@ Metrics/AbcSize:
|
|
|
30
68
|
Metrics/BlockLength:
|
|
31
69
|
Max: 167
|
|
32
70
|
|
|
33
|
-
# Offense count:
|
|
71
|
+
# Offense count: 1
|
|
72
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
73
|
+
Metrics/CyclomaticComplexity:
|
|
74
|
+
Exclude:
|
|
75
|
+
- 'spec/mml/v4_spec.rb'
|
|
76
|
+
|
|
77
|
+
# Offense count: 56
|
|
34
78
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
35
79
|
Metrics/MethodLength:
|
|
36
80
|
Max: 170
|
|
37
81
|
|
|
82
|
+
# Offense count: 1
|
|
83
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
84
|
+
Metrics/PerceivedComplexity:
|
|
85
|
+
Exclude:
|
|
86
|
+
- 'spec/mml/v4_spec.rb'
|
|
87
|
+
|
|
38
88
|
# Offense count: 1
|
|
39
89
|
Naming/ConstantName:
|
|
40
90
|
Exclude:
|
|
41
91
|
- 'lib/mml/v2/namespace.rb'
|
|
42
92
|
|
|
43
|
-
# Offense count:
|
|
93
|
+
# Offense count: 36
|
|
44
94
|
# Configuration parameters: CountAsOne.
|
|
45
95
|
RSpec/ExampleLength:
|
|
46
96
|
Max: 11
|
|
@@ -61,3 +111,9 @@ RSpec/SpecFilePathFormat:
|
|
|
61
111
|
RSpec/UnspecifiedException:
|
|
62
112
|
Exclude:
|
|
63
113
|
- 'spec/mml/v3_spec.rb'
|
|
114
|
+
|
|
115
|
+
# Offense count: 1
|
|
116
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
117
|
+
Style/CombinableLoops:
|
|
118
|
+
Exclude:
|
|
119
|
+
- 'spec/mml/v4_spec.rb'
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mml
|
|
4
|
+
module Base
|
|
5
|
+
# Common attributes allowed on all MathML elements per W3C MathML Core spec.
|
|
6
|
+
# See: https://w3c.github.io/mathml-core/#global-attributes
|
|
7
|
+
module CommonAttributes
|
|
8
|
+
def self.included(klass)
|
|
9
|
+
klass.class_eval do
|
|
10
|
+
attribute :id, :string
|
|
11
|
+
attribute :xref, :string
|
|
12
|
+
attribute :class_attr, :string
|
|
13
|
+
attribute :style_attr, :string
|
|
14
|
+
attribute :href, :string
|
|
15
|
+
attribute :autofocus, :string
|
|
16
|
+
attribute :nonce, :string
|
|
17
|
+
attribute :tabindex, :string
|
|
18
|
+
attribute :aria_label, :string
|
|
19
|
+
attribute :aria_describedby, :string
|
|
20
|
+
attribute :aria_description, :string
|
|
21
|
+
attribute :aria_details, :string
|
|
22
|
+
attribute :data_other, :string
|
|
23
|
+
|
|
24
|
+
xml do
|
|
25
|
+
namespace Mml::Namespace
|
|
26
|
+
map_attribute "id", to: :id
|
|
27
|
+
map_attribute "xref", to: :xref
|
|
28
|
+
map_attribute "class", to: :class_attr
|
|
29
|
+
map_attribute "style", to: :style_attr
|
|
30
|
+
map_attribute "href", to: :href
|
|
31
|
+
map_attribute "autofocus", to: :autofocus
|
|
32
|
+
map_attribute "nonce", to: :nonce
|
|
33
|
+
map_attribute "tabindex", to: :tabindex
|
|
34
|
+
map_attribute "aria-label", to: :aria_label
|
|
35
|
+
map_attribute "aria-describedby", to: :aria_describedby
|
|
36
|
+
map_attribute "aria-description", to: :aria_description
|
|
37
|
+
map_attribute "aria-details", to: :aria_details
|
|
38
|
+
map_attribute "data-other", to: :data_other
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -10,7 +10,6 @@ module Mml
|
|
|
10
10
|
klass.class_eval do
|
|
11
11
|
attribute :definition_url, :string
|
|
12
12
|
attribute :encoding_value, :string
|
|
13
|
-
attribute :href, :string
|
|
14
13
|
attribute :value, :string
|
|
15
14
|
|
|
16
15
|
xml do
|
|
@@ -18,7 +17,6 @@ module Mml
|
|
|
18
17
|
element "annotation"
|
|
19
18
|
|
|
20
19
|
map_content to: :value
|
|
21
|
-
map_attribute "href", to: :href
|
|
22
20
|
map_attribute "definitionURL", to: :definition_url
|
|
23
21
|
map_attribute "encoding", to: :encoding_value
|
|
24
22
|
end
|
|
@@ -7,13 +7,11 @@ module Mml
|
|
|
7
7
|
module Share
|
|
8
8
|
def self.included(klass)
|
|
9
9
|
klass.class_eval do
|
|
10
|
-
attribute :href, :string
|
|
11
10
|
attribute :src, :string
|
|
12
11
|
|
|
13
12
|
xml do
|
|
14
13
|
namespace Mml::Namespace
|
|
15
14
|
element "share"
|
|
16
|
-
map_attribute "href", to: :href
|
|
17
15
|
map_attribute "src", to: :src
|
|
18
16
|
end
|
|
19
17
|
end
|
data/lib/mml/base/math.rb
CHANGED
|
@@ -8,12 +8,13 @@ module Mml
|
|
|
8
8
|
def self.included(klass)
|
|
9
9
|
klass.class_eval do
|
|
10
10
|
attribute :display, :string
|
|
11
|
+
attribute :alttext, :string
|
|
12
|
+
attribute :decimalpoint, :string
|
|
11
13
|
attribute :macros, :string
|
|
12
|
-
attribute :href, :string
|
|
13
14
|
attribute :lang, :string
|
|
14
15
|
attribute :bevelled, :string
|
|
15
|
-
attribute :mathsize, :string
|
|
16
16
|
attribute :mathcolor, :string
|
|
17
|
+
attribute :mathvariant, :string
|
|
17
18
|
attribute :rowalign, :string
|
|
18
19
|
attribute :columnalign, :string
|
|
19
20
|
attribute :rowspacing, :string
|
|
@@ -29,6 +30,8 @@ module Mml
|
|
|
29
30
|
attribute :indentalignlast, :string
|
|
30
31
|
attribute :indentshiftlast, :string
|
|
31
32
|
attribute :linebreakmultchar, :string
|
|
33
|
+
attribute :linebreakstyle, :string
|
|
34
|
+
attribute :indenttarget, :string
|
|
32
35
|
|
|
33
36
|
xml do
|
|
34
37
|
namespace Mml::Namespace
|
|
@@ -36,12 +39,13 @@ module Mml
|
|
|
36
39
|
mixed_content
|
|
37
40
|
|
|
38
41
|
map_attribute :display, to: :display
|
|
42
|
+
map_attribute "alttext", to: :alttext
|
|
43
|
+
map_attribute "decimalpoint", to: :decimalpoint
|
|
39
44
|
map_attribute :macros, to: :macros
|
|
40
|
-
map_attribute "href", to: :href
|
|
41
45
|
map_attribute "xml:lang", to: :lang
|
|
42
46
|
map_attribute "bevelled", to: :bevelled
|
|
43
|
-
map_attribute "mathsize", to: :mathsize
|
|
44
47
|
map_attribute "mathcolor", to: :mathcolor
|
|
48
|
+
map_attribute "mathvariant", to: :mathvariant
|
|
45
49
|
map_attribute "rowalign", to: :rowalign
|
|
46
50
|
map_attribute "columnalign", to: :columnalign
|
|
47
51
|
map_attribute "rowspacing", to: :rowspacing
|
|
@@ -56,6 +60,8 @@ module Mml
|
|
|
56
60
|
map_attribute "indentalignlast", to: :indentalignlast
|
|
57
61
|
map_attribute "indentshiftlast", to: :indentshiftlast
|
|
58
62
|
map_attribute "linebreakmultchar", to: :linebreakmultchar
|
|
63
|
+
map_attribute "linebreakstyle", to: :linebreakstyle
|
|
64
|
+
map_attribute "indenttarget", to: :indenttarget
|
|
59
65
|
end
|
|
60
66
|
end
|
|
61
67
|
end
|
data/lib/mml/base/mfrac.rb
CHANGED
|
@@ -13,7 +13,6 @@ module Mml
|
|
|
13
13
|
attribute :numalign, :string
|
|
14
14
|
attribute :denomalign, :string
|
|
15
15
|
attribute :bevelled, :string
|
|
16
|
-
attribute :href, :string
|
|
17
16
|
|
|
18
17
|
xml do
|
|
19
18
|
namespace Mml::Namespace
|
|
@@ -26,7 +25,6 @@ module Mml
|
|
|
26
25
|
map_attribute "numalign", to: :numalign
|
|
27
26
|
map_attribute "denomalign", to: :denomalign
|
|
28
27
|
map_attribute "bevelled", to: :bevelled
|
|
29
|
-
map_attribute "href", to: :href
|
|
30
28
|
end
|
|
31
29
|
end
|
|
32
30
|
end
|
data/lib/mml/base/mglyph.rb
CHANGED
|
@@ -17,7 +17,6 @@ module Mml
|
|
|
17
17
|
attribute :mathbackground, :string
|
|
18
18
|
attribute :fontfamily, :string
|
|
19
19
|
|
|
20
|
-
attribute :mathsize, :string
|
|
21
20
|
attribute :mathcolor, :string
|
|
22
21
|
|
|
23
22
|
xml do
|
|
@@ -34,7 +33,6 @@ module Mml
|
|
|
34
33
|
map_attribute "mathbackground", to: :mathbackground
|
|
35
34
|
map_attribute "fontfamily", to: :fontfamily
|
|
36
35
|
|
|
37
|
-
map_attribute "mathsize", to: :mathsize
|
|
38
36
|
map_attribute "mathcolor", to: :mathcolor
|
|
39
37
|
end
|
|
40
38
|
end
|
data/lib/mml/base/mi.rb
CHANGED
|
@@ -8,11 +8,10 @@ module Mml
|
|
|
8
8
|
def self.included(klass)
|
|
9
9
|
klass.class_eval do
|
|
10
10
|
attribute :value, :string
|
|
11
|
-
attribute :mathsize, :string
|
|
12
11
|
attribute :mathcolor, :string
|
|
13
|
-
attribute :mathvariant, :string
|
|
14
12
|
attribute :mathbackground, :string
|
|
15
|
-
attribute :
|
|
13
|
+
attribute :mathsize, :string
|
|
14
|
+
attribute :mathvariant, :string
|
|
16
15
|
attribute :mglyph_value, :mglyph, collection: true
|
|
17
16
|
attribute :lang, :string
|
|
18
17
|
|
|
@@ -22,11 +21,10 @@ module Mml
|
|
|
22
21
|
mixed_content
|
|
23
22
|
|
|
24
23
|
map_content to: :value
|
|
25
|
-
map_attribute "mathsize", to: :mathsize
|
|
26
24
|
map_attribute "mathcolor", to: :mathcolor
|
|
27
|
-
map_attribute "mathvariant", to: :mathvariant
|
|
28
25
|
map_attribute "mathbackground", to: :mathbackground
|
|
29
|
-
map_attribute "
|
|
26
|
+
map_attribute "mathsize", to: :mathsize
|
|
27
|
+
map_attribute "mathvariant", to: :mathvariant
|
|
30
28
|
map_attribute "xml:lang", to: :lang
|
|
31
29
|
map_element "mglyph", to: :mglyph_value
|
|
32
30
|
end
|
data/lib/mml/base/mlabeledtr.rb
CHANGED
|
@@ -7,11 +7,12 @@ 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
18
|
xml do
|
|
@@ -23,7 +24,6 @@ module Mml
|
|
|
23
24
|
map_attribute "columnalign", to: :columnalign
|
|
24
25
|
map_attribute "mathcolor", to: :mathcolor
|
|
25
26
|
map_attribute "rowalign", to: :rowalign
|
|
26
|
-
map_attribute "id", to: :id
|
|
27
27
|
map_element "mtd", to: :mtd_value
|
|
28
28
|
end
|
|
29
29
|
end
|
data/lib/mml/base/mn.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 :href, :string
|
|
16
15
|
attribute :mglyph_value, :mglyph, collection: true
|
|
17
16
|
|
|
18
17
|
xml do
|
|
@@ -25,7 +24,6 @@ module Mml
|
|
|
25
24
|
map_attribute "mathbackground", to: :mathbackground
|
|
26
25
|
map_attribute "mathvariant", to: :mathvariant
|
|
27
26
|
map_attribute "mathsize", to: :mathsize
|
|
28
|
-
map_attribute "href", to: :href
|
|
29
27
|
map_element "mglyph", to: :mglyph_value
|
|
30
28
|
end
|
|
31
29
|
end
|
data/lib/mml/base/mo.rb
CHANGED
|
@@ -19,6 +19,7 @@ module Mml
|
|
|
19
19
|
attribute :symmetric, :string
|
|
20
20
|
attribute :maxsize, :string
|
|
21
21
|
attribute :minsize, :string
|
|
22
|
+
attribute :fence, :string
|
|
22
23
|
attribute :largeop, :string
|
|
23
24
|
attribute :movablelimits, :string
|
|
24
25
|
attribute :accent, :string
|
|
@@ -46,13 +47,14 @@ module Mml
|
|
|
46
47
|
map_attribute "rspace", to: :rspace
|
|
47
48
|
map_attribute "maxsize", to: :maxsize
|
|
48
49
|
map_attribute "minsize", to: :minsize
|
|
50
|
+
map_attribute "fence", to: :fence
|
|
49
51
|
map_attribute "largeop", to: :largeop
|
|
50
52
|
map_attribute "stretchy", to: :stretchy
|
|
51
|
-
map_attribute "mathsize", to: :mathsize
|
|
52
53
|
map_attribute "linebreak", to: :linebreak
|
|
53
54
|
map_attribute "symmetric", to: :symmetric
|
|
54
55
|
map_attribute "mathcolor", to: :mathcolor
|
|
55
56
|
map_attribute "mathvariant", to: :mathvariant
|
|
57
|
+
map_attribute "mathsize", to: :mathsize
|
|
56
58
|
map_attribute "lineleading", to: :lineleading
|
|
57
59
|
map_attribute "indentalign", to: :indentalign
|
|
58
60
|
map_attribute "indentshift", to: :indentshift
|
data/lib/mml/base/ms.rb
CHANGED
|
@@ -8,9 +8,9 @@ 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
|
|
@@ -22,9 +22,9 @@ module Mml
|
|
|
22
22
|
|
|
23
23
|
map_content to: :value
|
|
24
24
|
map_attribute "mathbackground", to: :mathbackground
|
|
25
|
-
map_attribute "mathvariant", to: :mathvariant
|
|
26
25
|
map_attribute "mathcolor", to: :mathcolor
|
|
27
26
|
map_attribute "mathsize", to: :mathsize
|
|
27
|
+
map_attribute "mathvariant", to: :mathvariant
|
|
28
28
|
map_attribute "lquote", to: :lquote, render_empty: true
|
|
29
29
|
map_attribute "rquote", to: :rquote, render_empty: true
|
|
30
30
|
end
|
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
|
@@ -55,7 +55,6 @@ module Mml
|
|
|
55
55
|
attribute :longdivstyle, :string
|
|
56
56
|
attribute :lquote, :string
|
|
57
57
|
attribute :lspace, :string
|
|
58
|
-
attribute :mathsize, :string
|
|
59
58
|
attribute :mathvariant, :string
|
|
60
59
|
attribute :maxsize, :string
|
|
61
60
|
attribute :minsize, :string
|
|
@@ -81,6 +80,7 @@ module Mml
|
|
|
81
80
|
attribute :superscriptshift, :string
|
|
82
81
|
attribute :symmetric, :string
|
|
83
82
|
attribute :valign, :string
|
|
83
|
+
attribute :voffset, :string
|
|
84
84
|
attribute :width, :string
|
|
85
85
|
attribute :veryverythinmathspace, :string
|
|
86
86
|
attribute :verythinmathspace, :string
|
|
@@ -142,7 +142,6 @@ module Mml
|
|
|
142
142
|
map_attribute "longdivstyle", to: :longdivstyle
|
|
143
143
|
map_attribute "lquote", to: :lquote
|
|
144
144
|
map_attribute "lspace", to: :lspace
|
|
145
|
-
map_attribute "mathsize", to: :mathsize
|
|
146
145
|
map_attribute "mathvariant", to: :mathvariant
|
|
147
146
|
map_attribute "maxsize", to: :maxsize
|
|
148
147
|
map_attribute "minsize", to: :minsize
|
|
@@ -168,6 +167,7 @@ module Mml
|
|
|
168
167
|
map_attribute "superscriptshift", to: :superscriptshift
|
|
169
168
|
map_attribute "symmetric", to: :symmetric
|
|
170
169
|
map_attribute "valign", to: :valign
|
|
170
|
+
map_attribute "voffset", to: :voffset
|
|
171
171
|
map_attribute "width", to: :width
|
|
172
172
|
map_attribute "veryverythinmathspace", to: :veryverythinmathspace
|
|
173
173
|
map_attribute "verythinmathspace", to: :verythinmathspace
|
|
@@ -7,10 +7,13 @@ module Mml
|
|
|
7
7
|
module UniversalPresentationAttributes
|
|
8
8
|
def self.included(klass)
|
|
9
9
|
klass.class_eval do
|
|
10
|
+
include CommonAttributes
|
|
11
|
+
|
|
10
12
|
attribute :displaystyle, :string
|
|
11
13
|
attribute :scriptlevel, :string
|
|
12
14
|
attribute :mathcolor, :string
|
|
13
15
|
attribute :mathbackground, :string
|
|
16
|
+
attribute :mathsize, :string
|
|
14
17
|
|
|
15
18
|
xml do
|
|
16
19
|
namespace Mml::Namespace
|
|
@@ -18,6 +21,7 @@ module Mml
|
|
|
18
21
|
map_attribute "scriptlevel", to: :scriptlevel
|
|
19
22
|
map_attribute "mathcolor", to: :mathcolor
|
|
20
23
|
map_attribute "mathbackground", to: :mathbackground
|
|
24
|
+
map_attribute "mathsize", to: :mathsize
|
|
21
25
|
end
|
|
22
26
|
end
|
|
23
27
|
end
|
data/lib/mml/base.rb
CHANGED
|
@@ -43,6 +43,7 @@ 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"
|
|
46
47
|
autoload :UniversalPresentationAttributes,
|
|
47
48
|
"#{__dir__}/base/universal_presentation_attributes"
|
|
48
49
|
autoload :V3Common, "#{__dir__}/base/v3_common"
|
data/lib/mml/common_elements.rb
CHANGED
|
@@ -4,6 +4,8 @@ require "lutaml/model"
|
|
|
4
4
|
|
|
5
5
|
module Mml
|
|
6
6
|
class CommonElements < Lutaml::Model::Serializable
|
|
7
|
+
include Base::CommonAttributes
|
|
8
|
+
|
|
7
9
|
# Presentation elements
|
|
8
10
|
attribute :mmultiscripts_value, :mmultiscripts, collection: true
|
|
9
11
|
attribute :maligngroup_value, :maligngroup, collection: true
|
data/lib/mml/v4/a.rb
CHANGED
|
@@ -5,16 +5,18 @@ module Mml
|
|
|
5
5
|
class A < CommonElements
|
|
6
6
|
include Base::V4Attributes
|
|
7
7
|
|
|
8
|
-
attribute :href, :string
|
|
9
8
|
attribute :hreflang, :string
|
|
9
|
+
attribute :width, :string
|
|
10
|
+
attribute :height, :string
|
|
10
11
|
|
|
11
12
|
xml do
|
|
12
13
|
namespace Namespace
|
|
13
14
|
element "a"
|
|
14
15
|
mixed_content
|
|
15
16
|
|
|
16
|
-
map_attribute "href", to: :href
|
|
17
17
|
map_attribute "hreflang", to: :hreflang
|
|
18
|
+
map_attribute "width", to: :width
|
|
19
|
+
map_attribute "height", to: :height
|
|
18
20
|
end
|
|
19
21
|
end
|
|
20
22
|
end
|
data/lib/mml/version.rb
CHANGED
data/schemas/README.adoc
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
= W3C MathML schemas
|
|
2
2
|
|
|
3
|
-
The official MathML schemas are available
|
|
4
|
-
https://www.w3.org/Math/XMLSchema/ .
|
|
3
|
+
The official MathML schemas are available from W3C.
|
|
5
4
|
|
|
6
|
-
MathML
|
|
5
|
+
MathML 4:: https://www.w3.org/TR/mathml4/. Link: https://www.w3.org/Math/RelaxNG/mathml4/*.{rnc,rng}
|
|
7
6
|
|
|
8
|
-
MathML
|
|
7
|
+
MathML 3:: From https://www.w3.org/Math/XMLSchema/. Link: https://www.w3.org/Math/XMLSchema/mathml3-xsd.zip
|
|
8
|
+
|
|
9
|
+
MathML 2:: From https://www.w3.org/Math/XMLSchema/. Link: https://www.w3.org/Math/XMLSchema/mathml2.tgz
|
|
9
10
|
|
|
10
11
|
== License
|
|
11
12
|
|
|
12
|
-
Copyright 1998-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
Copyright 1998-2024 W3C (MIT, ERCIM, Keio)
|
|
14
|
+
|
|
15
|
+
Use and distribution of this code are permitted under the terms
|
|
16
|
+
W3C Software Notice and License
|
|
17
|
+
http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
|