Class: Metanorma::Iso::Processor
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::Iso::Processor
- Defined in:
- lib/metanorma/iso/processor.rb
Instance Method Summary collapse
- #fonts_manifest ⇒ Object
-
#initialize ⇒ Processor
constructor
rubocop:disable Lint/MissingSuper.
- #output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
- #output_formats ⇒ Object
- #use_presentation_xml(ext) ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ Processor
rubocop:disable Lint/MissingSuper
7 8 9 10 11 |
# File 'lib/metanorma/iso/processor.rb', line 7 def initialize # rubocop:disable Lint/MissingSuper @short = :iso @input_format = :asciidoc @asciidoctor_backend = :iso end |
Instance Method Details
#fonts_manifest ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/metanorma/iso/processor.rb', line 28 def fonts_manifest { "Cambria" => nil, "Cambria Math" => nil, "Times New Roman" => nil, "Source Han Sans" => nil, "Source Han Sans Normal" => nil, "Courier New" => nil, } end |
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/metanorma/iso/processor.rb', line 45 def output(isodoc_node, inname, outname, format, ={}) case format when :html IsoDoc::Iso::HtmlConvert.new() .convert(inname, isodoc_node, nil, outname) when :html_alt IsoDoc::Iso::HtmlConvert.new(.merge(alt: true)) .convert(inname, isodoc_node, nil, outname) when :doc IsoDoc::Iso::WordConvert.new() .convert(inname, isodoc_node, nil, outname) when :pdf IsoDoc::Iso::PdfConvert.new() .convert(inname, isodoc_node, nil, outname) when :sts IsoDoc::Iso::StsConvert.new() .convert(inname, isodoc_node, nil, outname) when :isosts IsoDoc::Iso::IsoStsConvert.new() .convert(inname, isodoc_node, nil, outname) when :presentation IsoDoc::Iso::PresentationXMLConvert.new() .convert(inname, isodoc_node, nil, outname) else super end end |
#output_formats ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/metanorma/iso/processor.rb', line 13 def output_formats super.merge( html: "html", html_alt: "alt.html", doc: "doc", pdf: "pdf", sts: "sts.xml", isosts: "iso.sts.xml", ) end |
#use_presentation_xml(ext) ⇒ Object
39 40 41 42 43 |
# File 'lib/metanorma/iso/processor.rb', line 39 def use_presentation_xml(ext) return true if ext == :html_alt super end |