Sha256: f991de6eaf155f9816f1f7f23ea83aae1368be116689523754c0f66a921b566d

Contents?: true

Size: 1.24 KB

Versions: 66

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

require 'metanorma/processor'

module Metanorma
  module Csa
    class Processor < Metanorma::Processor

      def initialize
        @short = :csa
        @input_format = :asciidoc
        @asciidoctor_backend = :csa
      end

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

      def fonts_manifest
        {
          #"AzoSans" => nil,
          "Lato" => nil,
          "STIX Two Math" => nil,
          "Source Code Pro" => nil,
        }
      end

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

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

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
metanorma-csa-2.3.2 lib/metanorma/csa/processor.rb
metanorma-csa-2.3.1 lib/metanorma/csa/processor.rb
metanorma-csa-2.3.0 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.13 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.12 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.11 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.10 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.9 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.8 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.7 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.6 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.5 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.4 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.3 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.2 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.1 lib/metanorma/csa/processor.rb
metanorma-csa-2.2.0 lib/metanorma/csa/processor.rb
metanorma-csa-2.1.13 lib/metanorma/csa/processor.rb
metanorma-csa-2.1.12 lib/metanorma/csa/processor.rb
metanorma-csa-2.1.11 lib/metanorma/csa/processor.rb