Class: Scarlet::Formatters::LATEX
- Inherits:
-
Object
- Object
- Scarlet::Formatters::LATEX
- Includes:
- Base
- Defined in:
- lib/scarlet/formatters/latex.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Base
Class Method Details
.default_template ⇒ Object
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
#text ⇒ Object
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(.text).to_latex end |