Sha256: ca9300f61e6433fa276aed0bc8611f2f919f7320cf7fe1d8d4cd206f788f612d

Contents?: true

Size: 1.49 KB

Versions: 8

Compression:

Stored size: 1.49 KB

Contents

require "metanorma/processor"

module Metanorma
  module IEEE
    class Processor < Metanorma::Processor
      def initialize
        @short = :ieee
        @input_format = :asciidoc
        @asciidoctor_backend = :ieee
      end

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

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

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

      def output(isodoc_node, inname, outname, format, options = {})
        case format
        when :html
          IsoDoc::IEEE::HtmlConvert.new(options).convert(inname, isodoc_node,
                                                         nil, outname)
        when :doc
          IsoDoc::IEEE::WordConvert.new(options).convert(inname, isodoc_node,
                                                         nil, outname)
        when :pdf
          IsoDoc::IEEE::PdfConvert.new(options).convert(inname, isodoc_node,
                                                        nil, outname)
        when :presentation
          IsoDoc::IEEE::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-ieee-0.0.7 lib/metanorma/ieee/processor.rb
metanorma-ieee-0.0.6.1 lib/metanorma/ieee/processor.rb
metanorma-ieee-0.0.6 lib/metanorma/ieee/processor.rb
metanorma-ieee-0.0.5 lib/metanorma/ieee/processor.rb
metanorma-ieee-0.0.4 lib/metanorma/ieee/processor.rb
metanorma-ieee-0.0.3 lib/metanorma/ieee/processor.rb
metanorma-ieee-0.0.2 lib/metanorma/ieee/processor.rb
metanorma-ieee-0.0.1 lib/metanorma/ieee/processor.rb