19 lines
513 B
Ruby
19 lines
513 B
Ruby
#!/usr/bin/ruby
|
|
0.upto(15) do |i|
|
|
Dir.chdir "sections/german/#{i.to_s.rjust(2, '0')}"
|
|
`ls -1 *.tex`.split("\n").map { |file| file.sub(/\.tex$/, '')}.each do |file|
|
|
`pdflatex --shell-escape #{file}.tex`
|
|
`pdfcrop #{file}.pdf`
|
|
`pdf2svg #{file}.pdf #{file}-orig.svg`
|
|
`pdf2svg #{file}-crop.pdf #{file}-crop.svg`
|
|
`rm #{file}.aux`
|
|
`rm #{file}.log`
|
|
`rm #{file}.out`
|
|
`rm #{file}.pdf`
|
|
`rm #{file}.svg`
|
|
#`rm #{file}.toc`
|
|
`rm #{file}-crop.pdf`
|
|
end
|
|
Dir.chdir "../../.."
|
|
end
|