Method: IsoDoc::PresentationXMLConvert#numeric_mathml?

Defined in:
lib/isodoc/presentation_function/math.rb

#numeric_mathml?(node) ⇒ Boolean

Returns:

  • (Boolean)


193
194
195
196
197
198
199
200
201
# File 'lib/isodoc/presentation_function/math.rb', line 193

def numeric_mathml?(node)
  m = {}
  node.traverse do |x|
    %w(mstyle mrow math text).include?(x.name) and next
    m[x.name] ||= 0
    m[x.name] += 1
  end
  m.keys.size == 1 && m["mn"] == 1
end