class Asciidoctor::M3AAWG::Converter

Constants

XML_NAMESPACE
XML_ROOT_TAG

Public Instance Methods

configuration() click to toggle source
# File lib/asciidoctor/m3aawg/converter.rb, line 26
 def configuration
  Metanorma::M3AAWG.configuration
end
doc_converter(node) click to toggle source
# File lib/asciidoctor/m3aawg/converter.rb, line 58
def doc_converter(node)
  IsoDoc::M3AAWG::WordConvert.new(doc_extract_attributes(node))
end
html_converter(node) click to toggle source
# File lib/asciidoctor/m3aawg/converter.rb, line 54
def html_converter(node)
  IsoDoc::M3AAWG::HtmlConvert.new(html_extract_attributes(node))
end
makexml(node) click to toggle source
Calls superclass method
# File lib/asciidoctor/m3aawg/converter.rb, line 30
def makexml(node)
  @draft = node.attributes.has_key?("draft")
  super
end
metadata_committee(node, xml) click to toggle source
# File lib/asciidoctor/m3aawg/converter.rb, line 12
def metadata_committee(node, xml)
  return unless node.attr("technical-committee")
  xml.editorialgroup do |a|
    a.committee node.attr("technical-committee"),
      **attr_code(type: node.attr("technical-committee-type"))
    i = 2
    while node.attr("technical-committee_#{i}") do
      a.committee node.attr("technical-committee_#{i}"),
        **attr_code(type: node.attr("technical-committee-type_#{i}"))
      i += 1
    end
  end
end
outputs(node, ret) click to toggle source
# File lib/asciidoctor/m3aawg/converter.rb, line 35
def outputs(node, ret)
  File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
  presentation_xml_converter(node).convert(@filename + ".xml")
  html_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.html")
  doc_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
  pdf_converter(node)&.convert(@filename + ".presentation.xml", nil, false, "#{@filename}.pdf")
end
pdf_converter(node) click to toggle source
# File lib/asciidoctor/m3aawg/converter.rb, line 62
def pdf_converter(node)
  return nil if node.attr("no-pdf")
  IsoDoc::M3AAWG::PdfConvert.new(doc_extract_attributes(node))
end
presentation_xml_converter(node) click to toggle source
# File lib/asciidoctor/m3aawg/converter.rb, line 50
def presentation_xml_converter(node)
  IsoDoc::M3AAWG::PresentationXMLConvert.new(html_extract_attributes(node))
end
sections_cleanup(x) click to toggle source
Calls superclass method
# File lib/asciidoctor/m3aawg/converter.rb, line 43
def sections_cleanup(x)
  super
  x.xpath("//*[@inline-header]").each do |h|
    h.delete("inline-header")
  end
end