Module: IsoDoc::JIS::BaseConvert
- Included in:
- HtmlConvert, WordConvert
- Defined in:
- lib/isodoc/jis/base_convert.rb
Instance Method Summary collapse
- #admitted_term_parse(node, out) ⇒ Object
- #admonition_name_parse(_node, div, name) ⇒ Object
- #make_tr_attr(cell, row, totalrows, header, bordered) ⇒ Object
- #middle_subtitle_main(out) ⇒ Object
- #middle_title(_isoxml, out) ⇒ Object
- #middle_title_main(out) ⇒ Object
- #para_class(node) ⇒ Object
- #termnote_parse(node, out) ⇒ Object
Instance Method Details
#admitted_term_parse(node, out) ⇒ Object
62 63 64 65 66 67 |
# File 'lib/isodoc/jis/base_convert.rb', line 62 def admitted_term_parse(node, out) out.p class: "Terms", style: "text-align:left;" do |p| p << l10n("#{@i18n.alternative}: ") node.children.each { |c| parse(c, p) } end end |
#admonition_name_parse(_node, div, name) ⇒ Object
55 56 57 58 59 60 |
# File 'lib/isodoc/jis/base_convert.rb', line 55 def admonition_name_parse(_node, div, name) div.span class: "note_label" do |s| name.children.each { |n| parse(n, s) } s << " — " end end |
#make_tr_attr(cell, row, totalrows, header, bordered) ⇒ Object
73 74 75 76 |
# File 'lib/isodoc/jis/base_convert.rb', line 73 def make_tr_attr(cell, row, totalrows, header, bordered) cell["border"] == "0" and bordered = false super end |
#middle_subtitle_main(out) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/isodoc/jis/base_convert.rb', line 26 def middle_subtitle_main(out) @meta.get[:docsubtitlemain] or return out.p(class: "zzSTDTitle2") do |p| p << @meta.get[:docsubtitleintro] p << " — " if @meta.get[:docsubtitleintro] && @meta.get[:docsubtitlemain] p << @meta.get[:docsubtitlemain] p << " — " if @meta.get[:docsubtitlemain] && @meta.get[:docsubtitlepart] end a = @meta.get[:docsubtitlepart] and out.p(class: "zzSTDTitle2") do |p| b = @meta.get[:docsubtitlepartlabel] and p << "#{b}: " p << "<br/><b>#{a}</b>" end end |
#middle_title(_isoxml, out) ⇒ Object
7 8 9 10 11 |
# File 'lib/isodoc/jis/base_convert.rb', line 7 def middle_title(_isoxml, out) middle_title_main(out) middle_subtitle_main(out) # middle_title_amd(out) end |
#middle_title_main(out) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/isodoc/jis/base_convert.rb', line 13 def middle_title_main(out) out.p(class: "zzSTDTitle1") do |p| p << @meta.get[:doctitleintro] p << " — " if @meta.get[:doctitleintro] && @meta.get[:doctitlemain] p << @meta.get[:doctitlemain] p << " — " if @meta.get[:doctitlemain] && @meta.get[:doctitlepart] end a = @meta.get[:doctitlepart] and out.p(class: "zzSTDTitle1") do |p| b = @meta.get[:doctitlepartlabel] and p << "#{b}: " p << "<br/><b>#{a}</b>" end end |
#para_class(node) ⇒ Object
69 70 71 |
# File 'lib/isodoc/jis/base_convert.rb', line 69 def para_class(node) super || node["class"] end |
#termnote_parse(node, out) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/isodoc/jis/base_convert.rb', line 40 def termnote_parse(node, out) name = node&.at(ns("./name"))&.remove out.div **note_attrs(node) do |div| div.p do |p| if name p.span class: "note_label" do |s| name.children.each { |n| parse(n, s) } end p << termnote_delim end para_then_remainder(node.first_element_child, node, p, div) end end end |