Sha256: 502dad61014aa23ffac54bb685b23879ee5b27e690b11cdb010f1e07be58c80a

Contents?: true

Size: 1.29 KB

Versions: 8

Compression:

Stored size: 1.29 KB

Contents

require "metanorma/processor"

module Metanorma
  module Iec
    class Processor < Metanorma::Processor

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

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

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

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

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metanorma-iec-1.4.2 lib/metanorma/iec/processor.rb
metanorma-iec-1.4.1 lib/metanorma/iec/processor.rb
metanorma-iec-1.4.0 lib/metanorma/iec/processor.rb
metanorma-iec-1.3.13 lib/metanorma/iec/processor.rb
metanorma-iec-1.3.12 lib/metanorma/iec/processor.rb
metanorma-iec-1.3.11 lib/metanorma/iec/processor.rb
metanorma-iec-1.3.10 lib/metanorma/iec/processor.rb
metanorma-iec-1.3.9 lib/metanorma/iec/processor.rb