Class: Metanorma::MPFA::Processor
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::MPFA::Processor
- Defined in:
- lib/metanorma/mpfa/processor.rb
Instance Method Summary collapse
- #fonts_manifest ⇒ Object
-
#initialize ⇒ Processor
constructor
A new instance of Processor.
- #output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
- #output_formats ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ Processor
Returns a new instance of Processor.
7 8 9 10 11 |
# File 'lib/metanorma/mpfa/processor.rb', line 7 def initialize @short = [:mpfd, :mpfa] @input_format = :asciidoc @asciidoctor_backend = :mpfa end |
Instance Method Details
#fonts_manifest ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/metanorma/mpfa/processor.rb', line 21 def fonts_manifest { "Arial" => nil, "Source Han Sans" => nil, "STIX Two Math" => nil, } end |
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/metanorma/mpfa/processor.rb', line 33 def output(isodoc_node, inname, outname, format, ={}) case format when :html IsoDoc::MPFA::HtmlConvert.new().convert(inname, isodoc_node, nil, outname) when :doc IsoDoc::MPFA::WordConvert.new().convert(inname, isodoc_node, nil, outname) when :pdf IsoDoc::MPFA::PdfConvert.new().convert(inname, isodoc_node, nil, outname) when :presentation IsoDoc::MPFA::PresentationXMLConvert.new().convert(inname, isodoc_node, nil, outname) else super end end |
#output_formats ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/metanorma/mpfa/processor.rb', line 13 def output_formats super.merge( html: "html", doc: "doc", pdf: "pdf" ) end |