Class: Scarlet::Formatters::LATEX

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/scarlet/formatters/latex.rb

Direct Known Subclasses

PDF

Instance Attribute Summary

Attributes included from Base

#slide

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Base

#initialize

Class Method Details

.default_templateObject



15
16
17
# File 'lib/scarlet/formatters/latex.rb', line 15

def self.default_template
  File.join(File.dirname(__FILE__), "..", "templates", "latex", "default.erb")
end

Instance Method Details

#textObject



7
8
9
10
11
12
13
# File 'lib/scarlet/formatters/latex.rb', line 7

def text
  process_code do |code, language, before, after|
    before + "<notextile>" + Scarlet::Highlighter.run(code, :format => "latex", :lexer => language, :arguments => "-P verboptions='fontfamily=lcmtt'") + "</notextile>" + after
  end
  
  RedCloth.new(slide.text).to_latex
end