Sha256: bcc946ca369a856226ab2b8c12cc8ecd3123b44a055a323a2a25ac007135ea89

Contents?: true

Size: 1.34 KB

Versions: 22

Compression:

Stored size: 1.34 KB

Contents

require "metanorma/processor"

module Metanorma
  module JIS
    class Processor < Metanorma::Processor

      def initialize # rubocop:disable Lint/MissingSuper
        @short = :jis
        @input_format = :asciidoc
        @asciidoctor_backend = :jis
      end

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

      def fonts_manifest
        {
          "STIX Two Math" => nil,
          "IPAexGothic" => nil,
          "IPAexMincho" => nil,
          "Courier New" => nil,
          "Cambria Math" => nil,
          "Times New Roman" => nil,
          "Arial" => nil,
        }
      end

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

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

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
metanorma-jis-0.3.5 lib/metanorma/jis/processor.rb
metanorma-jis-0.3.4 lib/metanorma/jis/processor.rb
metanorma-jis-0.3.3 lib/metanorma/jis/processor.rb
metanorma-jis-0.3.2 lib/metanorma/jis/processor.rb
metanorma-jis-0.3.1 lib/metanorma/jis/processor.rb
metanorma-jis-0.3.0 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.12 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.10 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.9 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.8 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.7 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.6 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.5 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.4 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.3 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.2 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.1 lib/metanorma/jis/processor.rb
metanorma-jis-0.2.0 lib/metanorma/jis/processor.rb
metanorma-jis-0.1.7 lib/metanorma/jis/processor.rb
metanorma-jis-0.1.5 lib/metanorma/jis/processor.rb