Class: Katex2HTML::Renderer

Inherits:
Object
  • Object
show all
Defined in:
lib/katex2html/renderer.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Renderer

Returns a new instance of Renderer.



5
6
7
# File 'lib/katex2html/renderer.rb', line 5

def initialize(options = {})
  @options = default_opts.merge(options)
end

Instance Method Details

#render(latex) ⇒ Object



9
10
11
# File 'lib/katex2html/renderer.rb', line 9

def render(latex)
  context.call("katex.renderToString", latex, @options)
end