Sha256: 282a1cc99e494e64d044918345c96ff18bf908ef410e85964957dba7d6fb69d5

Contents?: true

Size: 979 Bytes

Versions: 1

Compression:

Stored size: 979 Bytes

Contents

require "metanorma/processor"

module Metanorma
  module IHO
    def self.fonts_used
      {
        html: ["SourceSansPro-Light", "SourceSerifPro", "SourceCodePro-Light", "HanSans"],
        doc: ["SourceSansPro-Light", "SourceSerifPro", "SourceCodePro-Light", "HanSans"],
      }
    end

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

      def output_formats
        super.merge(
          html: "html",
          doc: "doc",
        ).tap { |hs| hs.delete(:pdf) }
      end

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
metanorma-iho-0.0.2 lib/metanorma/iho/processor.rb