Sha256: 715da339a77c9525248c4007a5a0af143623e0ac98957c481d7d79a6a7a7a6a3

Contents?: true

Size: 561 Bytes

Versions: 91

Compression:

Stored size: 561 Bytes

Contents

# encoding=utf-8
require 'polytexnic/literal'
require 'polytexnic/code_inclusion'
require 'polytexnic/preprocessors/html'
require 'polytexnic/preprocessors/latex'
require 'polytexnic/preprocessors/polytex'

module Polytexnic
  module Preprocessor
    include Literal
    include Html
    include Latex
    include Polytex

    # Preprocesses the input based on output format.
    def preprocess(format)
      case format
      when :html    then to_xml
      when :latex   then to_processed_latex
      when :polytex then to_polytex
      end
    end
  end
end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
polytexnic-1.0.1 lib/polytexnic/preprocessor.rb
polytexnic-1.0.0 lib/polytexnic/preprocessor.rb
polytexnic-1.0.beta8 lib/polytexnic/preprocessor.rb
polytexnic-1.0.beta7 lib/polytexnic/preprocessor.rb
polytexnic-1.0.beta6 lib/polytexnic/preprocessor.rb
polytexnic-1.0.beta5 lib/polytexnic/preprocessor.rb
polytexnic-1.0.beta4 lib/polytexnic/preprocessor.rb
polytexnic-1.0.beta3 lib/polytexnic/preprocessor.rb
polytexnic-1.0.beta2 lib/polytexnic/preprocessor.rb
polytexnic-1.0.beta1 lib/polytexnic/preprocessor.rb
polytexnic-0.9.10 lib/polytexnic/preprocessor.rb