Sha256: b14b438e892c533cffb2b0570ccb9927aa6f4cef285f044a4d855ca41862d276

Contents?: true

Size: 1.35 KB

Versions: 23

Compression:

Stored size: 1.35 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 New" => nil,
          "Times New Roman" => nil,
          "STIX Two Math" => nil,
          "Source Han Sans" => nil,
          "Source Han Sans Normal" => nil,
        }
      end

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

      def output(isodoc_node, inname, outname, format, options={})
        options_preprocess(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

23 entries across 23 versions & 1 rubygems

Version Path
metanorma-un-0.12.19 lib/metanorma/un/processor.rb
metanorma-un-0.12.18 lib/metanorma/un/processor.rb
metanorma-un-0.12.17 lib/metanorma/un/processor.rb
metanorma-un-0.12.16 lib/metanorma/un/processor.rb
metanorma-un-0.12.15 lib/metanorma/un/processor.rb
metanorma-un-0.12.14 lib/metanorma/un/processor.rb
metanorma-un-0.12.13 lib/metanorma/un/processor.rb
metanorma-un-0.12.11 lib/metanorma/un/processor.rb
metanorma-un-0.12.10 lib/metanorma/un/processor.rb
metanorma-un-0.12.9 lib/metanorma/un/processor.rb
metanorma-un-0.12.8 lib/metanorma/un/processor.rb
metanorma-un-0.12.7 lib/metanorma/un/processor.rb
metanorma-un-0.12.6 lib/metanorma/un/processor.rb
metanorma-un-0.12.5 lib/metanorma/un/processor.rb
metanorma-un-0.12.4 lib/metanorma/un/processor.rb
metanorma-un-0.12.3 lib/metanorma/un/processor.rb
metanorma-un-0.12.1 lib/metanorma/un/processor.rb
metanorma-un-0.12.0 lib/metanorma/un/processor.rb
metanorma-un-0.11.8 lib/metanorma/un/processor.rb
metanorma-un-0.11.6 lib/metanorma/un/processor.rb