Sha256: b243d334b02221847de323adc24b96dacfab578a398ff1a5091f5451c2aeb69e

Contents?: true

Size: 1.27 KB

Versions: 16

Compression:

Stored size: 1.27 KB

Contents

require "metanorma/processor"

module Metanorma
  module NIST
    class Processor < Metanorma::Processor
      def self.fonts_used
        {
          html: ["Times New Roman", "Arial", "Courier New"],
          doc: ["Times New Roman", "Arial", "Courier New"],
          pdf: ["Times New Roman", "Arial", "Courier New"],
        }
      end

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

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

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

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

Version data entries

16 entries across 13 versions & 2 rubygems

Version Path
metanorma-nist-1.2.7 lib/metanorma/nist/processor.rb
metanorma-nist-1.2.6 lib/metanorma/nist/processor.rb
metanorma-nist-1.2.5 lib/metanorma/nist/processor.rb
metanorma-nist-1.2.4 lib/metanorma/nist/processor.rb
metanorma-nist-1.2.3 lib/metanorma/nist/processor.rb
metanorma-nist-1.2.2 lib/metanorma/nist/processor.rb
metanorma-nist-1.2.1 lib/metanorma/nist/processor.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-nist-1.2.0/lib/metanorma/nist/processor.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-nist-1.1.3/lib/metanorma/nist/processor.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-nist-1.1.2/lib/metanorma/nist/processor.rb
metanorma-nist-1.2.0 lib/metanorma/nist/processor.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-nist-1.1.2/lib/metanorma/nist/processor.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-nist-1.1.3/lib/metanorma/nist/processor.rb
metanorma-nist-1.1.3 lib/metanorma/nist/processor.rb
metanorma-nist-1.1.2 lib/metanorma/nist/processor.rb
metanorma-nist-1.1.1 lib/metanorma/nist/processor.rb