Module: Mml::Base::Mstyle

Included in:
V2::Mstyle, V3::Mstyle, V4::Mstyle
Defined in:
lib/mml/base/mstyle.rb

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object

NOTE: class_eval resolves constants in module’s lexical scope. Use fully qualified names (e.g., Mml::Namespace).



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/mml/base/mstyle.rb', line 8

def self.included(klass)
  klass.class_eval do
    include UniversalPresentationAttributes

    attribute :scriptsizemultiplier, :integer
    attribute :scriptminsize, :string
    attribute :infixlinebreakstyle, :string
    attribute :decimalpoint, :string
    attribute :accent, :string
    attribute :accentunder, :string
    attribute :align, :string
    attribute :alignmentscope, :string
    attribute :bevelled, :string
    attribute :charalign, :string
    attribute :charspacing, :string
    attribute :close, :string
    attribute :columnalign, :string
    attribute :columnlines, :string
    attribute :columnspacing, :string
    attribute :columnspan, :integer
    attribute :columnwidth, :string
    attribute :crossout, :string
    attribute :denomalign, :string
    attribute :depth, :string
    attribute :edge, :string
    attribute :equalcolumns, :string
    attribute :equalrows, :string
    attribute :form, :string
    attribute :frame, :string
    attribute :framespacing, :string
    attribute :height, :string
    attribute :indentalign, :string
    attribute :indentalignfirst, :string
    attribute :indentalignlast, :string
    attribute :indentshift, :string
    attribute :indentshiftfirst, :string
    attribute :indentshiftlast, :string
    attribute :indenttarget, :string
    attribute :largeop, :string
    attribute :leftoverhang, :string
    attribute :length, :integer
    attribute :linebreak, :string
    attribute :linebreakmultchar, :string
    attribute :linebreakstyle, :string
    attribute :lineleading, :string
    attribute :linethickness, :string
    attribute :location, :string
    attribute :longdivstyle, :string
    attribute :lquote, :string
    attribute :lspace, :string
    attribute :mathvariant, :string
    attribute :maxsize, :string
    attribute :minsize, :string
    attribute :movablelimits, :string
    attribute :mslinethickness, :string
    attribute :notation, :string
    attribute :numalign, :string
    attribute :open, :string
    attribute :position, :integer
    attribute :rightoverhang, :string
    attribute :rowalign, :string
    attribute :rowlines, :string
    attribute :rowspacing, :string
    attribute :rowspan, :integer
    attribute :rquote, :string
    attribute :rspace, :string
    attribute :selection, :integer
    attribute :separators, :string
    attribute :shift, :integer
    attribute :stackalign, :string
    attribute :stretchy, :string
    attribute :subscriptshift, :string
    attribute :superscriptshift, :string
    attribute :symmetric, :string
    attribute :valign, :string
    attribute :voffset, :string
    attribute :width, :string
    attribute :veryverythinmathspace, :string
    attribute :verythinmathspace, :string
    attribute :thinmathspace, :string
    attribute :mediummathspace, :string
    attribute :thickmathspace, :string
    attribute :verythickmathspace, :string
    attribute :veryverythickmathspace, :string

    # rubocop:disable Metrics/BlockLength
    xml do
      namespace Mml::Namespace
      element "mstyle"
      mixed_content

      map_attribute "scriptsizemultiplier", to: :scriptsizemultiplier
      map_attribute "scriptminsize", to: :scriptminsize
      map_attribute "infixlinebreakstyle", to: :infixlinebreakstyle
      map_attribute "decimalpoint", to: :decimalpoint
      map_attribute "accent", to: :accent
      map_attribute "accentunder", to: :accentunder
      map_attribute "align", to: :align
      map_attribute "alignmentscope", to: :alignmentscope
      map_attribute "bevelled", to: :bevelled
      map_attribute "charalign", to: :charalign
      map_attribute "charspacing", to: :charspacing
      map_attribute "close", to: :close
      map_attribute "columnalign", to: :columnalign
      map_attribute "columnlines", to: :columnlines
      map_attribute "columnspacing", to: :columnspacing
      map_attribute "columnspan", to: :columnspan
      map_attribute "columnwidth", to: :columnwidth
      map_attribute "crossout", to: :crossout
      map_attribute "denomalign", to: :denomalign
      map_attribute "depth", to: :depth
      map_attribute "edge", to: :edge
      map_attribute "equalcolumns", to: :equalcolumns
      map_attribute "equalrows", to: :equalrows
      map_attribute "form", to: :form
      map_attribute "frame", to: :frame
      map_attribute "framespacing", to: :framespacing
      map_attribute "height", to: :height
      map_attribute "indentalign", to: :indentalign
      map_attribute "indentalignfirst", to: :indentalignfirst
      map_attribute "indentalignlast", to: :indentalignlast
      map_attribute "indentshift", to: :indentshift
      map_attribute "indentshiftfirst", to: :indentshiftfirst
      map_attribute "indentshiftlast", to: :indentshiftlast
      map_attribute "indenttarget", to: :indenttarget
      map_attribute "largeop", to: :largeop
      map_attribute "leftoverhang", to: :leftoverhang
      map_attribute "length", to: :length
      map_attribute "linebreak", to: :linebreak
      map_attribute "linebreakmultchar", to: :linebreakmultchar
      map_attribute "linebreakstyle", to: :linebreakstyle
      map_attribute "lineleading", to: :lineleading
      map_attribute "linethickness", to: :linethickness
      map_attribute "location", to: :location
      map_attribute "longdivstyle", to: :longdivstyle
      map_attribute "lquote", to: :lquote
      map_attribute "lspace", to: :lspace
      map_attribute "mathvariant", to: :mathvariant
      map_attribute "maxsize", to: :maxsize
      map_attribute "minsize", to: :minsize
      map_attribute "movablelimits", to: :movablelimits
      map_attribute "mslinethickness", to: :mslinethickness
      map_attribute "notation", to: :notation
      map_attribute "numalign", to: :numalign
      map_attribute "open", to: :open
      map_attribute "position", to: :position
      map_attribute "rightoverhang", to: :rightoverhang
      map_attribute "rowalign", to: :rowalign
      map_attribute "rowlines", to: :rowlines
      map_attribute "rowspacing", to: :rowspacing
      map_attribute "rowspan", to: :rowspan
      map_attribute "rquote", to: :rquote
      map_attribute "rspace", to: :rspace
      map_attribute "selection", to: :selection
      map_attribute "separators", to: :separators
      map_attribute "shift", to: :shift
      map_attribute "stackalign", to: :stackalign
      map_attribute "stretchy", to: :stretchy
      map_attribute "subscriptshift", to: :subscriptshift
      map_attribute "superscriptshift", to: :superscriptshift
      map_attribute "symmetric", to: :symmetric
      map_attribute "valign", to: :valign
      map_attribute "voffset", to: :voffset
      map_attribute "width", to: :width
      map_attribute "veryverythinmathspace", to: :veryverythinmathspace
      map_attribute "verythinmathspace", to: :verythinmathspace
      map_attribute "thinmathspace", to: :thinmathspace
      map_attribute "mediummathspace", to: :mediummathspace
      map_attribute "thickmathspace", to: :thickmathspace
      map_attribute "verythickmathspace", to: :verythickmathspace
      map_attribute "veryverythickmathspace", to: :veryverythickmathspace
    end
    # rubocop:enable Metrics/BlockLength
  end
end