summaryrefslogtreecommitdiff
path: root/jni/ruby/sample/rdoc/markup/rdoc2latex.rb
blob: aa8079eb9088010c60148db82b72b799d158b561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/local/bin/ruby
# Illustration of a script to convert an RDoc-style file to a LaTeX document

require 'rdoc/markup'
require 'rdoc/markup/to_latex'

p = RDoc::Markup.new
h = RDoc::Markup::ToLaTeX.new

#puts "\\documentclass{report}"
#puts "\\usepackage{tabularx}"
#puts "\\usepackage{parskip}"
#puts "\\begin{document}"
puts p.convert(ARGF.read, h)
#puts "\\end{document}"