mml 2.0.3 → 2.1.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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +10 -4
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +1 -1
  5. data/.rubocop_todo.yml +11 -74
  6. data/Gemfile +2 -1
  7. data/README.adoc +313 -4
  8. data/lib/mml/common_attributes.rb +0 -2
  9. data/lib/mml/configuration.rb +2 -3
  10. data/lib/mml/maction.rb +6 -5
  11. data/lib/mml/maligngroup.rb +5 -4
  12. data/lib/mml/malignmark.rb +5 -4
  13. data/lib/mml/math.rb +18 -0
  14. data/lib/mml/menclose.rb +6 -4
  15. data/lib/mml/merror.rb +5 -3
  16. data/lib/mml/mfenced.rb +8 -6
  17. data/lib/mml/mfrac.rb +9 -7
  18. data/lib/mml/mfraction.rb +9 -7
  19. data/lib/mml/mglyph.rb +18 -17
  20. data/lib/mml/mi.rb +13 -12
  21. data/lib/mml/mlabeledtr.rb +9 -7
  22. data/lib/mml/mlongdiv.rb +8 -6
  23. data/lib/mml/mmultiscripts.rb +7 -5
  24. data/lib/mml/mn.rb +13 -12
  25. data/lib/mml/mo.rb +36 -35
  26. data/lib/mml/mover.rb +7 -5
  27. data/lib/mml/mpadded.rb +10 -8
  28. data/lib/mml/mphantom.rb +5 -3
  29. data/lib/mml/mprescripts.rb +4 -3
  30. data/lib/mml/mroot.rb +5 -3
  31. data/lib/mml/mrow.rb +7 -5
  32. data/lib/mml/ms.rb +16 -14
  33. data/lib/mml/mscarries.rb +9 -8
  34. data/lib/mml/mscarry.rb +7 -5
  35. data/lib/mml/msgroup.rb +7 -5
  36. data/lib/mml/msline.rb +9 -8
  37. data/lib/mml/mspace.rb +24 -23
  38. data/lib/mml/msqrt.rb +5 -3
  39. data/lib/mml/msrow.rb +6 -4
  40. data/lib/mml/mstack.rb +9 -7
  41. data/lib/mml/mstyle.rb +99 -102
  42. data/lib/mml/msub.rb +6 -4
  43. data/lib/mml/msubsup.rb +7 -5
  44. data/lib/mml/msup.rb +6 -4
  45. data/lib/mml/mtable.rb +23 -21
  46. data/lib/mml/mtd.rb +7 -5
  47. data/lib/mml/mtext.rb +13 -12
  48. data/lib/mml/mtr.rb +8 -6
  49. data/lib/mml/munder.rb +7 -5
  50. data/lib/mml/munderover.rb +8 -6
  51. data/lib/mml/namespace.rb +9 -0
  52. data/lib/mml/none.rb +4 -3
  53. data/lib/mml/semantics.rb +3 -1
  54. data/lib/mml/version.rb +1 -1
  55. data/lib/mml.rb +67 -19
  56. data/mml.gemspec +1 -1
  57. metadata +8 -8
  58. data/lib/mml/math_with_namespace.rb +0 -14
  59. data/lib/mml/math_with_nil_namespace.rb +0 -13
data/lib/mml/mfrac.rb CHANGED
@@ -10,14 +10,16 @@ module Mml
10
10
  attribute :bevelled, :string
11
11
 
12
12
  xml do
13
- root "mfrac", mixed: true
13
+ namespace Namespace
14
+ element "mfrac"
15
+ mixed_content
14
16
 
15
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
16
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
17
- map_attribute "linethickness", to: :linethickness, namespace: nil
18
- map_attribute "numalign", to: :numalign, namespace: nil
19
- map_attribute "denomalign", to: :denomalign, namespace: nil
20
- map_attribute "bevelled", to: :bevelled, namespace: nil
17
+ map_attribute "mathcolor", to: :mathcolor
18
+ map_attribute "mathbackground", to: :mathbackground
19
+ map_attribute "linethickness", to: :linethickness
20
+ map_attribute "numalign", to: :numalign
21
+ map_attribute "denomalign", to: :denomalign
22
+ map_attribute "bevelled", to: :bevelled
21
23
  end
22
24
  end
23
25
  end
data/lib/mml/mfraction.rb CHANGED
@@ -10,14 +10,16 @@ module Mml
10
10
  attribute :bevelled, :string
11
11
 
12
12
  xml do
13
- root "mfraction", mixed: true
13
+ namespace Namespace
14
+ element "mfraction"
15
+ mixed_content
14
16
 
15
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
16
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
17
- map_attribute "linethickness", to: :linethickness, namespace: nil
18
- map_attribute "numalign", to: :numalign, namespace: nil
19
- map_attribute "denomalign", to: :denomalign, namespace: nil
20
- map_attribute "bevelled", to: :bevelled, namespace: nil
17
+ map_attribute "mathcolor", to: :mathcolor
18
+ map_attribute "mathbackground", to: :mathbackground
19
+ map_attribute "linethickness", to: :linethickness
20
+ map_attribute "numalign", to: :numalign
21
+ map_attribute "denomalign", to: :denomalign
22
+ map_attribute "bevelled", to: :bevelled
21
23
  end
22
24
  end
23
25
  end
data/lib/mml/mglyph.rb CHANGED
@@ -20,24 +20,25 @@ module Mml
20
20
  attribute :mathbackground, :string
21
21
 
22
22
  xml do
23
- root "mglyph"
23
+ namespace Namespace
24
+ element "mglyph"
24
25
 
25
- map_attribute "src", to: :src, namespace: nil
26
- map_attribute "alt", to: :alt, namespace: nil
27
- map_attribute "color", to: :color, namespace: nil
28
- map_attribute "index", to: :index, namespace: nil
29
- map_attribute "width", to: :width, namespace: nil
30
- map_attribute "height", to: :height, namespace: nil
31
- map_attribute "valign", to: :valign, namespace: nil
32
- map_attribute "mathsize", to: :mathsize, namespace: nil
33
- map_attribute "fontsize", to: :fontsize, namespace: nil
34
- map_attribute "fontstyle", to: :fontstyle, namespace: nil
35
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
36
- map_attribute "background", to: :background, namespace: nil
37
- map_attribute "fontfamily", to: :fontfamily, namespace: nil
38
- map_attribute "fontweight", to: :fontweight, namespace: nil
39
- map_attribute "mathvariant", to: :mathvariant, namespace: nil
40
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
26
+ map_attribute "src", to: :src
27
+ map_attribute "alt", to: :alt
28
+ map_attribute "color", to: :color
29
+ map_attribute "index", to: :index
30
+ map_attribute "width", to: :width
31
+ map_attribute "height", to: :height
32
+ map_attribute "valign", to: :valign
33
+ map_attribute "mathsize", to: :mathsize
34
+ map_attribute "fontsize", to: :fontsize
35
+ map_attribute "fontstyle", to: :fontstyle
36
+ map_attribute "mathcolor", to: :mathcolor
37
+ map_attribute "background", to: :background
38
+ map_attribute "fontfamily", to: :fontfamily
39
+ map_attribute "fontweight", to: :fontweight
40
+ map_attribute "mathvariant", to: :mathvariant
41
+ map_attribute "mathbackground", to: :mathbackground
41
42
  end
42
43
  end
43
44
  end
data/lib/mml/mi.rb CHANGED
@@ -16,20 +16,21 @@ module Mml
16
16
  attribute :mathbackground, :string
17
17
 
18
18
  xml do
19
- root "mi"
19
+ namespace Namespace
20
+ element "mi"
20
21
 
21
22
  map_content to: :value
22
- map_attribute "dir", to: :dir, namespace: nil
23
- map_attribute "color", to: :color, namespace: nil
24
- map_attribute "mathsize", to: :mathsize, namespace: nil
25
- map_attribute "fontsize", to: :fontsize, namespace: nil
26
- map_attribute "fontstyle", to: :fontstyle, namespace: nil
27
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
28
- map_attribute "fontfamily", to: :fontfamily, namespace: nil
29
- map_attribute "fontweight", to: :fontweight, namespace: nil
30
- map_attribute "background", to: :background, namespace: nil
31
- map_attribute "mathvariant", to: :mathvariant, namespace: nil
32
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
23
+ map_attribute "dir", to: :dir
24
+ map_attribute "color", to: :color
25
+ map_attribute "mathsize", to: :mathsize
26
+ map_attribute "fontsize", to: :fontsize
27
+ map_attribute "fontstyle", to: :fontstyle
28
+ map_attribute "mathcolor", to: :mathcolor
29
+ map_attribute "fontfamily", to: :fontfamily
30
+ map_attribute "fontweight", to: :fontweight
31
+ map_attribute "background", to: :background
32
+ map_attribute "mathvariant", to: :mathvariant
33
+ map_attribute "mathbackground", to: :mathbackground
33
34
  end
34
35
  end
35
36
  end
@@ -13,14 +13,16 @@ module Mml
13
13
  attribute :mtd_value, Mtd, collection: true
14
14
 
15
15
  xml do
16
- root "mlabeledtr", mixed: true
16
+ namespace Namespace
17
+ element "mlabeledtr"
18
+ mixed_content
17
19
 
18
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
19
- map_attribute "columnalign", to: :columnalign, namespace: nil
20
- map_attribute "groupalign", to: :groupalign, namespace: nil
21
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
22
- map_attribute "rowalign", to: :rowalign, namespace: nil
23
- map_attribute "id", to: :id, namespace: nil
20
+ map_attribute "mathbackground", to: :mathbackground
21
+ map_attribute "columnalign", to: :columnalign
22
+ map_attribute "groupalign", to: :groupalign
23
+ map_attribute "mathcolor", to: :mathcolor
24
+ map_attribute "rowalign", to: :rowalign
25
+ map_attribute "id", to: :id
24
26
  map_element "mtd", to: :mtd_value
25
27
  end
26
28
  end
data/lib/mml/mlongdiv.rb CHANGED
@@ -9,13 +9,15 @@ module Mml
9
9
  attribute :shift, :integer
10
10
 
11
11
  xml do
12
- root "mlongdiv", mixed: true
12
+ namespace Namespace
13
+ element "mlongdiv"
14
+ mixed_content
13
15
 
14
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
15
- map_attribute "longdivstyle", to: :longdivstyle, namespace: nil
16
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
17
- map_attribute "position", to: :position, namespace: nil
18
- map_attribute "shift", to: :shift, namespace: nil
16
+ map_attribute "mathbackground", to: :mathbackground
17
+ map_attribute "longdivstyle", to: :longdivstyle
18
+ map_attribute "mathcolor", to: :mathcolor
19
+ map_attribute "position", to: :position
20
+ map_attribute "shift", to: :shift
19
21
  end
20
22
  end
21
23
  end
@@ -11,12 +11,14 @@ module Mml
11
11
  attribute :mprescripts_value, Mprescripts
12
12
 
13
13
  xml do
14
- root "mmultiscripts", mixed: true
14
+ namespace Namespace
15
+ element "mmultiscripts"
16
+ mixed_content
15
17
 
16
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
17
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
18
- map_attribute "subscriptshift", to: :subscriptshift, namespace: nil
19
- map_attribute "superscriptshift", to: :superscriptshift, namespace: nil
18
+ map_attribute "mathcolor", to: :mathcolor
19
+ map_attribute "mathbackground", to: :mathbackground
20
+ map_attribute "subscriptshift", to: :subscriptshift
21
+ map_attribute "superscriptshift", to: :superscriptshift
20
22
  map_element "mprescripts", to: :mprescripts_value
21
23
  end
22
24
  end
data/lib/mml/mn.rb CHANGED
@@ -16,20 +16,21 @@ module Mml
16
16
  attribute :background, :string
17
17
 
18
18
  xml do
19
- root "mn"
19
+ namespace Namespace
20
+ element "mn"
20
21
 
21
22
  map_content to: :value
22
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
23
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
24
- map_attribute "mathvariant", to: :mathvariant, namespace: nil
25
- map_attribute "mathsize", to: :mathsize, namespace: nil
26
- map_attribute "dir", to: :dir, namespace: nil
27
- map_attribute "fontfamily", to: :fontfamily, namespace: nil
28
- map_attribute "fontweight", to: :fontweight, namespace: nil
29
- map_attribute "fontstyle", to: :fontstyle, namespace: nil
30
- map_attribute "fontsize", to: :fontsize, namespace: nil
31
- map_attribute "color", to: :color, namespace: nil
32
- map_attribute "background", to: :background, namespace: nil
23
+ map_attribute "mathcolor", to: :mathcolor
24
+ map_attribute "mathbackground", to: :mathbackground
25
+ map_attribute "mathvariant", to: :mathvariant
26
+ map_attribute "mathsize", to: :mathsize
27
+ map_attribute "dir", to: :dir
28
+ map_attribute "fontfamily", to: :fontfamily
29
+ map_attribute "fontweight", to: :fontweight
30
+ map_attribute "fontstyle", to: :fontstyle
31
+ map_attribute "fontsize", to: :fontsize
32
+ map_attribute "color", to: :color
33
+ map_attribute "background", to: :background
33
34
  end
34
35
  end
35
36
  end
data/lib/mml/mo.rb CHANGED
@@ -40,43 +40,44 @@ module Mml
40
40
 
41
41
  # rubocop:disable Metrics/BlockLength
42
42
  xml do
43
- root "mo"
43
+ namespace Namespace
44
+ element "mo"
44
45
 
45
46
  map_content to: :value
46
- map_attribute "dir", to: :dir, namespace: nil
47
- map_attribute "form", to: :form, namespace: nil
48
- map_attribute "fence", to: :fence, namespace: nil
49
- map_attribute "color", to: :color, namespace: nil
50
- map_attribute "accent", to: :accent, namespace: nil
51
- map_attribute "lspace", to: :lspace, namespace: nil
52
- map_attribute "rspace", to: :rspace, namespace: nil
53
- map_attribute "maxsize", to: :maxsize, namespace: nil
54
- map_attribute "minsize", to: :minsize, namespace: nil
55
- map_attribute "largeop", to: :largeop, namespace: nil
56
- map_attribute "stretchy", to: :stretchy, namespace: nil
57
- map_attribute "mathsize", to: :mathsize, namespace: nil
58
- map_attribute "fontsize", to: :fontsize, namespace: nil
59
- map_attribute "linebreak", to: :linebreak, namespace: nil
60
- map_attribute "fontstyle", to: :fontstyle, namespace: nil
61
- map_attribute "separator", to: :separator, namespace: nil
62
- map_attribute "symmetric", to: :symmetric, namespace: nil
63
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
64
- map_attribute "fontfamily", to: :fontfamily, namespace: nil
65
- map_attribute "fontweight", to: :fontweight, namespace: nil
66
- map_attribute "background", to: :background, namespace: nil
67
- map_attribute "mathvariant", to: :mathvariant, namespace: nil
68
- map_attribute "lineleading", to: :lineleading, namespace: nil
69
- map_attribute "indentalign", to: :indentalign, namespace: nil
70
- map_attribute "indentshift", to: :indentshift, namespace: nil
71
- map_attribute "indenttarget", to: :indenttarget, namespace: nil
72
- map_attribute "movablelimits", to: :movablelimits, namespace: nil
73
- map_attribute "linebreakstyle", to: :linebreakstyle, namespace: nil
74
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
75
- map_attribute "indentalignlast", to: :indentalignlast, namespace: nil
76
- map_attribute "indentshiftlast", to: :indentshiftlast, namespace: nil
77
- map_attribute "indentalignfirst", to: :indentalignfirst, namespace: nil
78
- map_attribute "indentshiftfirst", to: :indentshiftfirst, namespace: nil
79
- map_attribute "linebreakmultchar", to: :linebreakmultchar, namespace: nil
47
+ map_attribute "dir", to: :dir
48
+ map_attribute "form", to: :form
49
+ map_attribute "fence", to: :fence
50
+ map_attribute "color", to: :color
51
+ map_attribute "accent", to: :accent
52
+ map_attribute "lspace", to: :lspace
53
+ map_attribute "rspace", to: :rspace
54
+ map_attribute "maxsize", to: :maxsize
55
+ map_attribute "minsize", to: :minsize
56
+ map_attribute "largeop", to: :largeop
57
+ map_attribute "stretchy", to: :stretchy
58
+ map_attribute "mathsize", to: :mathsize
59
+ map_attribute "fontsize", to: :fontsize
60
+ map_attribute "linebreak", to: :linebreak
61
+ map_attribute "fontstyle", to: :fontstyle
62
+ map_attribute "separator", to: :separator
63
+ map_attribute "symmetric", to: :symmetric
64
+ map_attribute "mathcolor", to: :mathcolor
65
+ map_attribute "fontfamily", to: :fontfamily
66
+ map_attribute "fontweight", to: :fontweight
67
+ map_attribute "background", to: :background
68
+ map_attribute "mathvariant", to: :mathvariant
69
+ map_attribute "lineleading", to: :lineleading
70
+ map_attribute "indentalign", to: :indentalign
71
+ map_attribute "indentshift", to: :indentshift
72
+ map_attribute "indenttarget", to: :indenttarget
73
+ map_attribute "movablelimits", to: :movablelimits
74
+ map_attribute "linebreakstyle", to: :linebreakstyle
75
+ map_attribute "mathbackground", to: :mathbackground
76
+ map_attribute "indentalignlast", to: :indentalignlast
77
+ map_attribute "indentshiftlast", to: :indentshiftlast
78
+ map_attribute "indentalignfirst", to: :indentalignfirst
79
+ map_attribute "indentshiftfirst", to: :indentshiftfirst
80
+ map_attribute "linebreakmultchar", to: :linebreakmultchar
80
81
  end
81
82
  # rubocop:enable Metrics/BlockLength
82
83
  end
data/lib/mml/mover.rb CHANGED
@@ -8,12 +8,14 @@ module Mml
8
8
  attribute :align, :string
9
9
 
10
10
  xml do
11
- root "mover", mixed: true
11
+ namespace Namespace
12
+ element "mover"
13
+ mixed_content
12
14
 
13
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
14
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
15
- map_attribute "accent", to: :accent, namespace: nil
16
- map_attribute "align", to: :align, namespace: nil
15
+ map_attribute "mathbackground", to: :mathbackground
16
+ map_attribute "mathcolor", to: :mathcolor
17
+ map_attribute "accent", to: :accent
18
+ map_attribute "align", to: :align
17
19
  end
18
20
  end
19
21
  end
data/lib/mml/mpadded.rb CHANGED
@@ -11,15 +11,17 @@ module Mml
11
11
  attribute :width, :string
12
12
 
13
13
  xml do
14
- root "mpadded", mixed: true
14
+ namespace Namespace
15
+ element "mpadded"
16
+ mixed_content
15
17
 
16
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
17
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
18
- map_attribute "voffset", to: :voffset, namespace: nil
19
- map_attribute "height", to: :height, namespace: nil
20
- map_attribute "lspace", to: :lspace, namespace: nil
21
- map_attribute "depth", to: :depth, namespace: nil
22
- map_attribute "width", to: :width, namespace: nil
18
+ map_attribute "mathbackground", to: :mathbackground
19
+ map_attribute "mathcolor", to: :mathcolor
20
+ map_attribute "voffset", to: :voffset
21
+ map_attribute "height", to: :height
22
+ map_attribute "lspace", to: :lspace
23
+ map_attribute "depth", to: :depth
24
+ map_attribute "width", to: :width
23
25
  end
24
26
  end
25
27
  end
data/lib/mml/mphantom.rb CHANGED
@@ -6,10 +6,12 @@ module Mml
6
6
  attribute :mathbackground, :string
7
7
 
8
8
  xml do
9
- root "mphantom", mixed: true
9
+ namespace Namespace
10
+ element "mphantom"
11
+ mixed_content
10
12
 
11
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
12
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
13
+ map_attribute "mathcolor", to: :mathcolor
14
+ map_attribute "mathbackground", to: :mathbackground
13
15
  end
14
16
  end
15
17
  end
@@ -6,10 +6,11 @@ module Mml
6
6
  attribute :mathbackground, :string
7
7
 
8
8
  xml do
9
- root "mprescripts"
9
+ namespace Namespace
10
+ element "mprescripts"
10
11
 
11
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
12
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
12
+ map_attribute "mathcolor", to: :mathcolor
13
+ map_attribute "mathbackground", to: :mathbackground
13
14
  end
14
15
  end
15
16
  end
data/lib/mml/mroot.rb CHANGED
@@ -6,10 +6,12 @@ module Mml
6
6
  attribute :mathbackground, :string
7
7
 
8
8
  xml do
9
- root "mroot", mixed: true
9
+ namespace Namespace
10
+ element "mroot"
11
+ mixed_content
10
12
 
11
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
12
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
13
+ map_attribute "mathcolor", to: :mathcolor
14
+ map_attribute "mathbackground", to: :mathbackground
13
15
  end
14
16
  end
15
17
  end
data/lib/mml/mrow.rb CHANGED
@@ -9,13 +9,15 @@ module Mml
9
9
  attribute :dir, :string
10
10
 
11
11
  xml do
12
- root "mrow", mixed: true
12
+ namespace Namespace
13
+ element "mrow"
14
+ mixed_content
13
15
 
14
16
  map_content to: :content
15
- map_attribute "dir", to: :dir, namespace: nil
16
- map_attribute "intent", to: :intent, namespace: nil
17
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
18
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
17
+ map_attribute "dir", to: :dir
18
+ map_attribute "intent", to: :intent
19
+ map_attribute "mathcolor", to: :mathcolor
20
+ map_attribute "mathbackground", to: :mathbackground
19
21
  end
20
22
  end
21
23
  end
data/lib/mml/ms.rb CHANGED
@@ -18,22 +18,24 @@ module Mml
18
18
  attribute :dir, :string
19
19
 
20
20
  xml do
21
- root "ms", mixed: true
21
+ namespace Namespace
22
+ element "ms"
23
+ mixed_content
22
24
 
23
25
  map_content to: :value
24
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
25
- map_attribute "mathvariant", to: :mathvariant, namespace: nil
26
- map_attribute "fontfamily", to: :fontfamily, namespace: nil
27
- map_attribute "fontweight", to: :fontweight, namespace: nil
28
- map_attribute "background", to: :background, namespace: nil
29
- map_attribute "fontstyle", to: :fontstyle, namespace: nil
30
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
31
- map_attribute "fontsize", to: :fontsize, namespace: nil
32
- map_attribute "mathsize", to: :mathsize, namespace: nil
33
- map_attribute "lquote", to: :lquote, namespace: nil
34
- map_attribute "rquote", to: :rquote, namespace: nil
35
- map_attribute "color", to: :color, namespace: nil
36
- map_attribute "dir", to: :dir, namespace: nil
26
+ map_attribute "mathbackground", to: :mathbackground
27
+ map_attribute "mathvariant", to: :mathvariant
28
+ map_attribute "fontfamily", to: :fontfamily
29
+ map_attribute "fontweight", to: :fontweight
30
+ map_attribute "background", to: :background
31
+ map_attribute "fontstyle", to: :fontstyle
32
+ map_attribute "mathcolor", to: :mathcolor
33
+ map_attribute "fontsize", to: :fontsize
34
+ map_attribute "mathsize", to: :mathsize
35
+ map_attribute "lquote", to: :lquote
36
+ map_attribute "rquote", to: :rquote
37
+ map_attribute "color", to: :color
38
+ map_attribute "dir", to: :dir
37
39
  end
38
40
  end
39
41
  end
data/lib/mml/mscarries.rb CHANGED
@@ -10,15 +10,16 @@ module Mml
10
10
  attribute :crossout, :string
11
11
 
12
12
  xml do
13
- root "mscarries", mixed: true
13
+ namespace Namespace
14
+ element "mscarries"
15
+ mixed_content
14
16
 
15
- map_attribute "scriptsizemultiplier", to: :scriptsizemultiplier,
16
- namespace: nil
17
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
18
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
19
- map_attribute "position", to: :position, namespace: nil
20
- map_attribute "location", to: :location, namespace: nil
21
- map_attribute "crossout", to: :crossout, namespace: nil
17
+ map_attribute "scriptsizemultiplier", to: :scriptsizemultiplier
18
+ map_attribute "mathbackground", to: :mathbackground
19
+ map_attribute "mathcolor", to: :mathcolor
20
+ map_attribute "position", to: :position
21
+ map_attribute "location", to: :location
22
+ map_attribute "crossout", to: :crossout
22
23
  end
23
24
  end
24
25
  end
data/lib/mml/mscarry.rb CHANGED
@@ -8,12 +8,14 @@ module Mml
8
8
  attribute :crossout, :string
9
9
 
10
10
  xml do
11
- root "mscarry", mixed: true
11
+ namespace Namespace
12
+ element "mscarry"
13
+ mixed_content
12
14
 
13
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
14
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
15
- map_attribute "location", to: :location, namespace: nil
16
- map_attribute "crossout", to: :crossout, namespace: nil
15
+ map_attribute "mathcolor", to: :mathcolor
16
+ map_attribute "mathbackground", to: :mathbackground
17
+ map_attribute "location", to: :location
18
+ map_attribute "crossout", to: :crossout
17
19
  end
18
20
  end
19
21
  end
data/lib/mml/msgroup.rb CHANGED
@@ -9,13 +9,15 @@ module Mml
9
9
  attribute :msgroup_text, :string
10
10
 
11
11
  xml do
12
- root "msgroup", mixed: true
12
+ namespace Namespace
13
+ element "msgroup"
14
+ mixed_content
13
15
 
14
16
  map_content to: :msgroup_text
15
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
16
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
17
- map_attribute "position", to: :position, namespace: nil
18
- map_attribute "shift", to: :shift, namespace: nil
17
+ map_attribute "mathcolor", to: :mathcolor
18
+ map_attribute "mathbackground", to: :mathbackground
19
+ map_attribute "position", to: :position
20
+ map_attribute "shift", to: :shift
19
21
  end
20
22
  end
21
23
  end
data/lib/mml/msline.rb CHANGED
@@ -11,15 +11,16 @@ module Mml
11
11
  attribute :mslinethickness, :string
12
12
 
13
13
  xml do
14
- root "msline"
14
+ namespace Namespace
15
+ element "msline"
15
16
 
16
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
17
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
18
- map_attribute "position", to: :position, namespace: nil
19
- map_attribute "length", to: :length, namespace: nil
20
- map_attribute "leftoverhang", to: :leftoverhang, namespace: nil
21
- map_attribute "rightoverhang", to: :rightoverhang, namespace: nil
22
- map_attribute "mslinethickness", to: :mslinethickness, namespace: nil
17
+ map_attribute "mathcolor", to: :mathcolor
18
+ map_attribute "mathbackground", to: :mathbackground
19
+ map_attribute "position", to: :position
20
+ map_attribute "length", to: :length
21
+ map_attribute "leftoverhang", to: :leftoverhang
22
+ map_attribute "rightoverhang", to: :rightoverhang
23
+ map_attribute "mslinethickness", to: :mslinethickness
23
24
  end
24
25
  end
25
26
  end
data/lib/mml/mspace.rb CHANGED
@@ -26,30 +26,31 @@ module Mml
26
26
  attribute :indentshiftlast, :string
27
27
 
28
28
  xml do
29
- root "mspace"
29
+ namespace Namespace
30
+ element "mspace"
30
31
 
31
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
32
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
33
- map_attribute "mathvariant", to: :mathvariant, namespace: nil
34
- map_attribute "mathsize", to: :mathsize, namespace: nil
35
- map_attribute "dir", to: :dir, namespace: nil
36
- map_attribute "fontfamily", to: :fontfamily, namespace: nil
37
- map_attribute "fontweight", to: :fontweight, namespace: nil
38
- map_attribute "fontstyle", to: :fontstyle, namespace: nil
39
- map_attribute "fontsize", to: :fontsize, namespace: nil
40
- map_attribute "color", to: :color, namespace: nil
41
- map_attribute "background", to: :background, namespace: nil
42
- map_attribute "width", to: :width, namespace: nil
43
- map_attribute "height", to: :height, namespace: nil
44
- map_attribute "depth", to: :depth, namespace: nil
45
- map_attribute "linebreak", to: :linebreak, namespace: nil
46
- map_attribute "indentalign", to: :indentalign, namespace: nil
47
- map_attribute "indentshift", to: :indentshift, namespace: nil
48
- map_attribute "indenttarget", to: :indenttarget, namespace: nil
49
- map_attribute "indentalignfirst", to: :indentalignfirst, namespace: nil
50
- map_attribute "indentshiftfirst", to: :indentshiftfirst, namespace: nil
51
- map_attribute "indentalignlast", to: :indentalignlast, namespace: nil
52
- map_attribute "indentshiftlast", to: :indentshiftlast, namespace: nil
32
+ map_attribute "mathcolor", to: :mathcolor
33
+ map_attribute "mathbackground", to: :mathbackground
34
+ map_attribute "mathvariant", to: :mathvariant
35
+ map_attribute "mathsize", to: :mathsize
36
+ map_attribute "dir", to: :dir
37
+ map_attribute "fontfamily", to: :fontfamily
38
+ map_attribute "fontweight", to: :fontweight
39
+ map_attribute "fontstyle", to: :fontstyle
40
+ map_attribute "fontsize", to: :fontsize
41
+ map_attribute "color", to: :color
42
+ map_attribute "background", to: :background
43
+ map_attribute "width", to: :width
44
+ map_attribute "height", to: :height
45
+ map_attribute "depth", to: :depth
46
+ map_attribute "linebreak", to: :linebreak
47
+ map_attribute "indentalign", to: :indentalign
48
+ map_attribute "indentshift", to: :indentshift
49
+ map_attribute "indenttarget", to: :indenttarget
50
+ map_attribute "indentalignfirst", to: :indentalignfirst
51
+ map_attribute "indentshiftfirst", to: :indentshiftfirst
52
+ map_attribute "indentalignlast", to: :indentalignlast
53
+ map_attribute "indentshiftlast", to: :indentshiftlast
53
54
  end
54
55
  end
55
56
  end
data/lib/mml/msqrt.rb CHANGED
@@ -6,10 +6,12 @@ module Mml
6
6
  attribute :mathbackground, :string
7
7
 
8
8
  xml do
9
- root "msqrt", mixed: true
9
+ namespace Namespace
10
+ element "msqrt"
11
+ mixed_content
10
12
 
11
- map_attribute "mathcolor", to: :mathcolor, namespace: nil
12
- map_attribute "mathbackground", to: :mathbackground, namespace: nil
13
+ map_attribute "mathcolor", to: :mathcolor
14
+ map_attribute "mathbackground", to: :mathbackground
13
15
  end
14
16
  end
15
17
  end