Sha256: 8806839c7d20f1a02d4e4deb387e1a35c1dcf26a4364e7f38b6e56c487866c46
Contents?: true
Size: 721 Bytes
Versions: 3
Compression:
Stored size: 721 Bytes
Contents
require File.dirname(__FILE__) + '/plugin' module JSC class MathJaxBlock < Liquid::Tag include JSC::Plugin def render(ctx) set_ctx ctx math_jax + '<script type="math/tex; mode=display">' end end class MathJaxInline < Liquid::Tag include JSC::Plugin def render(ctx) set_ctx ctx math_jax + '<script type="math/tex">' end end class MathJaxEnd < Liquid::Tag def render(ctx) '</script>' end end end Liquid::Template.register_tag('math', JSC::MathJaxBlock) Liquid::Template.register_tag('m', JSC::MathJaxInline) Liquid::Template.register_tag('endmath', JSC::MathJaxEnd) Liquid::Template.register_tag('em', JSC::MathJaxEnd)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jekyll-scientific-0.0.3 | lib/math_jax.rb |
jekyll-scientific-0.0.2 | lib/math_jax.rb |
jekyll-scientific-0.0.1 | lib/math_jax.rb |