Module: Mathematical::Corrections

Included in:
Render
Defined in:
lib/mathematical/corrections.rb

Instance Method Summary collapse

Instance Method Details

#adjust_lt_gt(maths) ⇒ Object

from the itex website: It is possible (though probably not recommended) to insert MathML markup inside itex equations. So “<” and “>” are significant. To obtain a less-than or greater-than sign, you should use lt or gt, respectively.



12
13
14
# File 'lib/mathematical/corrections.rb', line 12

def adjust_lt_gt(maths)
  maths.gsub(/</, '\lt').gsub(/>/, '\gt')
end

#apply_corrections(maths) ⇒ Object



4
5
6
# File 'lib/mathematical/corrections.rb', line 4

def apply_corrections(maths)
  maths = adjust_lt_gt(maths)
end