Sha256: e9b00853b1f40d4b5b06f3306d4b00f9abf197b1df0e0c5286997a404759db4e

Contents?: true

Size: 681 Bytes

Versions: 23

Compression:

Stored size: 681 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}'  '-output-directory=#{dir}' "
		system "pdflatex '#{job}' '-output-directory=#{dir}' "
		
#		system "open #{job}.pdf"
	end
end

Version data entries

23 entries across 23 versions & 4 rubygems

Version Path
bai-maruku-0.5.9 bin/marutex
remi-maruku-0.5.9 bin/marutex
maruku-0.6.1 bin/marutex
vanity-1.7.1 vendor/ruby/1.9.1/gems/maruku-0.6.0/bin/marutex
maruku-0.2.12 bin/marutex
maruku-0.2.13 bin/marutex
maruku-0.2.11 bin/marutex
maruku-0.4.2 bin/marutex
maruku-0.4.2.1 bin/marutex
maruku-0.3.0 bin/marutex
maruku-0.5.2 bin/marutex
maruku-0.4.1 bin/marutex
maruku-0.4.0 bin/marutex
maruku-0.5.0 bin/marutex
maruku-0.5.1 bin/marutex
maruku-0.5.3 bin/marutex
maruku-0.5.5 bin/marutex
maruku-0.5.4 bin/marutex
maruku-0.5.6 bin/marutex
maruku-0.5.8 bin/marutex