Sha256: 14cae43d0390abc84346c651e3c76aeac79ebcc0e7b5f03bb35dcccc9dfdf915

Contents?: true

Size: 1.42 KB

Versions: 19

Compression:

Stored size: 1.42 KB

Contents

require "metanorma/processor"

module Metanorma
  module IHO
    class Processor < Metanorma::Generic::Processor
      def configuration
        Metanorma::IHO.configuration
      end

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

      def fonts_manifest
        {
          "Arial" => nil,
          "Calibri" => nil,
          "Cambria Math" => nil,
          "Courier New" => nil,
          "Fira Code" => nil,
          "Source Sans Pro Light" => nil,
          "Source Serif Pro" => nil,
          "Source Code Pro Light" => nil,
          "Source Han Sans" => nil,
          "Source Han Sans Normal" => nil,
          "STIX Two Math" => nil,
        }
      end

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

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
metanorma-iho-0.8.2 lib/metanorma/iho/processor.rb
metanorma-iho-0.8.1 lib/metanorma/iho/processor.rb
metanorma-iho-0.8.0 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.14 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.13 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.12 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.11 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.10 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.9 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.8 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.7 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.6 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.5 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.4 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.3 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.2 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.1 lib/metanorma/iho/processor.rb
metanorma-iho-0.7.0 lib/metanorma/iho/processor.rb
metanorma-iho-0.6.13 lib/metanorma/iho/processor.rb