2003-12-01 10:12:49 +03:00
|
|
|
#!/usr/local/bin/ruby
|
2008-01-17 22:29:16 +03:00
|
|
|
# Illustration of a script to convert an RDoc-style file to a LaTeX document
|
2003-12-01 10:12:49 +03:00
|
|
|
|
2008-01-17 22:29:16 +03:00
|
|
|
require 'rdoc/markup'
|
|
|
|
require 'rdoc/markup/to_latex'
|
2003-12-01 10:12:49 +03:00
|
|
|
|
2008-01-17 22:29:16 +03:00
|
|
|
p = RDoc::Markup.new
|
|
|
|
h = RDoc::Markup::ToLaTeX.new
|
2003-12-01 10:12:49 +03:00
|
|
|
|
|
|
|
#puts "\\documentclass{report}"
|
|
|
|
#puts "\\usepackage{tabularx}"
|
|
|
|
#puts "\\usepackage{parskip}"
|
|
|
|
#puts "\\begin{document}"
|
|
|
|
puts p.convert(ARGF.read, h)
|
|
|
|
#puts "\\end{document}"
|