Class: Jekyll::JekyllTexEqn::RenderTexBlock

Inherits:
Liquid::Block
  • Object
show all
Defined in:
lib/jekyll-tex-eqn.rb

Overview

Liquid block for block equations

Constant Summary collapse

TAGNAME =
"eqn"

Instance Method Summary collapse

Instance Method Details

#render(context) ⇒ Object



243
244
245
246
247
# File 'lib/jekyll-tex-eqn.rb', line 243

def render(context)
  content = super
  svg = Generate.do_render(context, content, Util.get_option(Util::BLOCK_SCALE_KEY, Util::DEFAULT_BLOCK_SCALE).to_f, "\\begin{displaymath}\n", "\n\\end{displaymath}")
  "<div class='#{Util.get_option(Util::BLOCK_CLASS_KEY, "")}'><img width='#{svg[:width]}px' height='#{svg[:height]}px' src='/#{svg[:file]}'/></div>"
end