Module: Polytexnic::Preprocessor

Includes:
Literal, Html, Latex, Polytex
Included in:
Pipeline
Defined in:
lib/polytexnic/preprocessor.rb,
lib/polytexnic/preprocessors/html.rb,
lib/polytexnic/preprocessors/latex.rb,
lib/polytexnic/preprocessors/polytex.rb

Defined Under Namespace

Modules: Html, Latex, Polytex

Constant Summary

Constants included from Literal

Literal::LANG_REGEX

Instance Method Summary collapse

Methods included from Polytex

#cache_code_environments, #cache_image_locations, #cache_latex_literal, #cache_math, #cache_raw_latex, #convert_code_inclusion, #convert_includegraphics, #remove_kramdown_comments, #restore_hashed_content, #restore_math, #to_polytex

Methods included from Literal

#cache_display_inline_math, #cache_display_math, #cache_inline_math, #cache_literal, #cache_literal_environments, #cache_unicode, #code_salt, #element, #equation_element, #hyperrefs, #literal_types, #math_environments

Methods included from Latex

#clean_latex_document, #convert_gifs, #polish_tables, #process_asides, #to_processed_latex

Methods included from Html

#to_xml

Instance Method Details

#preprocess(format) ⇒ Object

Preprocesses the input based on output format.



16
17
18
19
20
21
22
# File 'lib/polytexnic/preprocessor.rb', line 16

def preprocess(format)
  case format
  when :html    then to_xml
  when :latex   then to_processed_latex
  when :polytex then to_polytex
  end
end