Class: Metanorma::Plateau::Processor

Inherits:
Jis::Processor
  • Object
show all
Defined in:
lib/metanorma/plateau/processor.rb

Instance Method Summary collapse

Constructor Details

#initializeProcessor

rubocop:disable Lint/MissingSuper



6
7
8
9
10
# File 'lib/metanorma/plateau/processor.rb', line 6

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

Instance Method Details

#fonts_manifestObject



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/metanorma/plateau/processor.rb', line 19

def fonts_manifest
  {
    "Yu Gothic" => nil,
    "Noto Sans Condensed" => nil,
    "Noto Sans Condensed Light" => nil,
    "Noto Sans CJK JP" => nil,
    "STIX Two Math" => nil,
    "Courier New" => nil,
    "Cambria Math" => nil,
    "Times New Roman" => nil,
    "Arial" => nil,
  }
end

#output(xml, inname, outname, format, options = {}) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/metanorma/plateau/processor.rb', line 37

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

#output_formatsObject



12
13
14
15
16
17
# File 'lib/metanorma/plateau/processor.rb', line 12

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

#versionObject



33
34
35
# File 'lib/metanorma/plateau/processor.rb', line 33

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