Export Multiple Pages to TeX

Per a suggestion of Marco Gualtieri.
This commit is contained in:
Jacques Distler 2010-10-09 02:57:37 -05:00
parent 1c5df9e8b5
commit aee4f8b3a9
9 changed files with 312 additions and 278 deletions

View file

@ -184,6 +184,24 @@ EOL
def atom_with_headlines
render_atom(hide_description = true)
end
def tex_list
return unless is_post
if [:markdownMML, :markdownPNG, :markdown].include?(@web.markup)
@tex_content = ''
params.each do |name, p|
if p == 'tex' && @web.has_page?(name)
@tex_content << "\\section*\{#{name}\}\n\n".as_utf8
@tex_content << Maruku.new(@web.page(name).content).to_latex
end
end
else
@tex_content = 'TeX export only supported with the Markdown text filters.'
end
expire_action :controller => 'wiki', :web => @web.address, :action => 'list', :category => params['category']
render(:layout => 'tex')
end
def search
@query = params['query'].purify
@ -389,6 +407,7 @@ EOL
else
@tex_content = 'TeX export only supported with the Markdown text filters.'
end
render(:layout => 'tex')
end
def s5