Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replaced rdiscount with Maruku for Markdown with equation support

  • Loading branch information...
commit b094b933011e314ac24bd62d5563d5286783918c 1 parent 0e81edd
Mark Reid mreid authored
11 README.textile
View
@@ -80,8 +80,15 @@ The best way to install Jekyll is via RubyGems:
$ sudo gem install mojombo-jekyll -s http://gems.github.com/
Jekyll requires the gems `directory_watcher`, `liquid`, `open4`,
-and optionally `rdiscount` for markdown support. These are automatically
-installed by the gem install.
+and `maruku` for markdown support. These are automatically
+installed by the gem install command.
+
+Maruku comes with optional support for LaTeX to PNG rendering via
+"blahtex":http://gva.noekeon.org/blahtexml/ (Version 0.6) which must be in
+your $PATH along with `dvips`.
+
+(NOTE: the version of maruku I am using is `remi-maruku` on GitHub as it
+does not assume a fixed location for `dvips`.)
h2. Run
2  Rakefile
View
@@ -5,7 +5,7 @@ require 'lib/jekyll'
Hoe.new('jekyll', Jekyll::VERSION) do |p|
p.developer('Tom Preston-Werner', 'tom@mojombo.com')
p.summary = "Jekyll is a simple, blog aware, static site generator."
- p.extra_deps = ['RedCloth', 'liquid', 'classifier', 'rdiscount', 'directory_watcher', 'open4']
+ p.extra_deps = ['RedCloth', 'liquid', 'classifier', 'maruku', 'directory_watcher', 'open4']
end
desc "Open an irb session preloaded with this library"
1  TODO
View
@@ -1,2 +1,3 @@
+[ ] Easier configuration of Maruka and blahtex directories [mdreid]
[ ] Accurate "related posts" calculator
[ ] Autobuild
6 jekyll.gemspec
View
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency(%q<RedCloth>, [">= 0"])
s.add_runtime_dependency(%q<liquid>, [">= 0"])
s.add_runtime_dependency(%q<classifier>, [">= 0"])
- s.add_runtime_dependency(%q<rdiscount>, [">= 0"])
+ s.add_runtime_dependency(%q<maruku>, [">= 0"])
s.add_runtime_dependency(%q<directory_watcher>, [">= 0"])
s.add_runtime_dependency(%q<open4>, [">= 0"])
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<RedCloth>, [">= 0"])
s.add_dependency(%q<liquid>, [">= 0"])
s.add_dependency(%q<classifier>, [">= 0"])
- s.add_dependency(%q<rdiscount>, [">= 0"])
+ s.add_dependency(%q<maruku>, [">= 0"])
s.add_dependency(%q<directory_watcher>, [">= 0"])
s.add_dependency(%q<open4>, [">= 0"])
s.add_dependency(%q<hoe>, [">= 1.8.0"])
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<RedCloth>, [">= 0"])
s.add_dependency(%q<liquid>, [">= 0"])
s.add_dependency(%q<classifier>, [">= 0"])
- s.add_dependency(%q<rdiscount>, [">= 0"])
+ s.add_dependency(%q<maruku>, [">= 0"])
s.add_dependency(%q<directory_watcher>, [">= 0"])
s.add_dependency(%q<open4>, [">= 0"])
s.add_dependency(%q<hoe>, [">= 1.8.0"])
15 lib/jekyll.rb
View
@@ -13,9 +13,20 @@
require 'liquid'
require 'redcloth'
begin
- require 'rdiscount'
+ require 'maruku'
+ require 'maruku/ext/math'
+ # Switch off MathML output
+ MaRuKu::Globals[:html_math_output_mathml] = false
+ MaRuKu::Globals[:html_math_engine] = 'none'
+
+ # Turn on math to PNG support with blahtex
+ # Resulting PNGs stored in `images/latex`
+ MaRuKu::Globals[:html_math_output_png] = true
+ MaRuKu::Globals[:html_png_engine] = 'blahtex'
+ MaRuKu::Globals[:html_png_dir] = 'images/latex'
+ MaRuKu::Globals[:html_png_url] = '/images/latex/'
rescue LoadError
- puts "The rdiscount gem is required for markdown support!"
+ puts "The maruku gem is required for markdown support!"
end
require 'directory_watcher'
2  lib/jekyll/convertible.rb
View
@@ -30,7 +30,7 @@ def transform
self.content = RedCloth.new(self.content).to_html
when ".markdown":
self.ext = ".html"
- self.content = RDiscount.new(self.content).to_html
+ self.content = Maruku.new(self.content).to_html
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.