Sha256: 55bdab86ec4e81f7325798e073f976aec4064676b73c178ed6ec76d15de345f3

Contents?: true

Size: 1.27 KB

Versions: 16

Compression:

Stored size: 1.27 KB

Contents

require "metanorma/processor"

module Metanorma
  module UN
    class Processor < Metanorma::Processor

      def initialize
        @short = :un
        @input_format = :asciidoc
        @asciidoctor_backend = :un
      end

      def output_formats
        super.merge(
          html: "html",
          doc: "doc",
          pdf: "pdf",
        )
      end

      def fonts_manifest
        {
          "Arial" => nil,
          "Arial Black" => nil,
          "Courier" => nil,
          "Times New Roman" => nil,
          "STIX Two Math" => nil,
          "Source Han Sans" => nil,
        }
      end

      def version
        "Metanorma::UN #{Metanorma::UN::VERSION}"
      end

      def output(isodoc_node, inname, outname, format, options={})
        case format
        when :html
          IsoDoc::UN::HtmlConvert.new(options).convert(inname, isodoc_node, nil, outname)
        when :doc
          IsoDoc::UN::WordConvert.new(options).convert(inname, isodoc_node, nil, outname)
        when :pdf
          IsoDoc::UN::PdfConvert.new(options).convert(inname, isodoc_node, nil, outname)
        when :presentation
          IsoDoc::UN::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname)
        else
          super
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
metanorma-un-0.6.8 lib/metanorma/un/processor.rb
metanorma-un-0.6.7 lib/metanorma/un/processor.rb
metanorma-un-0.6.6 lib/metanorma/un/processor.rb
metanorma-un-0.6.5 lib/metanorma/un/processor.rb
metanorma-un-0.6.4 lib/metanorma/un/processor.rb
metanorma-un-0.6.3 lib/metanorma/un/processor.rb
metanorma-un-0.6.2 lib/metanorma/un/processor.rb
metanorma-un-0.6.1 lib/metanorma/un/processor.rb
metanorma-un-0.6.0 lib/metanorma/un/processor.rb
metanorma-un-0.5.16 lib/metanorma/un/processor.rb
metanorma-un-0.5.15 lib/metanorma/un/processor.rb
metanorma-un-0.5.14 lib/metanorma/un/processor.rb
metanorma-un-0.5.13 lib/metanorma/un/processor.rb
metanorma-un-0.5.12 lib/metanorma/un/processor.rb
metanorma-un-0.5.11 lib/metanorma/un/processor.rb
metanorma-un-0.5.10 lib/metanorma/un/processor.rb