module Kramdown::Converter::MathEngine::Ritex
Uses the Ritex
library for converting math formulas to MathML.
Constants
- AVAILABLE
Ritex
is available if this constant istrue
.
Public Class Methods
call(converter, el, opts)
click to toggle source
# File lib/kramdown/converter/math_engine/ritex.rb 23 def self.call(converter, el, opts) 24 type = el.options[:category] 25 result = ::Ritex::Parser.new.parse(el.value, :display => (type == :block)) 26 27 attr = el.attr.dup 28 attr.delete('xmlns') 29 attr.delete('display') 30 result.insert("<math".length, converter.html_attributes(attr)) 31 32 (type == :block ? "#{' '*opts[:indent]}#{result}\n" : result) 33 end