Class: IsoDoc::IEEE::HtmlConvert
- Inherits:
-
HtmlConvert
- Object
- HtmlConvert
- IsoDoc::IEEE::HtmlConvert
show all
- Includes:
- BaseConvert, Init
- Defined in:
- lib/isodoc/ieee/html_convert.rb
Instance Method Summary
collapse
Methods included from Init
#fileloc, #i18n_init, #metadata_init, #xref_init
#bracket_if_num, #clause_attrs, #example_label, #formula_where, #middle_clause, #note_delim, #note_p_parse, #note_parse1, #para_attrs, #scope, #termnote_delim
Constructor Details
#initialize(options) ⇒ HtmlConvert
Returns a new instance of HtmlConvert.
7
8
9
10
|
# File 'lib/isodoc/ieee/html_convert.rb', line 7
def initialize(options)
@libdir = File.dirname(__FILE__)
super
end
|
Instance Method Details
#default_file_locations(_options) ⇒ Object
31
32
33
34
35
36
37
|
# File 'lib/isodoc/ieee/html_convert.rb', line 31
def default_file_locations(_options)
{
htmlstylesheet: html_doc_path("htmlstyle.scss"),
htmlcoverpage: html_doc_path("html_ieee_titlepage.html"),
htmlintropage: html_doc_path("html_ieee_intro.html"),
}
end
|
#default_fonts(options) ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/isodoc/ieee/html_convert.rb', line 12
def default_fonts(options)
{
bodyfont: (if options[:script] == "Hans"
'"Source Han Sans",serif'
else
'"Times New Roman",serif'
end),
headerfont: (if options[:script] == "Hans"
'"Source Han Sans",sans-serif'
else
'"Times New Roman",serif'
end),
monospacefont: '"Courier New",monospace',
normalfontsize: "14px",
monospacefontsize: "0.8em",
footnotefontsize: "0.9em",
}
end
|
#html_cleanup(html) ⇒ Object
39
40
41
|
# File 'lib/isodoc/ieee/html_convert.rb', line 39
def html_cleanup(html)
para_type_strip(super)
end
|
#para_type_strip(html) ⇒ Object
43
44
45
46
|
# File 'lib/isodoc/ieee/html_convert.rb', line 43
def para_type_strip(html)
html.xpath("//p[@type]").each { |p| p.delete("type") }
html
end
|