Class: Metanorma::Jis::Processor
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::Jis::Processor
- Defined in:
- lib/metanorma/jis/processor.rb
Instance Method Summary collapse
- #fonts_manifest ⇒ Object
-
#initialize ⇒ Processor
constructor
rubocop:disable Lint/MissingSuper.
- #output(xml, inname, outname, format, options = {}) ⇒ Object
- #output_formats ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ Processor
rubocop:disable Lint/MissingSuper
7 8 9 10 11 |
# File 'lib/metanorma/jis/processor.rb', line 7 def initialize # rubocop:disable Lint/MissingSuper @short = :jis @input_format = :asciidoc @asciidoctor_backend = :jis end |
Instance Method Details
#fonts_manifest ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/metanorma/jis/processor.rb', line 21 def fonts_manifest { "STIX Two Math" => nil, "IPAexGothic" => nil, "IPAexMincho" => nil, =begin "Noto Serif JP" => nil, "Noto Serif JP ExtraLight" => nil, "Noto Serif JP Medium" => nil, "Noto Serif JP Black" => nil, "Noto Sans JP Thin" => nil, "Noto Sans JP Medium" => nil, =end "Courier New" => nil, "Cambria Math" => nil, "Times New Roman" => nil, "Arial" => nil, } end |
#output(xml, inname, outname, format, options = {}) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/metanorma/jis/processor.rb', line 45 def output(xml, inname, outname, format, = {}) () case format when :html IsoDoc::Jis::HtmlConvert.new() .convert(inname, xml, nil, outname) when :doc IsoDoc::Jis::WordConvert.new() .convert(inname, xml, nil, outname) when :pdf IsoDoc::Jis::PdfConvert.new() .convert(inname, xml, nil, outname) when :presentation IsoDoc::Jis::PresentationXMLConvert.new() .convert(inname, xml, nil, outname) else super end end |
#output_formats ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/metanorma/jis/processor.rb', line 13 def output_formats super.merge( html: "html", pdf: "pdf", doc: "doc", ) end |
#version ⇒ Object
41 42 43 |
# File 'lib/metanorma/jis/processor.rb', line 41 def version "Metanorma::Jis #{Metanorma::Jis::VERSION}" end |