Class: IsoDoc::UN::PresentationXMLConvert

Inherits:
PresentationXMLConvert
  • Object
show all
Includes:
Init
Defined in:
lib/isodoc/un/presentation_xml_convert.rb

Instance Method Summary collapse

Methods included from Init

#fileloc, #i18n_init, #metadata_init, #xref_init

Constructor Details

#initialize(options) ⇒ PresentationXMLConvert

Returns a new instance of PresentationXMLConvert.



7
8
9
10
# File 'lib/isodoc/un/presentation_xml_convert.rb', line 7

def initialize(options)
  super
  @toc = options[:toc]
end

Instance Method Details

#admonition1(elem) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/isodoc/un/presentation_xml_convert.rb', line 28

def admonition1(elem)
  return if elem["notag"] == "true"

  n = @xrefs.anchor(elem["id"], :label) or return
  lbl = l10n("#{@i18n.admonition} #{n}")
  prefix_name(elem, block_delim, lbl, "name")
end

#annex1(elem) ⇒ Object



36
37
38
39
40
41
42
# File 'lib/isodoc/un/presentation_xml_convert.rb', line 36

def annex1(elem)
  lbl = @xrefs.anchor(elem["id"], :label)
  if t = elem.at(ns("./title"))
    t.children = "<strong>#{to_xml(t.children)}</strong>"
  end
  prefix_name(elem, "<br/>", lbl, "title")
end

#middle_title(docxml) ⇒ Object



12
# File 'lib/isodoc/un/presentation_xml_convert.rb', line 12

def middle_title(docxml); end

#move_norm_ref_to_sections(docxml) ⇒ Object



49
# File 'lib/isodoc/un/presentation_xml_convert.rb', line 49

def move_norm_ref_to_sections(docxml); end

#note1(elem) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/isodoc/un/presentation_xml_convert.rb', line 14

def note1(elem)
  return if elem.parent.name == "bibitem"
  return if elem["type"] == "title-footnote"

  # n = @xrefs.get[f["id"]]
  lbl = case elem["type"]
        when "source" then "Source"
        when "abbreviation" then "Abbreviations"
        else
          @i18n.note
        end
  prefix_name(elem, "", lbl, "name")
end

#toc_title(docxml) ⇒ Object



44
45
46
47
# File 'lib/isodoc/un/presentation_xml_convert.rb', line 44

def toc_title(docxml)
  @toc or return
  super
end