metanorma-itu 2.4.2 → 2.4.4

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: b5ec3cdcd778596dec27ae55cc44308d184a8e93180c51085c1ea9e4f4ee8b83
4
+ data.tar.gz: 0de91af4f5b675f4920e6a5c28699edd8de0c2e062c548f0be106ee732dfccc0
5
5
  SHA512:
6
- metadata.gz: de66fbb0149faf3e41ef3008ad5472cbf83122abe37de4ed52250a95e57264ac682ce39c051ffb4a3175c9811c15de83e9a045fbed06533a7b0ff9de4c037249
7
- data.tar.gz: 800e775da616ffce73ae7fd6add9e6168c8d6bb4f919946318adae8fb7904f1ac6d96728949794977691b82900c1db8264347c5a92ece8476a2785c0901b0a0f
6
+ metadata.gz: a18bf663e1a3f340e945021db942703e5b6d2c089a0f635cee55422931f420d94e838009717726a9a11fb58d9474e439b5b9cbb42fc9a018cb107d55a222597f
7
+ data.tar.gz: 1679c63b7d644d6ca96b5a1ed26f66ae275b2159dca9f84b00b06480df8c1f3d48353a58ef08113242df7d574b64c3739479d32df072624459093420fa9f1a7e
@@ -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
@@ -43,7 +43,8 @@
43
43
 
44
44
  <div class="doc-info-left">
45
45
  <div class="doc-identifier">
46
- {% if doctype != "Recommendation" %}{{doctype }} {% endif %}{{ docnumeric }}
46
+ {% if collectiontitle %}<div>{{ collectiontitle}}</div>{%endif%}
47
+ <div>{% if doctype != "Recommendation" %}{{doctype }} {% endif %}{{ docnumeric }}</div>
47
48
  {% if amendmentid %}<div class="doc-subidentifier">{{ amendmentid }}</div>{% endif %}
48
49
  {% if corrigendumid %}<div class="doc-subidentifier">{{ corrigendumid }}</div>{% endif %}
49
50
  {% if edition %} <div> Revision {{ edition }}</div> {% endif %}
@@ -59,9 +60,11 @@
59
60
  </div>
60
61
 
61
62
  <div class="doc-category">
62
- {% if bureau == "T" %}Telecommunication <br/>Standardization Sector <br/>of ITU{% endif %}
63
- {% if bureau == "D" %}Telecommunication <br/>Development Sector <br/>of ITU{% endif %}
64
- {% if bureau == "R" %}Radiocommunication <br/>Sector of ITU{% endif %}
63
+ {% if sector %}{{sector}}{%else%}
64
+ {% if bureau == "T" %}{{ labels["tsb_full"] }}{% endif %}
65
+ {% if bureau == "D" %}{{ labels["bdt_full"] }}{% endif %}
66
+ {% if bureau == "R" %}{{ labels["br_full"] }}{% endif %}
67
+ {%endif%}
65
68
  </div>
66
69
 
67
70
  <div class="coverpage-title">
@@ -223,44 +223,27 @@
223
223
  width="95" colspan="2"><p class='MsoNormal'>&#xA0;</p></td>
224
224
  <td width="303" colspan="2" valign="top" style='width:227.45pt;padding:0cm 4.25pt 0cm 4.25pt;
225
225
  height:48.7pt'>
226
- {% if bureau == "T" %}
227
- <p class="MsoNormal" align="left" style='text-align:left'><span style='mso-bookmark:
228
- _Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
229
- mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>TELECOMMUNICATION</span></span><span
230
- style='mso-bookmark:_Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;
231
- font-family:"Arial",sans-serif;mso-ansi-language:EN-US'><br/>
232
- </span></span><span style='mso-bookmark:_Hlk526346232'><span lang="EN-US"
233
- style='font-size:10.0pt;font-family:"Arial",sans-serif;mso-bidi-font-family:
234
- "Times New Roman";mso-ansi-language:EN-US'>STANDARDIZATION SECTOR<br/>
235
- OF ITU</span></span><span style='mso-bookmark:_Hlk526346232'><b
236
- style='mso-bidi-font-weight:normal'><span lang="EN-US" style='font-size:10.0pt;
237
- mso-ansi-language:EN-US'><o:p></o:p></span></b></span></p>
226
+
227
+ {% if sector %}
228
+ <p class="MsoNormal" align="left" style='text-align:left'>
229
+ <span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
230
+ mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>{{ sector }}</span></p>
231
+ {% else %}
232
+ {% if bureau == "T" %}
233
+ <p class="MsoNormal" align="left" style='text-align:left'>
234
+ <span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
235
+ mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>{{ labels["tsb_full"] }}</span></p>
238
236
  {% endif %}
239
237
  {% if bureau == "D" %}
240
- <p class="MsoNormal" align="left" style='text-align:left'><span style='mso-bookmark:
241
- _Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
242
- mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>TELECOMMUNICATION</span></span><span
243
- style='mso-bookmark:_Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;
244
- font-family:"Arial",sans-serif;mso-ansi-language:EN-US'><br/>
245
- </span></span><span style='mso-bookmark:_Hlk526346232'><span lang="EN-US"
246
- style='font-size:10.0pt;font-family:"Arial",sans-serif;mso-bidi-font-family:
247
- "Times New Roman";mso-ansi-language:EN-US'>DEVELOPMENT SECTOR<br/>
248
- OF ITU</span></span><span style='mso-bookmark:_Hlk526346232'><b
249
- style='mso-bidi-font-weight:normal'><span lang="EN-US" style='font-size:10.0pt;
250
- mso-ansi-language:EN-US'><o:p></o:p></span></b></span></p>
238
+ <p class="MsoNormal" align="left" style='text-align:left'>
239
+ <span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
240
+ mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>{{ labels["bdt_full"] }}</span></p>
251
241
  {% endif %}
252
242
  {% if bureau == "R" %}
253
- <p class="MsoNormal" align="left" style='text-align:left'><span style='mso-bookmark:
254
- _Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
255
- mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>RADIOCOMMUNICATION</span></span><span
256
- style='mso-bookmark:_Hlk526346232'><span lang="EN-US" style='font-size:10.0pt;
257
- font-family:"Arial",sans-serif;mso-ansi-language:EN-US'><br/>
258
- </span></span><span style='mso-bookmark:_Hlk526346232'><span lang="EN-US"
259
- style='font-size:10.0pt;font-family:"Arial",sans-serif;mso-bidi-font-family:
260
- "Times New Roman";mso-ansi-language:EN-US'>SECTOR<br/>
261
- OF ITU</span></span><span style='mso-bookmark:_Hlk526346232'><b
262
- style='mso-bidi-font-weight:normal'><span lang="EN-US" style='font-size:10.0pt;
263
- mso-ansi-language:EN-US'><o:p></o:p></span></b></span></p>
243
+ <p class="MsoNormal" align="left" style='text-align:left'>
244
+ <span lang="EN-US" style='font-size:10.0pt;font-family:"Arial",sans-serif;
245
+ mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US'>{{ labels["br_full"] }}</span></p>
246
+ {% endif %}
264
247
  {% endif %}
265
248
 
266
249
  </td>
@@ -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