Sha256: dd202847cdb24c92c15c74f8ab425daad2b95a9a02db3179f334fb63d245ece7

Contents?: true

Size: 1.67 KB

Versions: 24

Compression:

Stored size: 1.67 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 = {})
        options_preprocess(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.3.1 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.3.0 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.14 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.13 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.12 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.11 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.10 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.9 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.8 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.7 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.6 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.5 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.4 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.3 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.2 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.1 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.2.0 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.1.10 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.1.9 lib/metanorma/ieee/processor.rb
metanorma-ieee-1.1.8 lib/metanorma/ieee/processor.rb