Sha256: ef607ddbe5dc5caf8d0ca536e692d2f023787fe708d26ea36e49ff2bb3523a81
Contents?: true
Size: 539 Bytes
Versions: 3
Compression:
Stored size: 539 Bytes
Contents
require 'fileutils' require 'latex_to_pdf' require 'action_view' module ActionView # :nodoc: all module Template::Handlers class ERBLatex < ERB def compile(template) erb = "<% __in_erb_template=true %>#{template.source}" out=self.class.erb_implementation.new(erb, :trim=>(self.class.erb_trim_mode == "-")).src out + ";LatexToPdf.generate_pdf(@output_buffer.to_s,@latex_parse_twice)" end end end Template.register_template_handler :erbtex, Template::Handlers::ERBLatex end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rails-latex-1.0.3 | lib/erb_latex.rb |
rails-latex-1.0.2 | lib/erb_latex.rb |
rails-latex-1.0.1 | lib/erb_latex.rb |