Class: IsoDoc::Iec::HtmlConvert
- Inherits:
-
IsoDoc::Iso::HtmlConvert
- Object
- IsoDoc::Iso::HtmlConvert
- IsoDoc::Iec::HtmlConvert
show all
- Includes:
- BaseConvert, Init
- Defined in:
- lib/isodoc/iec/html_convert.rb
Instance Method Summary
collapse
Methods included from Init
#convert1, #i18n_init, #metadata_init, #xref_init
#admitted_term_parse, #biblio_list, #bibliography, #boilerplate, #deprecated_term_parse, #foreword, #iec_orgname, #middle_title, #set_termdomain, #term_parse, #term_suffix, #termref_cleanup, #terms_parse
Constructor Details
#initialize(options) ⇒ HtmlConvert
Returns a new instance of HtmlConvert.
9
10
11
12
|
# File 'lib/isodoc/iec/html_convert.rb', line 9
def initialize(options)
super
@libdir = File.dirname(__FILE__)
end
|
Instance Method Details
#authority_cleanup(docxml) ⇒ Object
41
42
43
44
45
|
# File 'lib/isodoc/iec/html_convert.rb', line 41
def authority_cleanup(docxml)
auth = docxml.at("//div[@id = 'boilerplate-feedback' or @class = 'boilerplate-feedback']")
auth&.remove
super
end
|
#default_file_locations(options) ⇒ Object
24
25
26
27
28
29
30
31
32
|
# 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"),
scripts: html_doc_path("scripts.html"),
}
end
|
#default_fonts(options) ⇒ Object
14
15
16
17
18
19
20
21
22
|
# 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) ⇒ Object
34
35
36
37
38
39
|
# File 'lib/isodoc/iec/html_convert.rb', line 34
def htmlstyle(docxml)
docxml = super
b = docxml.at("div[@class = 'boilerplate_legal']/ol")
b and b["type"] = "1"
docxml
end
|