Class: IsoDoc::IHO::WordConvert

Inherits:
Generic::WordConvert
  • Object
show all
Includes:
BaseConvert, Init
Defined in:
lib/isodoc/iho/word_convert.rb

Overview

A Converter implementation that generates Word output, and a document schema encapsulation of the document for validation

Instance Method Summary collapse

Methods included from Init

#i18n_init, #metadata_init, #xref_init

Methods included from BaseConvert

#error_parse, #extract_author, #extract_edition, #extract_person_name, #extract_publisher, #extract_uri, #iho?, #info, #inline_bibitem_ref_code, #multiplenames_and, #nodes_to_span, #omit_docid_prefix, #render_identifier, #standard_citation, #std_bibitem_entry

Instance Method Details

#authority_cleanup(docxml) ⇒ Object



37
38
39
40
41
42
# File 'lib/isodoc/iho/word_convert.rb', line 37

def authority_cleanup(docxml)
  super
  docxml.xpath("//div[@class = 'boilerplate-feedback']/p").each do |p|
    p["style"] = 'font-size:8pt;font-family:Arial;text-align:right'
  end
end

#configurationObject



10
11
12
# File 'lib/isodoc/iho/word_convert.rb', line 10

def configuration
  Metanorma::IHO.configuration
end

#make_body1(body, _docxml) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/isodoc/iho/word_convert.rb', line 14

def make_body1(body, _docxml)
  body.div **{ class: "WordSection1" } do |div1|
    div1.p **{style: "font-size:0pt;" } do
      |p| p << "&nbsp;" 
    end # placeholder
  end
  section_break(body)
end

#make_body2(body, docxml) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/isodoc/iho/word_convert.rb', line 23

def make_body2(body, docxml)
  body.div **{ class: "WordSection2" } do |div2|
    boilerplate docxml, div2
    preface_block docxml, div2
    abstract docxml, div2
    foreword docxml, div2
    introduction docxml, div2
    preface docxml, div2
    acknowledgements docxml, div2
    div2.p { |p| p << "&nbsp;" } # placeholder
  end
  section_break(body)
end