Class: HTML2TeX::PreambleProcessor

Inherits:
BasicProcessor show all
Defined in:
lib/html2tex/preamble_processor.rb

Instance Attribute Summary

Attributes inherited from BasicProcessor

#options, #scanner

Instance Method Summary collapse

Methods inherited from BasicProcessor

#initialize

Methods included from TeX

#tex, #tex_escape

Constructor Details

This class inherits a constructor from HTML2TeX::BasicProcessor

Instance Method Details

#to_tex(buffer = "") ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/html2tex/preamble_processor.rb', line 6

def to_tex(buffer="")
  read_html_head
  [ tex(:documentclass, options[:class]),
    tex(:title, title),
    tex(:author, author),
    tex(:begin, "document"),
    tex(:maketitle),
    ""
  ].each do |s|
    buffer << s << "\n"
  end
  buffer
end