metanorma-itu 2.2.14 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/itu/base_convert.rb +18 -66
- data/lib/isodoc/itu/html/_coverpage.css +7 -3
- data/lib/isodoc/itu/html/htmlstyle.css +16 -8
- data/lib/isodoc/itu/html/htmlstyle.scss +2 -2
- data/lib/isodoc/itu/html_convert.rb +5 -10
- data/lib/isodoc/itu/i18n-ar.yaml +2 -1
- data/lib/isodoc/itu/i18n-de.yaml +2 -1
- data/lib/isodoc/itu/i18n-en.yaml +4 -1
- data/lib/isodoc/itu/i18n-es.yaml +4 -1
- data/lib/isodoc/itu/i18n-fr.yaml +4 -1
- data/lib/isodoc/itu/i18n-ru.yaml +4 -1
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +2 -1
- data/lib/isodoc/itu/itu.implementers-guide.xsl +146 -81
- data/lib/isodoc/itu/itu.in-force.xsl +146 -81
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +146 -81
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +146 -81
- data/lib/isodoc/itu/itu.recommendation.xsl +146 -81
- data/lib/isodoc/itu/itu.resolution.xsl +146 -81
- data/lib/isodoc/itu/itu.service-publication.xsl +146 -81
- data/lib/isodoc/itu/itu.technical-paper.xsl +146 -81
- data/lib/isodoc/itu/itu.technical-report.xsl +146 -81
- data/lib/isodoc/itu/presentation_bibdata.rb +1 -1
- data/lib/isodoc/itu/presentation_preface.rb +78 -0
- data/lib/isodoc/itu/presentation_xml_convert.rb +62 -57
- data/lib/isodoc/itu/word_convert.rb +0 -27
- data/lib/metanorma/itu/cleanup.rb +7 -0
- data/lib/metanorma/itu/isodoc.rng +26 -4
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd7cb2a16590fe04f51e162637b7fc1be2b6e7b403d04118e8c82b2ad0e4eb66
|
4
|
+
data.tar.gz: 35a5dd96771972460f80fc0f0a83f4c6610b59bd659b08c771b89405ca719e62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78896c795984c2999c194e6cb21546880ed1df41cbabe7082f773d5086c1f354f5d342eec07f7ae697dd21ab9848aee3b035d4047db3af3c1c4efc9296ccf10f
|
7
|
+
data.tar.gz: 53894e2251b8a69d8c4ff9c37789b600b18907c8a718ac9a5dde34e351e4e36b7b27c1ae40b3808bc885dfa7d1b7cf458d2e3a0ca43474a9ec341bd07760cae8
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require "isodoc"
|
2
2
|
require "fileutils"
|
3
|
-
require_relative "
|
4
|
-
require_relative "
|
5
|
-
require_relative "
|
6
|
-
require_relative "
|
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(
|
76
|
+
.sub("%", @meta.get[:doctype] || "")
|
78
77
|
end
|
79
78
|
end
|
80
79
|
|
81
|
-
def annex(
|
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:
|
86
|
-
annex_name(
|
87
|
-
|
88
|
-
if c1.name == "title" then annex_name(
|
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
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
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
|
-
|
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
|
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
|
116
|
+
a.FootnoteRef + a.FootnoteRef::before {
|
117
117
|
content: ", ";
|
118
118
|
vertical-align: super; }
|
119
119
|
|
120
|
-
a.TableFootnoteRef + a.TableFootnoteRef
|
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
|
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
|
116
|
+
a.FootnoteRef + a.FootnoteRef::before {
|
117
117
|
content: ", ";
|
118
118
|
vertical-align: super; }
|
119
119
|
|
120
|
-
a.TableFootnoteRef + a.TableFootnoteRef
|
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
|
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
|
399
|
+
a.FootnoteRef + a.FootnoteRef::before {
|
396
400
|
content: ", ";
|
397
401
|
vertical-align: super; }
|
398
402
|
|
399
|
-
a.TableFootnoteRef + a.TableFootnoteRef
|
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
|
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
|
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
|
-
|
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
|
-
|
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
|
data/lib/isodoc/itu/i18n-ar.yaml
CHANGED
data/lib/isodoc/itu/i18n-de.yaml
CHANGED
data/lib/isodoc/itu/i18n-en.yaml
CHANGED
@@ -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
|
-
|
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
|
data/lib/isodoc/itu/i18n-es.yaml
CHANGED
@@ -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
|
-
|
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
|
data/lib/isodoc/itu/i18n-fr.yaml
CHANGED
@@ -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
|
-
|
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
|
data/lib/isodoc/itu/i18n-ru.yaml
CHANGED
@@ -8,7 +8,7 @@ symbolsabbrev: Сокращения и акронимы
|
|
8
8
|
abbrev: Сокращения и акронимы
|
9
9
|
symbols: Сокращения и акронимы
|
10
10
|
conventions: Соглашения
|
11
|
-
|
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
|
-
|
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: 式中:
|