Sha256: b9eeffcc917e4c7e32f8e13bae4ca4e8502ab2c3f21de60ace2c5d22597edf30

Contents?: true

Size: 593 Bytes

Versions: 2

Compression:

Stored size: 593 Bytes

Contents

require 'malt/formats/abstract'
require 'malt/formats/pdf'

module Malt::Format

  #
  class Latex < Abstract

    register 'latex'

    #
    def latex(*)
      text
    end

    #
    def to_latex(*)
      self
    end

    # TODO
    def pdf(*)
      raise "not implemented yet"
    end

    # TODO
    def to_pdf(*)
      text = pdf
      opts = options.merge(:text=>text, :file=>refile(:pdf), :type=>:pdf)
      PDF.new(opts)
    end

    private

      #
      def render_engine
      end

      # Latext default output type is PDF.
      def default
        :pdf
      end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
malt-0.3.0 lib/malt/formats/latex.rb
malt-0.2.0 lib/malt/formats/latex.rb