Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jessykate/834610 to your computer and use it in GitHub Desktop.

Select an option

Save jessykate/834610 to your computer and use it in GitHub Desktop.

Revisions

  1. jessykate revised this gist Mar 14, 2012. 2 changed files with 0 additions and 22 deletions.
    22 changes: 0 additions & 22 deletions Jekyll or Octopress Liquid tag for MathJax.rb
    Original file line number Diff line number Diff line change
    @@ -1,22 +0,0 @@
    module Jekyll
    class MathJaxBlockTag < Liquid::Tag
    def render(context)
    '<script type="math/tex; mode=display">'
    end
    end
    class MathJaxInlineTag < Liquid::Tag
    def render(context)
    '<script type="math/tex">'
    end
    end
    class MathJaxEndTag < Liquid::Tag
    def render(context)
    '</script>'
    end
    end
    end

    Liquid::Template.register_tag('math', Jekyll::MathJaxBlockTag)
    Liquid::Template.register_tag('m', Jekyll::MathJaxInlineTag)
    Liquid::Template.register_tag('endmath', Jekyll::MathJaxEndTag)
    Liquid::Template.register_tag('em', Jekyll::MathJaxEndTag)
  2. jessykate revised this gist Mar 14, 2012. 1 changed file with 22 additions and 0 deletions.
    22 changes: 22 additions & 0 deletions Jekyll or Octopress Liquid tag for MathJax.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    module Jekyll
    class MathJaxBlockTag < Liquid::Tag
    def render(context)
    '<script type="math/tex; mode=display">'
    end
    end
    class MathJaxInlineTag < Liquid::Tag
    def render(context)
    '<script type="math/tex">'
    end
    end
    class MathJaxEndTag < Liquid::Tag
    def render(context)
    '</script>'
    end
    end
    end

    Liquid::Template.register_tag('math', Jekyll::MathJaxBlockTag)
    Liquid::Template.register_tag('m', Jekyll::MathJaxInlineTag)
    Liquid::Template.register_tag('endmath', Jekyll::MathJaxEndTag)
    Liquid::Template.register_tag('em', Jekyll::MathJaxEndTag)
  3. jessykate renamed this gist Feb 18, 2011. 1 changed file with 0 additions and 1 deletion.
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@

    module Jekyll
    class MathJaxBlockTag < Liquid::Tag
    def render(context)
  4. jessykate created this gist Feb 18, 2011.
    23 changes: 23 additions & 0 deletions Custom Liquid tag for MathJax
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@

    module Jekyll
    class MathJaxBlockTag < Liquid::Tag
    def render(context)
    '<script type="math/tex; mode=display">'
    end
    end
    class MathJaxInlineTag < Liquid::Tag
    def render(context)
    '<script type="math/tex">'
    end
    end
    class MathJaxEndTag < Liquid::Tag
    def render(context)
    '</script>'
    end
    end
    end

    Liquid::Template.register_tag('math', Jekyll::MathJaxBlockTag)
    Liquid::Template.register_tag('m', Jekyll::MathJaxInlineTag)
    Liquid::Template.register_tag('endmath', Jekyll::MathJaxEndTag)
    Liquid::Template.register_tag('em', Jekyll::MathJaxEndTag)