metanorma-itu 2.4.2 → 2.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d173fd252ee677a77d8fe211f7f2215ca310bb1dada1dc8710f00b55b6d5b55
4
- data.tar.gz: 0c517b8f430d94458f4c423a411034eb9eea1e02319aa6b03a59db930d88736a
3
+ metadata.gz: 88c9cda54d65dc977de6157a86d64cb8b3b977a347fe637d813abd77b882c541
4
+ data.tar.gz: 16c113945987104a36166192a7eb94d0974ba4b16b68a3330930656de0366c8a
5
5
  SHA512:
6
- metadata.gz: de66fbb0149faf3e41ef3008ad5472cbf83122abe37de4ed52250a95e57264ac682ce39c051ffb4a3175c9811c15de83e9a045fbed06533a7b0ff9de4c037249
7
- data.tar.gz: 800e775da616ffce73ae7fd6add9e6168c8d6bb4f919946318adae8fb7904f1ac6d96728949794977691b82900c1db8264347c5a92ece8476a2785c0901b0a0f
6
+ metadata.gz: 69c3ec98cef4498116163748e8df52e9a916f0c8deaff2a304b22e3833762b484834f76498dd5e790e60692552a8cf6954bb3837ec16686848239ba0159d1ba5
7
+ data.tar.gz: c34d03b056b582e885de905006b18c96a5b22bd23cc998882dc9c99a082873e9ee2d55f91f506683e4d68e5b6b89fa45968b9518cdf0465c6d4b1722a4e64e09
@@ -48,9 +48,8 @@ module IsoDoc
48
48
  end
49
49
 
50
50
  def ol_depth(node)
51
- return super unless node["class"] == "steps" ||
52
- node.at(".//ancestor::xmlns:ol[@class = 'steps']")
53
-
51
+ node["class"] == "steps" ||
52
+ node.at(".//ancestor::xmlns:ol[@class = 'steps']") or return super
54
53
  depth = node.ancestors("ul, ol").size + 1
55
54
  type = :arabic
56
55
  type = :alphabet if [2, 7].include? depth
@@ -78,17 +77,17 @@ module IsoDoc
78
77
  end
79
78
 
80
79
  def annex(node, out)
81
- @meta.get[:doctype_original] == "recommendation-annex" or
82
- page_break(out)
83
- out.div **attr_code(id: node["id"], class: "Section3") do |s|
84
- annex_name(node, nil, s) unless node.at(ns("./title"))
85
- node.elements.each do |c1|
86
- if c1.name == "title" then annex_name(node, c1, s)
87
- else
88
- parse(c1, s)
89
- end
80
+ @meta.get[:doctype_original] == "recommendation-annex" or
81
+ page_break(out)
82
+ out.div **attr_code(id: node["id"], class: "Section3") do |s|
83
+ annex_name(node, nil, s) unless node.at(ns("./title"))
84
+ node.elements.each do |c1|
85
+ if c1.name == "title" then annex_name(node, c1, s)
86
+ else
87
+ parse(c1, s)
90
88
  end
91
89
  end
90
+ end
92
91
  end
93
92
 
94
93
  def info(isoxml, out)
@@ -124,8 +123,7 @@ module IsoDoc
124
123
  end
125
124
 
126
125
  def note_parse(node, out)
127
- return if node["type"] == "title-footnote"
128
-
126
+ node["type"] == "title-footnote" and return
129
127
  super
130
128
  end
131
129
 
@@ -148,15 +146,40 @@ module IsoDoc
148
146
  end
149
147
  end
150
148
 
151
- =begin
152
- def scope(isoxml, out, num)
153
- return super unless @meta.get[:doctype_original] == "resolution"
149
+ def dl_parse(node, out)
150
+ node.ancestors("table, formula, figure").empty? or return super
151
+ dl1(node)
152
+ table_parse(node, out)
153
+ end
154
154
 
155
- f = isoxml.at(ns("//clause[@type = 'scope']")) or return num
156
- clause_core(f, out)
157
- num + 1
155
+ def dl1(dlist)
156
+ ret = dl2tbody(dlist)
157
+ n = dlist.at(ns("./colgroup")) and ret = "#{n.remove.to_xml}#{ret}"
158
+ n = dlist.at(ns("./name")) and ret = "#{n.remove.to_xml}#{ret}"
159
+ dlist.name = "table"
160
+ dlist["class"] = "dl"
161
+ dlist.children.first.previous = ret
158
162
  end
159
- =end
163
+
164
+ def dl2tbody(dlist)
165
+ ret = ""
166
+ dlist.elements.select { |n| %w{dt dd}.include? n.name }
167
+ .each_slice(2) do |dt, dd|
168
+ ret += "<tr><th width='20%'>#{dt.children.to_xml}</th>" \
169
+ "<td width='80%'>#{dd.children.to_xml}</td></tr>"
170
+ dt.replace(" ")
171
+ dd.remove
172
+ end
173
+ "<tbody>#{ret}</tbody>"
174
+ end
175
+
176
+ # def scope(isoxml, out, num)
177
+ # return super unless @meta.get[:doctype_original] == "resolution"
178
+ #
179
+ # f = isoxml.at(ns("//clause[@type = 'scope']")) or return num
180
+ # clause_core(f, out)
181
+ # num + 1
182
+ # end
160
183
  end
161
184
  end
162
185
  end
@@ -58,6 +58,9 @@ revision_abbreviation: المراجعة
58
58
  tsb: TSB
59
59
  br: BR
60
60
  bdt: BDT
61
+ tsb_short: مكتب تقييس الاتصالات
62
+ br_short: مكتب الاتصالات الراديوية
63
+ bdt_short: مكتب تنمية الاتصالات
61
64
  tsb_full: مكتب تقييس الاتصالات
62
65
  br_full: مكتب الاتصالات الراديوية
63
66
  bdt_full: مكتب تنمية الاتصالات
@@ -59,6 +59,9 @@ revision_abbreviation: Rev.
59
59
  tsb: TSB
60
60
  br: BR
61
61
  bdt: BDT
62
+ tsb_short: Büro für Telekommunikations-Standardisierung
63
+ br_short: Büro für Funkkommunikation
64
+ bdt_short: Büro für Entwicklungen in der Telekommunikation
62
65
  tsb_full: Büro für Telekommunikations-<br/>Standardisierung<br/>der ITU
63
66
  br_full: Büro für Funkkommunikation<br/>der ITU
64
67
  bdt_full: Büro für Entwicklungen<br/>in der Telekommunikation<br/>der ITU
@@ -60,6 +60,9 @@ revision_abbreviation: Rev.
60
60
  tsb: TSB
61
61
  br: BR
62
62
  bdt: BDT
63
+ tsb_short: Telecommunication Standardization Bureau
64
+ br_short: Radiocommunication Bureau
65
+ bdt_short: Telecommunication Development Bureau
63
66
  tsb_full: Telecommunication<br/>Standardization Bureau<br/>of ITU
64
67
  br_full: Radiocommunication Bureau<br/>of ITU
65
68
  bdt_full: Telecommunication<br/>Development Bureau<br/>of ITU
@@ -60,6 +60,9 @@ revision_abbreviation: Rev.
60
60
  tsb: TSB
61
61
  br: BR
62
62
  bdt: BDT
63
+ tsb_short: Oficina de Normalización de las Telecomunicaciones
64
+ br_short: Oficina de Radiocomunicaciones
65
+ bdt_short: Oficina de Desarrollo de las Telecomunicaciones
63
66
  tsb_full: <br/>Oficina de Normalización<br/>de las Telecomunicaciones de la UIT
64
67
  br_full: Oficina de Radiocomunicaciones<br/>de la UIT
65
68
  bdt_full: <br/>Oficina de Desarrollo<br/>de las Telecomunicaciones de la UIT
@@ -60,6 +60,9 @@ revision_abbreviation: Rev.
60
60
  tsb: TSB
61
61
  br: BR
62
62
  bdt: BDT
63
+ tsb_short: Bureau de la normalisation des télécommunications
64
+ br_short: Bureau des radiocommunications
65
+ bdt_short: Bureau de développement des télécommunications
63
66
  tsb_full: Bureau de la normalisation<br/>des télécommunications<br/>de l’UIT
64
67
  br_full: Bureau des radiocommunications<br/>de l’UIT
65
68
  bdt_full: Bureau de développement<br/>des télécommunications<br/>de l’UIT
@@ -60,6 +60,9 @@ revision_abbreviation: Ред.
60
60
  tsb: БСЭ
61
61
  br: БР
62
62
  bdt: БРЭ
63
+ tsb_short: Бюро стандартизации электросвязи
64
+ br_short: Бюро радиосвязи
65
+ bdt_short: Бюро развития электросвязи
63
66
  tsb_full: Бюро стандартизации электросвязи<br/>МСЭ
64
67
  br_full: Бюро радиосвязи<br/>МСЭ
65
68
  bdt_full: Бюро развития электросвязи<br/>МСЭ
@@ -52,6 +52,9 @@ revision_abbreviation: Rev.
52
52
  tsb: TSB
53
53
  br: BR
54
54
  bdt: BDT
55
+ tsb_short: 电信标准化局
56
+ br_short: 电信发展部门
57
+ bdt_short: 电信发展局
55
58
  tsb_full: 国际电信联盟<br/>电信标准化局
56
59
  br_full: 国际电信联盟<br/>电信发展部门
57
60
  bdt_full: 国际电信联盟<br/>电信发展局
@@ -21,6 +21,11 @@ module IsoDoc
21
21
  i18nyaml: i18nyaml || @i18nyaml)
22
22
  end
23
23
 
24
+ def bibrenderer(options = {})
25
+ ::Relaton::Render::ITU::General.new(options.merge(language: @lang,
26
+ i18nhash: @i18n.get))
27
+ end
28
+
24
29
  def fileloc(loc)
25
30
  File.join(File.dirname(__FILE__), loc)
26
31
  end