metanorma-itu 1.2.11 → 1.2.12
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/basicdoc.rng +5 -3
- data/lib/asciidoctor/itu/converter.rb +1 -1
- data/lib/asciidoctor/itu/front.rb +5 -5
- data/lib/asciidoctor/itu/isodoc.rng +3 -0
- data/lib/asciidoctor/itu/validate.rb +1 -1
- data/lib/isodoc/itu/base_convert.rb +5 -0
- data/lib/isodoc/itu/html/header.html +8 -8
- data/lib/isodoc/itu/html/html_itu_intro.html +1 -1
- data/lib/isodoc/itu/html/htmlstyle.css +11 -0
- data/lib/isodoc/itu/html/htmlstyle.scss +17 -0
- data/lib/isodoc/itu/html/word_itu_intro.html +2 -2
- data/lib/isodoc/itu/html/word_itu_titlepage.html +1 -1
- data/lib/isodoc/itu/html/wordstyle.css +31 -0
- data/lib/isodoc/itu/html/wordstyle.scss +30 -0
- data/lib/isodoc/itu/html_convert.rb +2 -2
- data/lib/isodoc/itu/i18n-en.yaml +1 -1
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +473 -174
- data/lib/isodoc/itu/itu.recommendation.xsl +473 -174
- data/lib/isodoc/itu/itu.resolution.xsl +473 -174
- data/lib/isodoc/itu/itu.technical-paper.xsl +473 -174
- data/lib/isodoc/itu/itu.technical-report.xsl +473 -174
- data/lib/isodoc/itu/presentation_xml_convert.rb +2 -2
- data/lib/isodoc/itu/word_convert.rb +2 -2
- data/lib/isodoc/itu/xref.rb +10 -6
- data/lib/metanorma/itu/processor.rb +1 -0
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +2 -2
- metadata +6 -6
@@ -148,7 +148,7 @@ module IsoDoc
|
|
148
148
|
t = f.at(ns("./title")) and t["depth"] = "1"
|
149
149
|
lbl = @xrefs.anchor(f['id'], :label, false) or return
|
150
150
|
f.elements.first.previous =
|
151
|
-
"<p
|
151
|
+
"<p keep-with-next='true' class='supertitle'>#{@i18n.get['section'].upcase} #{lbl}</p>"
|
152
152
|
end
|
153
153
|
|
154
154
|
def annex1(f)
|
@@ -156,7 +156,7 @@ module IsoDoc
|
|
156
156
|
lbl = @xrefs.anchor(f['id'], :label)
|
157
157
|
subhead = (@i18n.l10n("(#{@i18n.get['to']} ") +
|
158
158
|
f.at(ns("//bibdata/title[@type = 'resolution']")).children.to_xml + @i18n.l10n(")"))
|
159
|
-
f.elements.first.previous = "<p
|
159
|
+
f.elements.first.previous = "<p class='supertitle'>#{lbl}<br/>#{subhead}</p>"
|
160
160
|
if t = f.at(ns("./title"))
|
161
161
|
t.children = "<strong>#{t.children.to_xml}</strong>"
|
162
162
|
end
|
@@ -74,9 +74,9 @@ module IsoDoc
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def default_fonts(options)
|
77
|
-
{ bodyfont: (options[:script] == "Hans" ? '"
|
77
|
+
{ bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' :
|
78
78
|
'"Times New Roman",serif'),
|
79
|
-
headerfont: (options[:script] == "Hans" ? '"
|
79
|
+
headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' :
|
80
80
|
'"Times New Roman",serif'),
|
81
81
|
monospacefont: '"Courier New",monospace',
|
82
82
|
normalfontsize: "12.0pt",
|
data/lib/isodoc/itu/xref.rb
CHANGED
@@ -4,6 +4,10 @@ require "fileutils"
|
|
4
4
|
module IsoDoc
|
5
5
|
module ITU
|
6
6
|
class Counter < IsoDoc::XrefGen::Counter
|
7
|
+
def print
|
8
|
+
super.sub(/([0-9])(bis|ter|quater|quinquies|sexies|septies|octies|nonies)$/,
|
9
|
+
"\\1<em>\\2</em>")
|
10
|
+
end
|
7
11
|
end
|
8
12
|
|
9
13
|
class Xref < IsoDoc::Xref
|
@@ -104,7 +108,7 @@ module IsoDoc
|
|
104
108
|
end
|
105
109
|
|
106
110
|
def sequential_figure_names(clause)
|
107
|
-
c =
|
111
|
+
c = Counter.new
|
108
112
|
j = 0
|
109
113
|
clause.xpath(ns(".//figure | .//sourcecode[not(ancestor::example)]")).each do |t|
|
110
114
|
if t.parent.name == "figure" then j += 1
|
@@ -119,7 +123,7 @@ module IsoDoc
|
|
119
123
|
end
|
120
124
|
|
121
125
|
def hierarchical_figure_names(clause, num)
|
122
|
-
c =
|
126
|
+
c = Counter.new
|
123
127
|
j = 0
|
124
128
|
clause.xpath(ns(".//figure | .//sourcecode[not(ancestor::example)]")).each do |t|
|
125
129
|
if t.parent.name == "figure" then j += 1
|
@@ -144,7 +148,7 @@ module IsoDoc
|
|
144
148
|
end
|
145
149
|
|
146
150
|
def hierarchical_formula_names(clause, num)
|
147
|
-
c =
|
151
|
+
c = Counter.new
|
148
152
|
clause.xpath(ns(".//formula")).each do |t|
|
149
153
|
next if t["id"].nil? || t["id"].empty?
|
150
154
|
@anchors[t["id"]] = anchor_struct(
|
@@ -160,7 +164,7 @@ module IsoDoc
|
|
160
164
|
|
161
165
|
def termnote_anchor_names(docxml)
|
162
166
|
docxml.xpath(ns("//term[descendant::termnote]")).each do |t|
|
163
|
-
c =
|
167
|
+
c = Counter.new
|
164
168
|
notes = t.xpath(ns(".//termnote"))
|
165
169
|
notes.each do |n|
|
166
170
|
return if n["id"].nil? || n["id"].empty?
|
@@ -173,7 +177,7 @@ module IsoDoc
|
|
173
177
|
end
|
174
178
|
|
175
179
|
def clause_names(docxml, sect_num)
|
176
|
-
docxml.xpath(ns("//sections/clause[not(@unnumbered = 'true')][not(@type = 'scope')]")).
|
180
|
+
docxml.xpath(ns("//sections/clause[not(@unnumbered = 'true')][not(@type = 'scope')][not(descendant::terms)]")).
|
177
181
|
each do |c|
|
178
182
|
section_names(c, sect_num, 1)
|
179
183
|
end
|
@@ -212,7 +216,7 @@ module IsoDoc
|
|
212
216
|
lbl = clause&.at(ns("./title"))&.text || "[#{clause["id"]}]"
|
213
217
|
@anchors[clause["id"]] =
|
214
218
|
{ label: lbl, xref: l10n(%{"#{lbl}"}), level: lvl, type: "clause" }
|
215
|
-
clause.xpath(ns(SUBCLAUSES)).
|
219
|
+
clause.xpath(ns(SUBCLAUSES)).each do |c|
|
216
220
|
unnumbered_section_names1(c, lvl + 1)
|
217
221
|
end
|
218
222
|
end
|
data/metanorma-itu.gemspec
CHANGED
@@ -26,8 +26,8 @@ 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.
|
30
|
-
spec.add_dependency "isodoc", "~> 1.
|
29
|
+
spec.add_dependency "metanorma-standoc", "~> 1.8.0"
|
30
|
+
spec.add_dependency "isodoc", "~> 1.5.0"
|
31
31
|
spec.add_dependency "twitter_cldr"
|
32
32
|
spec.add_dependency "tzinfo-data" # we need this for windows only
|
33
33
|
|
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.2.
|
4
|
+
version: 1.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.8.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.8.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: isodoc
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.5.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.5.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: twitter_cldr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|