Sha256: 680579f9c99614b95276eb30cbb2f0b9daaaef5de2d0d6dc1f2a8a61b9239066

Contents?: true

Size: 1.45 KB

Versions: 17

Compression:

Stored size: 1.45 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={})
        options_preprocess(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

17 entries across 17 versions & 1 rubygems

Version Path
metanorma-iho-1.0.0 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.12 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.11 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.9 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.8 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.7 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.6 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.5 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.4 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.3 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.2 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.1 lib/metanorma/iho/processor.rb
metanorma-iho-0.9.0 lib/metanorma/iho/processor.rb
metanorma-iho-0.8.7 lib/metanorma/iho/processor.rb
metanorma-iho-0.8.5 lib/metanorma/iho/processor.rb
metanorma-iho-0.8.4 lib/metanorma/iho/processor.rb
metanorma-iho-0.8.3 lib/metanorma/iho/processor.rb