metanorma-itu 2.2.14 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a28a71a0e59c9d816daa8687d0cb502725afe60f5c768dcebbe4fb0c039439b
4
- data.tar.gz: cef6128f170257b229679f1a972239f7cc2803a3ecae8e9f977616facb92aece
3
+ metadata.gz: dd7cb2a16590fe04f51e162637b7fc1be2b6e7b403d04118e8c82b2ad0e4eb66
4
+ data.tar.gz: 35a5dd96771972460f80fc0f0a83f4c6610b59bd659b08c771b89405ca719e62
5
5
  SHA512:
6
- metadata.gz: a2bf5a89490dea4a35da30754286f7c48af1d833c9275407c1b52dc30369247547333b8990b666e6d2730677b7b09954a733ccc8c54b7fda6e10f3b45ec04519
7
- data.tar.gz: c8aff7031ab0a058682be1afdbd2963ac55e9acb91e80132ccc1daea4b27b6bc46ba78c7957674997e12272d33b144163b60bba0c27e0afe8c77435a90ee7627
6
+ metadata.gz: 78896c795984c2999c194e6cb21546880ed1df41cbabe7082f773d5086c1f354f5d342eec07f7ae697dd21ab9848aee3b035d4047db3af3c1c4efc9296ccf10f
7
+ data.tar.gz: 53894e2251b8a69d8c4ff9c37789b600b18907c8a718ac9a5dde34e351e4e36b7b27c1ae40b3808bc885dfa7d1b7cf458d2e3a0ca43474a9ec341bd07760cae8
@@ -1,9 +1,9 @@
1
1
  require "isodoc"
2
2
  require "fileutils"
3
- require_relative "./ref"
4
- require_relative "./xref"
5
- require_relative "./terms"
6
- require_relative "./cleanup"
3
+ require_relative "ref"
4
+ require_relative "xref"
5
+ require_relative "terms"
6
+ require_relative "cleanup"
7
7
 
8
8
  module IsoDoc
9
9
  module ITU
@@ -61,7 +61,6 @@ module IsoDoc
61
61
  end
62
62
 
63
63
  def annex_name(annex, name, div)
64
- # preceding_floating_titles(name, div)
65
64
  r_a = @meta.get[:doctype_original] == "recommendation-annex"
66
65
  div.h1 class: r_a ? "RecommendationAnnex" : "Annex" do |t|
67
66
  name&.children&.each { |c2| parse(c2, t) }
@@ -74,24 +73,22 @@ module IsoDoc
74
73
  info = annex["obligation"] == "informative"
75
74
  div.p class: "annex_obligation" do |p|
76
75
  p << (info ? @i18n.inform_annex : @i18n.norm_annex)
77
- .sub(/%/, @meta.get[:doctype] || "")
76
+ .sub("%", @meta.get[:doctype] || "")
78
77
  end
79
78
  end
80
79
 
81
- def annex(isoxml, out)
82
- isoxml.xpath(ns("//annex")).each do |c|
80
+ def annex(node, out)
83
81
  @meta.get[:doctype_original] == "recommendation-annex" or
84
82
  page_break(out)
85
- out.div **attr_code(id: c["id"], class: "Section3") do |s|
86
- annex_name(c, nil, s) unless c.at(ns("./title"))
87
- c.elements.each do |c1|
88
- if c1.name == "title" then annex_name(c, c1, s)
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)
89
87
  else
90
88
  parse(c1, s)
91
89
  end
92
90
  end
93
91
  end
94
- end
95
92
  end
96
93
 
97
94
  def info(isoxml, out)
@@ -100,54 +97,6 @@ module IsoDoc
100
97
  super
101
98
  end
102
99
 
103
- def middle_title(isoxml, out)
104
- if @meta.get[:doctype] == "Resolution"
105
- middle_title_resolution(isoxml, out)
106
- else
107
- middle_title_recommendation(isoxml, out)
108
- end
109
- end
110
-
111
- def middle_title_resolution(isoxml, out)
112
- res = isoxml.at(ns("//bibdata/title[@type = 'resolution']"))
113
- out.p(align: "center", style: "text-align:center;") do |p|
114
- res.children.each { |n| parse(n, p) }
115
- end
116
- out.p(class: "zzSTDTitle2") { |p| p << @meta.get[:doctitle] }
117
- middle_title_resolution_subtitle(isoxml, out)
118
- end
119
-
120
- def middle_title_resolution_subtitle(isoxml, out)
121
- out.p(align: "center", style: "text-align:center;") do |p|
122
- p.i do |i|
123
- i << "("
124
- isoxml.at(ns("//bibdata/title[@type = 'resolution-placedate']"))
125
- .children.each { |n| parse(n, i) }
126
- i << ")"
127
- end
128
- isoxml.xpath(ns("//note[@type = 'title-footnote']")).each do |f|
129
- footnote_parse(f, p)
130
- end
131
- end
132
- end
133
-
134
- def middle_title_recommendation(isoxml, out)
135
- out.p(class: "zzSTDTitle1") do |p|
136
- type = @meta.get[:doctype]
137
- @meta.get[:unpublished] && @meta.get[:draft_new_doctype] and
138
- type = @meta.get[:draft_new_doctype]
139
- id = @meta.get[:docnumber] and p << "#{type} #{id}"
140
- end
141
- out.p(class: "zzSTDTitle2") do |p|
142
- p << @meta.get[:doctitle]
143
- isoxml.xpath(ns("//note[@type = 'title-footnote']")).each do |f|
144
- footnote_parse(f, p)
145
- end
146
- end
147
- s = @meta.get[:docsubtitle] and
148
- out.p(class: "zzSTDTitle3") { |p| p << s }
149
- end
150
-
151
100
  def note_p_parse(node, div)
152
101
  name = node&.at(ns("./name"))&.remove
153
102
  div.p do |p|
@@ -180,14 +129,15 @@ module IsoDoc
180
129
  super
181
130
  end
182
131
 
183
- # can have supertitle in resolution
184
- def clause(isoxml, out)
185
- isoxml.xpath(ns(middle_clause(isoxml))).each do |c|
186
- clause_core(c, out)
132
+ def clause_attrs(node)
133
+ if node["type"] == "keyword"
134
+ super.merge(class: "Keyword")
135
+ else super
187
136
  end
188
137
  end
189
138
 
190
- def clause_core(clause, out)
139
+ # can have supertitle in resolution
140
+ def clause(clause, out)
191
141
  out.div **attr_code(clause_attrs(clause)) do |s|
192
142
  clause.elements.each do |c1|
193
143
  if c1.name == "title" then clause_name(clause, c1, s, nil)
@@ -198,6 +148,7 @@ module IsoDoc
198
148
  end
199
149
  end
200
150
 
151
+ =begin
201
152
  def scope(isoxml, out, num)
202
153
  return super unless @meta.get[:doctype_original] == "resolution"
203
154
 
@@ -205,6 +156,7 @@ module IsoDoc
205
156
  clause_core(f, out)
206
157
  num + 1
207
158
  end
159
+ =end
208
160
  end
209
161
  end
210
162
  end
@@ -90,7 +90,7 @@ h1, h2, h3, h4, h5, h6 {
90
90
 
91
91
  blockquote, q {
92
92
  quotes: none; }
93
- blockquote:before, blockquote:after, q:before, q:after {
93
+ blockquote::before, blockquote::after, q::before, q::after {
94
94
  content: '';
95
95
  content: none; }
96
96
 
@@ -113,14 +113,18 @@ b, strong {
113
113
  div.document-stage-band, div.document-type-band {
114
114
  background-color: #333333; }
115
115
 
116
- a.FootnoteRef + a.FootnoteRef:before {
116
+ a.FootnoteRef + a.FootnoteRef::before {
117
117
  content: ", ";
118
118
  vertical-align: super; }
119
119
 
120
- a.TableFootnoteRef + a.TableFootnoteRef:before {
120
+ a.TableFootnoteRef + a.TableFootnoteRef::before {
121
121
  content: ", ";
122
122
  vertical-align: super; }
123
123
 
124
+ a.TableFootnoteRef, span.TableFootnoteRef,
125
+ a.FootnoteRef, span.FootnoteRef {
126
+ vertical-align: super; }
127
+
124
128
  .addition {
125
129
  color: blue; }
126
130
 
@@ -90,7 +90,7 @@ h1, h2, h3, h4, h5, h6 {
90
90
 
91
91
  blockquote, q {
92
92
  quotes: none; }
93
- blockquote:before, blockquote:after, q:before, q:after {
93
+ blockquote::before, blockquote::after, q::before, q::after {
94
94
  content: '';
95
95
  content: none; }
96
96
 
@@ -113,14 +113,18 @@ b, strong {
113
113
  div.document-stage-band, div.document-type-band {
114
114
  background-color: #333333; }
115
115
 
116
- a.FootnoteRef + a.FootnoteRef:before {
116
+ a.FootnoteRef + a.FootnoteRef::before {
117
117
  content: ", ";
118
118
  vertical-align: super; }
119
119
 
120
- a.TableFootnoteRef + a.TableFootnoteRef:before {
120
+ a.TableFootnoteRef + a.TableFootnoteRef::before {
121
121
  content: ", ";
122
122
  vertical-align: super; }
123
123
 
124
+ a.TableFootnoteRef, span.TableFootnoteRef,
125
+ a.FootnoteRef, span.FootnoteRef {
126
+ vertical-align: super; }
127
+
124
128
  .addition {
125
129
  color: blue; }
126
130
 
@@ -369,7 +373,7 @@ h1, h2, h3, h4, h5, h6 {
369
373
 
370
374
  blockquote, q {
371
375
  quotes: none; }
372
- blockquote:before, blockquote:after, q:before, q:after {
376
+ blockquote::before, blockquote::after, q::before, q::after {
373
377
  content: '';
374
378
  content: none; }
375
379
 
@@ -392,14 +396,18 @@ b, strong {
392
396
  div.document-stage-band, div.document-type-band {
393
397
  background-color: #333333; }
394
398
 
395
- a.FootnoteRef + a.FootnoteRef:before {
399
+ a.FootnoteRef + a.FootnoteRef::before {
396
400
  content: ", ";
397
401
  vertical-align: super; }
398
402
 
399
- a.TableFootnoteRef + a.TableFootnoteRef:before {
403
+ a.TableFootnoteRef + a.TableFootnoteRef::before {
400
404
  content: ", ";
401
405
  vertical-align: super; }
402
406
 
407
+ a.TableFootnoteRef, span.TableFootnoteRef,
408
+ a.FootnoteRef, span.FootnoteRef {
409
+ vertical-align: super; }
410
+
403
411
  .addition {
404
412
  color: blue; }
405
413
 
@@ -790,7 +798,7 @@ nav #toc {
790
798
  #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
791
799
  background: none;
792
800
  box-shadow: none; }
793
- #toc li:before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:before {
801
+ #toc li::before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li::before {
794
802
  content: " ";
795
803
  display: none; }
796
804
  @media print {
@@ -1100,7 +1108,7 @@ ul, ol {
1100
1108
 
1101
1109
  ul > li {
1102
1110
  list-style: none; }
1103
- ul > li:before {
1111
+ ul > li::before {
1104
1112
  content: "\2014";
1105
1113
  display: inline-block;
1106
1114
  width: 1em;
@@ -70,7 +70,7 @@ nav {
70
70
  background: none;
71
71
  box-shadow: none;
72
72
  }
73
- &:before {
73
+ &::before {
74
74
  content: " ";
75
75
  display: none;
76
76
  }
@@ -356,7 +356,7 @@ ul {
356
356
  > li {
357
357
  list-style: none;
358
358
 
359
- &:before {
359
+ &::before {
360
360
  content: "\2014";
361
361
  display: inline-block;
362
362
  width: 1em;
@@ -57,16 +57,6 @@ module IsoDoc
57
57
  end
58
58
  end
59
59
 
60
- def make_body3(body, docxml)
61
- body.div **{ class: "main-section" } do |div3|
62
- boilerplate docxml, div3
63
- front docxml, div3
64
- middle docxml, div3
65
- footnotes div3
66
- comments div3
67
- end
68
- end
69
-
70
60
  def authority_cleanup(docxml)
71
61
  dest = docxml.at("//div[@id = 'draft-warning-destination']")
72
62
  auth = docxml.at("//div[@id = 'draft-warning']")
@@ -74,6 +64,11 @@ module IsoDoc
74
64
  super
75
65
  end
76
66
 
67
+ def clause(node, out)
68
+ node["type"] == "keyword" and return
69
+ super
70
+ end
71
+
77
72
  include BaseConvert
78
73
  include Init
79
74
  end
@@ -18,8 +18,9 @@ formula: معادلة
18
18
  inequality: عدم مساواة
19
19
  clause: فقرة
20
20
  section: قسم
21
- abstract: ملخص
21
+ summary: ملخص
22
22
  annex_subclause: فقرة
23
+ keywords: الكلمات الدالة
23
24
  in: في
24
25
  to: إلى
25
26
  where: ":حيث,"
@@ -17,8 +17,9 @@ formula: Gleichung
17
17
  inequality: Ungleichheit
18
18
  clause: Klausel
19
19
  section: Abschnitt
20
- abstract: Zusammenfassung
20
+ summary: Zusammenfassung
21
21
  annex_subclause: Klausel
22
+ keywords: Schlüsselwörter
22
23
  in: in
23
24
  to: bis
24
25
  where: "wobei:"
@@ -8,7 +8,7 @@ symbolsabbrev: Abbreviations and acronyms
8
8
  abbrev: Abbreviations and acronyms
9
9
  symbols: Abbreviations and acronyms
10
10
  conventions: Conventions
11
- abstract: Summary
11
+ summary: Summary
12
12
  elsewhere_terms: >-
13
13
  This Recommendation uses the following terms defined elsewhere:
14
14
  here_terms: >-
@@ -20,6 +20,7 @@ inequality: Inequality
20
20
  clause: clause
21
21
  section: Section
22
22
  annex_subclause: clause
23
+ keywords: Keywords
23
24
  in: in
24
25
  to: to
25
26
  where: "where:"
@@ -64,6 +65,8 @@ prepub: Prepublished version
64
65
  draft_new: Draft new %
65
66
  email: E-mail
66
67
  editor_full: editor
68
+ toc_figures: List of Figures
69
+ toc_tables: List of Tables
67
70
  doctype_dict:
68
71
  resolution: Resolution
69
72
  recommendation: Recommendation
@@ -8,7 +8,7 @@ symbolsabbrev: Abreviaciones y acrónimos
8
8
  abbrev: Abreviaciones y acrónimos
9
9
  symbols: Abreviaciones y acrónimos
10
10
  conventions: Convenciones
11
- abstract: Resumen
11
+ summary: Resumen
12
12
  elsewhere_terms: >-
13
13
  Esta Recomendación utiliza los siguientes términos definidos en otro lugar:
14
14
  here_terms: >-
@@ -20,6 +20,7 @@ inequality: Inecuación
20
20
  clause: cláusula
21
21
  section: Sección
22
22
  annex_subclause: cláusula
23
+ keywords: Palabras clave
23
24
  in: en
24
25
  to: a
25
26
  where: "donde:"
@@ -64,6 +65,8 @@ prepub: Versión prepublicada
64
65
  draft_new: Borrador de nueva %
65
66
  email: E-mail
66
67
  editor_full: editor
68
+ toc_figures: Table de Figuras
69
+ toc_tables: Tabla de Tablas
67
70
  doctype_dict:
68
71
  resolution: Resolución
69
72
  recommendation: Recomendación
@@ -8,7 +8,7 @@ symbolsabbrev: Abréviations et acronymes
8
8
  abbrev: Abréviations et acronymes
9
9
  symbols: Abréviations et acronymes
10
10
  conventions: Conventions
11
- abstract: Résumé
11
+ summary: Résumé
12
12
  elsewhere_terms: >-
13
13
  La présente Recommandation utilise les termes suivants définis ailleurs:
14
14
  here_terms: >-
@@ -20,6 +20,7 @@ inequality: Inégalité
20
20
  clause: article
21
21
  section: Section
22
22
  annex_subclause: article
23
+ keywords: Mots clés
23
24
  in: dans
24
25
  to: à
25
26
  where: "où:"
@@ -64,6 +65,8 @@ prepub: Version pré-publiée
64
65
  draft_new: Projet de nouvelle %
65
66
  editor_full: éditeur
66
67
  email: E-mail
68
+ toc_figures: Table de Figures
69
+ toc_tables: Table des Tableaux
67
70
  doctype_dict:
68
71
  resolution: Résolution
69
72
  recommendation: Recommandation
@@ -8,7 +8,7 @@ symbolsabbrev: Сокращения и акронимы
8
8
  abbrev: Сокращения и акронимы
9
9
  symbols: Сокращения и акронимы
10
10
  conventions: Соглашения
11
- abstract: Резюме
11
+ summary: Резюме
12
12
  elsewhere_terms: >-
13
13
  Эта Рекомендация использует следующие термины, определенные в другом месте:
14
14
  here_terms: >-
@@ -20,6 +20,7 @@ inequality: Неравенство
20
20
  clause: пункт
21
21
  section: Раздел
22
22
  annex_subclause: пункт
23
+ keywords: Ключевые слова
23
24
  in: в
24
25
  to: до
25
26
  where: "где:"
@@ -63,6 +64,8 @@ bdt_full: Бюро развития электросвязи<br/>МСЭ
63
64
  prepub: Предварительно опубликованная версия
64
65
  draft_new: Проект новой %
65
66
  email: Эл. почта
67
+ toc_figures: Таблица Фигур
68
+ toc_tables: Таблица Таблиц
66
69
  editor_full: редактор
67
70
  doctype_dict:
68
71
  resolution: Резолюция
@@ -8,7 +8,7 @@ symbolsabbrev: 缩略语与缩写
8
8
  abbrev: 缩略语与缩写
9
9
  symbols: 缩略语与缩写
10
10
  conventions: 惯例
11
- abstract: 概括
11
+ summary: 概括
12
12
  elsewhere_terms: >-
13
13
  本建议书采用下列他处定义的术语:
14
14
  here_terms: >-
@@ -20,6 +20,7 @@ inequality: 不等式
20
20
  clause: 条款
21
21
  section: 节
22
22
  annex_subclause: 条款
23
+ keywords: 关键词
23
24
  in: in
24
25
  to: to
25
26
  where: 式中: