/usr/lib/ruby/vendor_ruby/maruku/ext/math/mathml_engines/ritex.rb is in ruby-maruku 0.7.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | module MaRuKu::Out::HTML
def convert_to_mathml_ritex(kind, tex)
begin
if not $ritex_parser
require 'ritex'
$ritex_parser = Ritex::Parser.new
end
mathml = $ritex_parser.parse(tex.strip)
doc = Document.new(mathml, {:respect_whitespace =>:all}).root
return doc
rescue LoadError => e
maruku_error "Could not load package 'ritex'.\n"+
"Please install it using:\n"+
" $ gem install ritex\n\n"+e.inspect
rescue Racc::ParseError => e
maruku_error "Could not parse TeX: \n#{tex}"+
"\n\n #{e.inspect}"
end
nil
end
end
|