Class: IsoDoc::Jis::HtmlConvert
- Inherits:
-
Iso::HtmlConvert
- Object
- Iso::HtmlConvert
- IsoDoc::Jis::HtmlConvert
- Includes:
- BaseConvert, Init
- Defined in:
- lib/isodoc/jis/html_convert.rb
Instance Method Summary collapse
- #convert1(docxml, filename, dir) ⇒ Object
- #default_file_locations(_options) ⇒ Object
- #default_fonts(_options) ⇒ Object
-
#initialize(options) ⇒ HtmlConvert
constructor
A new instance of HtmlConvert.
-
#make_table_footnote_target(out, fnid, fnref) ⇒ Object
TODO to Presentation XML.
Methods included from Init
#bibrenderer, #convert_i18n_init1, #i18n_init, #metadata_init, #std_docid_semantic, #xref_init
Methods included from BaseConvert
#annex, #commentary, #full_row, #make_tr_attr, #table_cols_count, #table_name, #table_note_cleanup, #table_parse, #table_parse_tail, #table_thead_pt
Constructor Details
#initialize(options) ⇒ HtmlConvert
Returns a new instance of HtmlConvert.
9 10 11 12 |
# File 'lib/isodoc/jis/html_convert.rb', line 9 def initialize() super @libdir = File.dirname(__FILE__) end |
Instance Method Details
#convert1(docxml, filename, dir) ⇒ Object
14 15 16 17 |
# File 'lib/isodoc/jis/html_convert.rb', line 14 def convert1(docxml, filename, dir) .merge!(default_fonts({})) # updated @script super end |
#default_file_locations(_options) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/isodoc/jis/html_convert.rb', line 29 def default_file_locations() @libdir = File.dirname(__FILE__) { htmlstylesheet: html_doc_path("style-iso.scss"), htmlcoverpage: html_doc_path("html_jis_titlepage.html"), htmlintropage: html_doc_path("html_jis_intro.html"), } end |
#default_fonts(_options) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/isodoc/jis/html_convert.rb', line 19 def default_fonts() { bodyfont: (@script == "Jpan" ? '"MS Mincho",serif' : '"Times New Roman",serif'), headerfont: (@script == "Jpan" ? '"MS Gothic",sans-serif' : '"Arial",sans-serif'), monospacefont: '"Courier New",monospace', monospacefontsize: "1.0em", footnotefontsize: "0.9em", } end |
#make_table_footnote_target(out, fnid, fnref) ⇒ Object
TODO to Presentation XML
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/isodoc/jis/html_convert.rb', line 39 def make_table_footnote_target(out, fnid, fnref) attrs = { id: fnid, class: "TableFootnoteRef" } out.span do |s| # TODO to Presentation XML s << @i18n.table_footnote out.span **attrs do |a| a << fnref end insert_tab(s, 1) end end |