ubuntuusers.de

Titel:
format scanned tex
Datum:
4. März 2011 10:18
Aktionen:
Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#!/usr/bin/env ruby
$VERBOSE=true

f = File.open ARGV[0],'r'

out = ''
f.each do |line|
	if line =~ /^\s?$/
		out << "\n\\\\\n"
	elsif line =~ /\-$/
		out << line.chomp.chop
	else
		out << line.chomp+' '
	end
end

puts out