Class: IsoDoc::ITU::HtmlConvert
- Inherits:
-
HtmlConvert
- Object
- HtmlConvert
- IsoDoc::ITU::HtmlConvert
show all
- Includes:
- BaseConvert
- Defined in:
- lib/isodoc/itu/html_convert.rb
Overview
A Converter implementation that generates HTML output, and a document schema encapsulation of the document for validation
Constant Summary
Constants included
from BaseConvert
BaseConvert::FRONT_CLAUSE, BaseConvert::IGNORE_IDS
Instance Method Summary
collapse
#add_parse, #annex, #annex_name, #annex_obligation_subtitle, #biblio_list, #bracket_if_num, #bracket_opt, #clausedelim, #cleanup, #del_parse, #doctype_title, #eref_parse, #error_parse, #fileloc, #get_eref_linkend, #i18n_init, #info, #load_yaml, #metadata_init, #middle_title, #multi_bibitem_ref_code, #nonstd_bibitem, #note_label, #note_p_parse, #note_parse1, #ol_depth, #pref_ref_code, #preface, #prefix_container, #reference_format, #reference_format_start, #reference_format_title, #refs_cleanup, #render_multi_identifiers, #std_bibitem_entry, #table_footnote_reference_format, #term_cleanup, #term_def_title, #termdef_parse, #termdef_parse1, #termnote_parse, #terms_defs, #terms_parse, #title_cleanup, #titlecase, #xref_init
Constructor Details
#initialize(options) ⇒ HtmlConvert
Returns a new instance of HtmlConvert.
12
13
14
15
16
|
# File 'lib/isodoc/itu/html_convert.rb', line 12
def initialize(options)
@libdir = File.dirname(__FILE__)
@hierarchical_assets = options[:hierarchical_assets]
super
end
|
Instance Method Details
#authority_cleanup(docxml) ⇒ Object
61
62
63
64
|
# File 'lib/isodoc/itu/html_convert.rb', line 61
def authority_cleanup(docxml)
authority_cleanup1(docxml, "draft-warning")
super
end
|
#default_file_locations(_options) ⇒ Object
26
27
28
29
30
31
32
33
|
# File 'lib/isodoc/itu/html_convert.rb', line 26
def default_file_locations(_options)
{
htmlstylesheet: html_doc_path("htmlstyle.scss"),
htmlcoverpage: html_doc_path("html_itu_titlepage.html"),
htmlintropage: html_doc_path("html_itu_intro.html"),
scripts: html_doc_path("scripts.html"),
}
end
|
#default_fonts(options) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/isodoc/itu/html_convert.rb', line 18
def default_fonts(options)
{
bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Times New Roman",serif'),
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Times New Roman",serif'),
monospacefont: '"Courier New",monospace'
}
end
|
#googlefonts ⇒ Object
35
36
37
38
39
|
# File 'lib/isodoc/itu/html_convert.rb', line 35
def googlefonts
" <link href=\"https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,800|Space+Mono:400,700\" rel=\"stylesheet\">\n HEAD\nend\n".freeze
|
#make_body(xml, docxml) ⇒ Object
41
42
43
44
45
46
47
48
|
# File 'lib/isodoc/itu/html_convert.rb', line 41
def make_body(xml, docxml)
body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72", "xml:lang": "EN-US", class: "container" }
xml.body **body_attr do |body|
make_body1(body, docxml)
make_body2(body, docxml)
make_body3(body, docxml)
end
end
|
#make_body3(body, docxml) ⇒ Object
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/isodoc/itu/html_convert.rb', line 50
def make_body3(body, docxml)
body.div **{ class: "main-section" } do |div3|
boilerplate docxml, div3
abstract docxml, div3
preface docxml, div3
middle docxml, div3
div3
div3
end
end
|