Sha256: 6cea010b775cf028563434e653852b690d31749197df080c25b3a6c919bde38a

Contents?: true

Size: 1.29 KB

Versions: 16

Compression:

Stored size: 1.29 KB

Contents

require "metanorma/processor"

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

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

      def fonts_manifest
        {
          "Source Sans Pro" => nil,
          "STIX Two Math" => nil,
          "Source Serif Pro" => nil,
          "Source Code Pro" => nil,
        }
      end

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

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
metanorma-ribose-2.4.12 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.11 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.10 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.9 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.8 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.7 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.6 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.5 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.4 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.3 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.2 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.1 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.4.0 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.3.6 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.3.4 lib/metanorma/ribose/processor.rb
metanorma-ribose-2.3.3 lib/metanorma/ribose/processor.rb