class Metanorma::Standoc::Processor

Public Class Methods

new() click to toggle source
# File lib/metanorma/standoc/processor.rb, line 6
def initialize # rubocop:disable Lint/MissingSuper
  @short = :standoc
  @input_format = :asciidoc
  @asciidoctor_backend = :standoc
end

Public Instance Methods

html_path(file) click to toggle source
# File lib/metanorma/standoc/processor.rb, line 24
def html_path(file)
  File.join(File.dirname(__FILE__), "..", "..", "isodoc", "html", file)
end
output(isodoc_node, inname, outname, format, options = {}) click to toggle source
Calls superclass method
# File lib/metanorma/standoc/processor.rb, line 28
def output(isodoc_node, inname, outname, format, options = {})
  case format
  when :html
    options = options
      .merge(htmlstylesheet: html_path("htmlstyle.scss"),
             htmlcoverpage: html_path("html_titlepage.html"))
    IsoDoc::HtmlConvert.new(options)
      .convert(inname, isodoc_node, nil, outname)
  when :doc
    IsoDoc::WordConvert.new(options)
      .convert(inname, isodoc_node, nil, outname)
  when :pdf
    IsoDoc::Standoc::PdfConvert.new(options)
      .convert(inname, isodoc_node, nil, outname)
  when :presentation
    IsoDoc::PresentationXMLConvert.new(options)
      .convert(inname, isodoc_node, nil, outname)
  else
    super
  end
end
output_formats() click to toggle source
Calls superclass method
# File lib/metanorma/standoc/processor.rb, line 12
def output_formats
  super.merge(
    html: "html",
    doc: "doc",
    pdf: "pdf",
  )
end
version() click to toggle source
# File lib/metanorma/standoc/processor.rb, line 20
def version
  "Metanorma::Standoc #{Metanorma::Standoc::VERSION}/IsoDoc #{IsoDoc::VERSION}"
end