app/controllers/wiki.rb in Pimki-1.8.092 vs app/controllers/wiki.rb in Pimki-1.8.200

- old
+ new

@@ -912,10 +912,16 @@ tex File.open(file_path, "w") { |f| f.write(template_engine("tex").result(binding)) } end def convert_tex_to_pdf(tex_path) - `cd #{File.dirname(tex_path)}; pdflatex --interaction=scrollmode '#{File.basename(tex_path)}'` + if RUBY_PLATFORM =~ /mswin/ + cmd = "cd #{File.dirname(tex_path)} & pdflatex -interaction=nonstopmode #{File.basename(tex_path)}" + cmd.gsub!("/","\\") + `cmd /c #{cmd}` + else + `cd #{File.dirname(tex_path)}; pdflatex --interaction=scrollmode '#{File.basename(tex_path)}'` + end end def truncate(text, length = 30, truncate_string = "...") if text.length > length then text[0..(length - 3)] + truncate_string else text end end \ No newline at end of file