Sha256: e5dc4e93f1c565d26fe647c27fd8d560996810e3a9023e0652deb9bbf75ff368
Contents?: true
Size: 624 Bytes
Versions: 6
Compression:
Stored size: 624 Bytes
Contents
#!/usr/bin/env ruby require 'maruku' if File.basename($0) =~ /^marutex/ # Convert each file ARGV.each do |f| puts "Opening #{f}" # read file content input = File.open(f,'r').read # create Maruku doc = Maruku.new(input) # convert to a complete html document latex = doc.to_latex_document # write to file dir = File.dirname(f) job = File.join(dir, File.basename(f, File.extname(f))) filename = job + ".tex" File.open(filename,'w') do |f| f.puts latex end # run twice for cross references system "pdflatex '#{job}'" system "pdflatex '#{job}'" # system "open #{job}.pdf" end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
maruku-0.2.10 | bin/marutex |
maruku-0.2.6 | bin/marutex |
maruku-0.2.9 | bin/marutex |
maruku-0.2.5 | bin/marutex |
maruku-0.2.7 | bin/marutex |
maruku-0.2.8 | bin/marutex |