Class: Metanorma::IHO::Processor

Inherits:
Generic::Processor
  • Object
show all
Defined in:
lib/metanorma/iho/processor.rb

Instance Method Summary collapse

Instance Method Details

#configurationObject



6
7
8
# File 'lib/metanorma/iho/processor.rb', line 6

def configuration
  Metanorma::IHO.configuration
end

#fonts_manifestObject



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

def fonts_manifest
  {
    "Arial" => nil,
    "Cambria Math" => nil,
    "Courier New" => nil,
    "Fira Code" => nil,
    "Source Sans Pro Light" => nil,
    "Source Serif Pro" => nil,
    "Source Code Pro Light" => nil,
    "Source Han Sans" => nil,
    "Source Han Sans Normal" => nil,
    "STIX Two Math" => nil,
  }
end

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



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

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

#output_formatsObject



10
11
12
13
14
15
16
# File 'lib/metanorma/iho/processor.rb', line 10

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

#versionObject



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

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