Class: IsoDoc::Iso::HtmlConvert
- Inherits:
-
HtmlConvert
- Object
- HtmlConvert
- IsoDoc::Iso::HtmlConvert
show all
- Includes:
- BaseConvert, Init
- Defined in:
- lib/isodoc/iso/html_convert.rb
Instance Method Summary
collapse
Methods included from Init
#amd, #clausedelim, #i18n_init, #metadata_init, #xref_init
#admonition_name_parse, #admonition_p_parse, #admonition_parse, #admonition_parse1, #annex, #clause_etc, #cleanup, #convert1, #error_parse, #example_p_parse, #example_parse, #example_parse1, #example_span_label, #figure_name_parse, #foreword, #formula_where, #implicit_reference, #indexsect, #insertall_after_here, #introduction, #middle, #middle_title, #middle_title_amd, #middle_title_main, #node_begins_with_para, #termdef_parse, #termexamples_before_termnotes
Constructor Details
#initialize(options) ⇒ HtmlConvert
Returns a new instance of HtmlConvert.
8
9
10
11
|
# File 'lib/isodoc/iso/html_convert.rb', line 8
def initialize(options)
@libdir = File.dirname(__FILE__)
super
end
|
Instance Method Details
#default_file_locations(options) ⇒ Object
35
36
37
38
39
40
41
42
|
# File 'lib/isodoc/iso/html_convert.rb', line 35
def default_file_locations(options)
{
htmlstylesheet: (options[:alt] ? html_doc_path("style-human.scss") :
html_doc_path("style-iso.scss")),
htmlcoverpage: html_doc_path("html_iso_titlepage.html"),
htmlintropage: html_doc_path("html_iso_intro.html"),
}
end
|
#default_fonts(options) ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/isodoc/iso/html_convert.rb', line 20
def default_fonts(options)
{
bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' :
options[:alt] ? '"Lato",sans-serif' : '"Cambria",serif'),
headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' :
options[:alt] ? '"Lato",sans-serif' : '"Cambria",serif'),
monospacefont: (options[:alt] ? '"Space Mono",monospace' :
'"Courier New",monospace'),
normalfontsize: "1.0em",
smallerfontsize: "0.9em",
footnotefontsize: "0.9em",
monospacefontsize: "0.8em",
}
end
|
44
45
46
|
# File 'lib/isodoc/iso/html_convert.rb', line 44
def (a)
a.content = a.content + ")"
end
|
#googlefonts ⇒ Object
13
14
15
16
17
18
|
# File 'lib/isodoc/iso/html_convert.rb', line 13
def googlefonts()
" <link href=\"https://fonts.googleapis.com/css?family=Space+Mono:400,400i,700,700i&display=swap\" rel=\"stylesheet\">\n<link href=\"https://fonts.googleapis.com/css?family=Lato:400,400i,700,900\" rel=\"stylesheet\">\n HEAD\nend\n".freeze
|
#table_th_center(docxml) ⇒ Object
48
49
50
51
52
|
# File 'lib/isodoc/iso/html_convert.rb', line 48
def table_th_center(docxml)
docxml.xpath("//thead//th | //thead//td").each do |th|
th["style"] += ";text-align:center;vertical-align:middle;"
end
end
|