diff --git a/_plugins/latex.rb b/_plugins/latex.rb index 59dbba6..f07429d 100644 --- a/_plugins/latex.rb +++ b/_plugins/latex.rb @@ -1,33 +1,5 @@ require "mathematical" -# module Jekyll -# class LatexGenerator < Generator -# safe true -# def generate(site) -# blockRgx = /\$\$[^\$]+\$\$/ -# site.posts.each do |post| -# buf = StringIO.new -# prev = 0 -# post.content.to_enum(:match, blockRgx).with_index.each do |match, i| -# a, b = match.offset(i) -# buf << post.content[prev..a] - -# render = Mathematical.new.render(match[i]) -# buf << render[:data] - -# prev = b -# end -# buf << post.content[prev..post.content.length] -# p buf.string -# end -# inlineRgx = /[^\$]\$[^\$]+\$[^\$]/ -# site.posts.each do |post| -# p post.content.scan(inlineRgx) -# end -# end -# end -# end - $blockRgx = /((?\$\$[^\$]+\$\$)|[^\$](?\$[^\$]+\$)[^\$])/ module Jekyll