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.10.8 lib/polytexnic/preprocessor.rb
polytexnic-1.10.7 lib/polytexnic/preprocessor.rb
polytexnic-1.10.6 lib/polytexnic/preprocessor.rb
polytexnic-1.10.5 lib/polytexnic/preprocessor.rb
polytexnic-1.10.4 lib/polytexnic/preprocessor.rb
polytexnic-1.10.3 lib/polytexnic/preprocessor.rb
polytexnic-1.10.2 lib/polytexnic/preprocessor.rb
polytexnic-1.10.1 lib/polytexnic/preprocessor.rb
polytexnic-1.10.0 lib/polytexnic/preprocessor.rb
polytexnic-1.9.2 lib/polytexnic/preprocessor.rb
polytexnic-1.9.1 lib/polytexnic/preprocessor.rb
polytexnic-1.9.0 lib/polytexnic/preprocessor.rb
polytexnic-1.8.2 lib/polytexnic/preprocessor.rb
polytexnic-1.8.1 lib/polytexnic/preprocessor.rb
polytexnic-1.8.0 lib/polytexnic/preprocessor.rb
polytexnic-1.7.5 lib/polytexnic/preprocessor.rb
polytexnic-1.7.4 lib/polytexnic/preprocessor.rb
polytexnic-1.7.3 lib/polytexnic/preprocessor.rb
polytexnic-1.7.2 lib/polytexnic/preprocessor.rb
polytexnic-1.7.1 lib/polytexnic/preprocessor.rb