class IsoDoc::Iec::HtmlConvert

Public Class Methods

new(options) click to toggle source
Calls superclass method
# File lib/isodoc/iec/html_convert.rb, line 9
def initialize(options)
  super
  @libdir = File.dirname(__FILE__)
end

Public Instance Methods

authority_cleanup(docxml) click to toggle source
Calls superclass method
# File lib/isodoc/iec/html_convert.rb, line 40
def authority_cleanup(docxml)
  auth = docxml.at("//div[@id = 'boilerplate-feedback' or @class = 'boilerplate-feedback']")
  auth&.remove
  super
end
default_file_locations(_options) click to toggle source
# File lib/isodoc/iec/html_convert.rb, line 24
def default_file_locations(_options)
  @libdir = File.dirname(__FILE__)
  {
    htmlstylesheet: html_doc_path("htmlstyle.scss"),
    htmlcoverpage: html_doc_path("html_iec_titlepage.html"),
    htmlintropage: html_doc_path("html_iec_intro.html"),
  }
end
default_fonts(options) click to toggle source
# File lib/isodoc/iec/html_convert.rb, line 14
def default_fonts(options)
  {
    bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' : '"Arial",sans-serif'),
    headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' : '"Arial",sans-serif'),
    monospacefont: '"Courier New",monospace',
    monospacefontsize: "1.0em",
    footnotefontsize: "0.9em",
  }
end
htmlstyle(_docxml) click to toggle source
Calls superclass method
# File lib/isodoc/iec/html_convert.rb, line 33
def htmlstyle(_docxml)
  docxml = super
  b = docxml.at("div[@class = 'boilerplate_legal']/ol")
  b and b["type"] = "1"
  docxml
end