Class: PdfRenderer::Latex

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf_renderer/latex.rb

Overview

This class wraps the LaTeX command invocation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Latex

Returns a new instance of Latex.



23
24
25
# File 'lib/pdf_renderer/latex.rb', line 23

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



11
12
13
# File 'lib/pdf_renderer/latex.rb', line 11

def options
  @options
end

Instance Method Details

#generate_pdf(input) ⇒ Object

Returns the rendered PDF as string for the given input string (LaTeX source).



29
30
31
32
33
# File 'lib/pdf_renderer/latex.rb', line 29

def generate_pdf(input)
  create_debug_output(input) if options[:debug]
  check_for_tex_presence!
  create_pdf(input)
end