Sha256: 6971815e4fcc81a34be190d7157ede47ea0e39bd128b7c89cafa39b311b03d14

Contents?: true

Size: 1.38 KB

Versions: 30

Compression:

Stored size: 1.38 KB

Contents

require "metanorma/processor"

module Metanorma
  module M3AAWG
    class Processor < Metanorma::Generic::Processor
       def configuration
        Metanorma::Ribose.configuration
      end

      def initialize
        @short = [:m3d, :m3aawg]
        @input_format = :asciidoc
        @asciidoctor_backend = :m3aawg
      end

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

      def fonts_manifest
        {
          "Arial" => nil,
          "Cambria Math" => nil,
          "Courier New" => nil,
          "EB Garamond 12" => nil,
          "Overpass" => nil,
          "Space Mono" => nil,
        }
      end

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

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

    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
metanorma-m3aawg-2.1.8.1 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.1.8 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.1.7 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.1.6 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.1.5 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.1.4 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.1.3 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.1.2 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.1.1 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.1.0 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.0.8 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.0.7 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.0.6 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.0.5 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.0.4 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.0.3 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.0.2 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.0.1 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-2.0.0 lib/metanorma/m3aawg/processor.rb
metanorma-m3aawg-1.8.5 lib/metanorma/m3aawg/processor.rb