Sha256: 701afa75219ed000e165fc76c99d9d96a1742a352ac38de59899166e3b9a930b

Contents?: true

Size: 1.64 KB

Versions: 24

Compression:

Stored size: 1.64 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",
          ieee: "ieee.xml",
        )
      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
          )
        when :ieee
          IsoDoc::IEEE::IEEEXMLConvert.new(options)
            .convert(inname, isodoc_node, nil, outname)
        else
          super
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
metanorma-ieee-1.1.3 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.1.2 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.1.1 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.1.0 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.15 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.14 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.13 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.12 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.11 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.10 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.9 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.8 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.7 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.6 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.5 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.4 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.3 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.2 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.1 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.0.0 lib/metanorma/ieee/processor.rb