metanorma-itu 1.0.16 → 1.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/itu/biblio.rng +13 -3
- data/lib/asciidoctor/itu/isodoc.rng +17 -1
- data/lib/isodoc/itu/base_convert.rb +58 -12
- data/lib/isodoc/itu/html/_coverpage.scss +6 -2
- data/lib/isodoc/itu/html/html_itu_titlepage.html +1 -4
- data/lib/isodoc/itu/html/htmlstyle.scss +8 -4
- data/lib/isodoc/itu/html/itu.scss +4 -0
- data/lib/isodoc/itu/html/word_itu_intro.html +9 -1
- data/lib/isodoc/itu/html/word_itu_titlepage.html +1 -4
- data/lib/isodoc/itu/html/wordstyle.scss +5 -4
- data/lib/isodoc/itu/i18n-en.yaml +2 -1
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +570 -256
- data/lib/isodoc/itu/itu.recommendation.xsl +570 -256
- data/lib/isodoc/itu/itu.resolution.xsl +570 -256
- data/lib/isodoc/itu/metadata.rb +13 -5
- data/lib/isodoc/itu/ref.rb +36 -10
- data/lib/isodoc/itu/terms.rb +1 -1
- data/lib/isodoc/itu/word_convert.rb +2 -1
- data/lib/isodoc/itu/xref.rb +11 -4
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +1 -1
- metadata +4 -4
data/lib/isodoc/itu/metadata.rb
CHANGED
@@ -11,7 +11,8 @@ module IsoDoc
|
|
11
11
|
File.expand_path(File.join(here, "html", "International_Telecommunication_Union_Logo.svg")))
|
12
12
|
set(:logo_comb,
|
13
13
|
File.expand_path(File.join(here, "html", "itu-document-comb.png")))
|
14
|
-
set(:logo_word,
|
14
|
+
set(:logo_word,
|
15
|
+
File.expand_path(File.join(here, "html", "International_Telecommunication_Union_Logo.svg")))
|
15
16
|
end
|
16
17
|
|
17
18
|
def title(isoxml, _out)
|
@@ -68,11 +69,18 @@ module IsoDoc
|
|
68
69
|
end
|
69
70
|
|
70
71
|
def keywords(isoxml, _out)
|
71
|
-
|
72
|
-
|
73
|
-
|
72
|
+
super
|
73
|
+
set(:keywords, get[:keywords].sort)
|
74
|
+
end
|
75
|
+
|
76
|
+
def doctype(isoxml, _out)
|
77
|
+
d = isoxml&.at(ns("//bibdata/ext/doctype"))&.text
|
78
|
+
set(:doctype_original, d)
|
79
|
+
if d == "recommendation-annex"
|
80
|
+
set(:doctype, "Recommendation")
|
81
|
+
else
|
82
|
+
super
|
74
83
|
end
|
75
|
-
set(:keywords, keywords.sort)
|
76
84
|
end
|
77
85
|
|
78
86
|
def ip_notice_received(isoxml, _out)
|
data/lib/isodoc/itu/ref.rb
CHANGED
@@ -17,12 +17,14 @@ module IsoDoc
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def nonstd_bibitem(list, b, ordinal, biblio)
|
20
|
-
list.
|
20
|
+
list.tr **attr_code(iso_bibitem_entry_attrs(b, biblio)) do |ref|
|
21
21
|
id = render_identifier(bibitem_ref_code(b))
|
22
|
-
ref
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
ref.td **{style: "vertical-align:top"} do |td|
|
23
|
+
td << (id[0] || "[#{id[1]}]")&.
|
24
|
+
gsub(/-/, "‑")&.gsub(/ /, " ")
|
25
|
+
date_note_process(b, td)
|
26
|
+
end
|
27
|
+
ref.td { |td| reference_format(b, td) }
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
@@ -30,11 +32,35 @@ module IsoDoc
|
|
30
32
|
nonstd_bibitem(list, b, ordinal, biblio)
|
31
33
|
end
|
32
34
|
|
35
|
+
def biblio_list(f, div, biblio)
|
36
|
+
div.table **{ class: "biblio", border: "0" } do |t|
|
37
|
+
i = 0
|
38
|
+
t.tbody do |tbody|
|
39
|
+
f.elements.each do |b|
|
40
|
+
if b.name == "bibitem"
|
41
|
+
next if implicit_reference(b)
|
42
|
+
i += 1
|
43
|
+
nonstd_bibitem(tbody, b, i, biblio)
|
44
|
+
else
|
45
|
+
unless %w(title clause references).include? b.name
|
46
|
+
tbody.tx do |tx|
|
47
|
+
parse(b, tx)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
f.xpath(ns("./clause | ./references")).each do |x|
|
55
|
+
parse(x, div)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
33
59
|
def bracket_if_num(x)
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
60
|
+
return nil if x.nil?
|
61
|
+
x = x.text.sub(/^\[/, "").sub(/\]$/, "")
|
62
|
+
"[#{x}]"
|
63
|
+
end
|
38
64
|
|
39
65
|
def reference_format(b, r)
|
40
66
|
reference_format_start(b, r)
|
@@ -50,7 +76,7 @@ module IsoDoc
|
|
50
76
|
end
|
51
77
|
|
52
78
|
IGNORE_IDS =
|
53
|
-
|
79
|
+
"@type = 'DOI' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor'".freeze
|
54
80
|
|
55
81
|
def multi_bibitem_ref_code(b)
|
56
82
|
id = b.xpath(ns("./docidentifier[not(@type = 'metanorma' or #{IGNORE_IDS})]"))
|
data/lib/isodoc/itu/terms.rb
CHANGED
@@ -214,8 +214,9 @@ module IsoDoc
|
|
214
214
|
next unless auth && dest
|
215
215
|
t == "copyright" and p = auth&.at(".//p") and
|
216
216
|
p["class"] = "boilerplateHdr"
|
217
|
-
auth&.xpath(".//p[not(@class)]")&.
|
217
|
+
auth&.xpath(".//p[not(@class)]")&.each_with_index do |p, i|
|
218
218
|
p["class"] = "boilerplate"
|
219
|
+
i == 0 && t == "copyright" and p["style"] = "text-align:center;"
|
219
220
|
end
|
220
221
|
auth << "<p> </p><p> </p><p> </p>" unless t == "copyright"
|
221
222
|
dest.replace(auth.remove)
|
data/lib/isodoc/itu/xref.rb
CHANGED
@@ -67,10 +67,6 @@ module IsoDoc
|
|
67
67
|
termexample_anchor_names(d)
|
68
68
|
end
|
69
69
|
|
70
|
-
def hiersep
|
71
|
-
"-"
|
72
|
-
end
|
73
|
-
|
74
70
|
MIDDLE_SECTIONS = "//clause[title = 'Scope'] | "\
|
75
71
|
"//foreword | //introduction | //acknowledgements | "\
|
76
72
|
"//references[@normative = 'true'] | "\
|
@@ -126,6 +122,17 @@ module IsoDoc
|
|
126
122
|
end
|
127
123
|
end
|
128
124
|
end
|
125
|
+
|
126
|
+
def hierarchical_formula_names(clause, num)
|
127
|
+
c = IsoDoc::Function::XrefGen::Counter.new
|
128
|
+
clause.xpath(ns(".//formula")).each do |t|
|
129
|
+
next if t["id"].nil? || t["id"].empty?
|
130
|
+
@anchors[t["id"]] =
|
131
|
+
anchor_struct("#{num}-#{c.increment(t).print}", nil,
|
132
|
+
t["inequality"] ? @inequality_lbl : @formula_lbl,
|
133
|
+
"formula", t["unnumbered"])
|
134
|
+
end
|
135
|
+
end
|
129
136
|
end
|
130
137
|
end
|
131
138
|
end
|
data/metanorma-itu.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
|
27
27
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
28
28
|
spec.add_dependency "ruby-jing"
|
29
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
29
|
+
spec.add_dependency "metanorma-standoc", "~> 1.4.0"
|
30
30
|
spec.add_dependency "isodoc", "~> 1.0.0"
|
31
31
|
|
32
32
|
spec.add_development_dependency "byebug", "~> 9.1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.4.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.4.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: isodoc
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|