Sync with latest Maruku.
Pave the way for Blahtex (PNG-based math) support (from Ari Stern).
   (no visible functionality, yet, but that will come)
This commit is contained in:
Jacques Distler 2008-07-26 04:14:41 -05:00
parent 4e3aefd9d3
commit c427807274
33 changed files with 610 additions and 101 deletions

View file

@ -303,7 +303,7 @@ class WikiController < ApplicationController
end
def tex
if @web.markup == :markdownMML or @web.markup == :markdown
if @web.markup == :markdownMML or @web.markup == :markdownPNG or @web.markup == :markdown
@tex_content = Maruku.new(@page.content).to_latex
else
@tex_content = 'TeX export only supported with the Markdown text filters.'
@ -311,7 +311,7 @@ class WikiController < ApplicationController
end
def s5
if @web.markup == :markdownMML || @web.markup == :markdown
if @web.markup == :markdownMML || @web.markup == :markdownPNG || @web.markup == :markdown
my_rendered = PageRenderer.new(@page.revisions.last)
@s5_content = my_rendered.display_s5
@s5_theme = my_rendered.s5_theme
@ -343,7 +343,7 @@ class WikiController < ApplicationController
# end
def export_page_to_tex(file_path)
if @web.markup == :markdownMML
if @web.markup == :markdownMML || @web.markup == :markdownPNG
@tex_content = Maruku.new(@page.content).to_latex
else
@tex_content = 'TeX export only supported with the Markdown text filters.'
@ -423,7 +423,7 @@ class WikiController < ApplicationController
def render_tex_web
@web.select.by_name.inject({}) do |tex_web, page|
if @web.markup == :markdownMML
if @web.markup == :markdownMML || @web.markup == :markdownPNG
tex_web[page.name] = Maruku.new(page.content).to_latex
else
tex_web[page.name] = 'TeX export only supported with the Markdown text filters.'