Sha256: abaf6da53f1873dccb08806fa477e185493c9a1b3887d7f840ec6227c1907382

Contents?: true

Size: 592 Bytes

Versions: 17

Compression:

Stored size: 592 Bytes

Contents

module MaRuKu; module Out; module 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 end end

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
bai-maruku-0.5.9 lib/maruku/ext/math/mathml_engines/ritex.rb
remi-maruku-0.5.9 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.6.1 lib/maruku/ext/math/mathml_engines/ritex.rb
maiku-0.6.1.maiku lib/maruku/ext/math/mathml_engines/ritex.rb
patcito-maruku-0.6.0 lib/maruku/ext/math/mathml_engines/ritex.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/maruku-0.6.0/lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.5.0 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.5.3 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.5.1 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.5.2 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.5.4 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.5.6 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.5.5 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.5.8 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.5.7 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.5.9 lib/maruku/ext/math/mathml_engines/ritex.rb
maruku-0.6.0 lib/maruku/ext/math/mathml_engines/ritex.rb