metanorma-bipm 2.1.13 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/base_convert.rb +0 -28
- data/lib/isodoc/bipm/bipm.brochure.xsl +340 -240
- data/lib/isodoc/bipm/bipm.guide.xsl +340 -240
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +340 -240
- data/lib/isodoc/bipm/bipm.rapport.xsl +340 -240
- data/lib/isodoc/bipm/html/htmlstyle.css +5 -2
- data/lib/isodoc/bipm/index.rb +29 -18
- data/lib/isodoc/bipm/jcgm.standard.xsl +282 -194
- data/lib/isodoc/bipm/presentation_xml_convert.rb +26 -9
- data/lib/metanorma/bipm/basicdoc.rng +3 -0
- data/lib/metanorma/bipm/biblio-standoc.rng +1 -1
- data/lib/metanorma/bipm/isodoc.rng +11 -0
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +2 -2
- metadata +7 -7
@@ -9,7 +9,7 @@ module IsoDoc
|
|
9
9
|
module BIPM
|
10
10
|
class PresentationXMLConvert < IsoDoc::Generic::PresentationXMLConvert
|
11
11
|
def convert1(docxml, filename, dir)
|
12
|
-
@jcgm = docxml&.at(ns("//bibdata/ext/editorialgroup/committee/"\
|
12
|
+
@jcgm = docxml&.at(ns("//bibdata/ext/editorialgroup/committee/" \
|
13
13
|
"@acronym"))&.value == "JCGM"
|
14
14
|
@iso = IsoDoc::Iso::PresentationXMLConvert
|
15
15
|
.new({ language: @lang, script: @script })
|
@@ -18,9 +18,8 @@ module IsoDoc
|
|
18
18
|
super
|
19
19
|
end
|
20
20
|
|
21
|
-
def eref_localities1(
|
22
|
-
@jcgm and return @iso.eref_localities1(
|
23
|
-
node, lang)
|
21
|
+
def eref_localities1(opt)
|
22
|
+
@jcgm and return @iso.eref_localities1(opt)
|
24
23
|
super
|
25
24
|
end
|
26
25
|
|
@@ -46,7 +45,7 @@ module IsoDoc
|
|
46
45
|
|
47
46
|
lbl = @xrefs.anchor(elem["id"], :label)
|
48
47
|
t = elem.at(ns("./title")) and
|
49
|
-
t.children = "<strong>#{t.children
|
48
|
+
t.children = "<strong>#{to_xml(t.children)}</strong>"
|
50
49
|
prefix_name(elem, ".<tab/>", lbl, "title")
|
51
50
|
end
|
52
51
|
|
@@ -118,7 +117,7 @@ module IsoDoc
|
|
118
117
|
end
|
119
118
|
|
120
119
|
def bibdata_titles(bibdata)
|
121
|
-
return unless app = bibdata.at(ns("//bibdata/ext/"\
|
120
|
+
return unless app = bibdata.at(ns("//bibdata/ext/" \
|
122
121
|
"structuredidentifier/part"))
|
123
122
|
|
124
123
|
bibdata.xpath(ns("//bibdata/title[@type = 'part']")).each do |t|
|
@@ -126,7 +125,7 @@ module IsoDoc
|
|
126
125
|
t["type"] = "part-with-numbering"
|
127
126
|
part = t["language"] == "en" ? "Part" : "Partie"
|
128
127
|
# not looking up in YAML
|
129
|
-
t.children = l10n("#{part} #{app.text}: #{t.children
|
128
|
+
t.children = l10n("#{part} #{app.text}: #{to_xml(t.children)}",
|
130
129
|
t["language"])
|
131
130
|
end
|
132
131
|
end
|
@@ -204,9 +203,27 @@ module IsoDoc
|
|
204
203
|
|
205
204
|
def termsource1(elem)
|
206
205
|
while elem&.next_element&.name == "termsource"
|
207
|
-
elem << "; #{elem.next_element.remove.children
|
206
|
+
elem << "; #{to_xml(elem.next_element.remove.children)}"
|
208
207
|
end
|
209
|
-
elem.children = l10n("[#{@i18n.source} #{elem.children.
|
208
|
+
elem.children = l10n("[#{@i18n.source} #{to_xml(elem.children).strip}]")
|
209
|
+
end
|
210
|
+
|
211
|
+
def norm_ref_entry_code(_ordinal, identifiers, _ids, _standard, datefn)
|
212
|
+
ret = (identifiers[0] || identifiers[1])
|
213
|
+
ret += " #{identifiers[1]}" if identifiers[0] && identifiers[1]
|
214
|
+
"#{ret}#{datefn} "
|
215
|
+
end
|
216
|
+
|
217
|
+
def biblio_ref_entry_code(ordinal, ids, _id, standard, datefn)
|
218
|
+
standard and id = nil
|
219
|
+
ret = (ids[:ordinal] || ids[:metanorma] || "[#{ordinal}]")
|
220
|
+
if ids[:sdo]
|
221
|
+
ret = prefix_bracketed_ref(ret)
|
222
|
+
ret += "#{ids[:sdo]}#{datefn} "
|
223
|
+
else
|
224
|
+
ret = prefix_bracketed_ref("#{ret}#{datefn}")
|
225
|
+
end
|
226
|
+
ret
|
210
227
|
end
|
211
228
|
|
212
229
|
include Init
|
@@ -571,6 +571,11 @@
|
|
571
571
|
<ref name="MultilingualRenderingType"/>
|
572
572
|
</attribute>
|
573
573
|
</optional>
|
574
|
+
<optional>
|
575
|
+
<attribute name="linenums">
|
576
|
+
<data type="boolean"/>
|
577
|
+
</attribute>
|
578
|
+
</optional>
|
574
579
|
<optional>
|
575
580
|
<ref name="tname"/>
|
576
581
|
</optional>
|
@@ -1238,6 +1243,11 @@
|
|
1238
1243
|
</define>
|
1239
1244
|
<define name="concept">
|
1240
1245
|
<element name="concept">
|
1246
|
+
<optional>
|
1247
|
+
<attribute name="bold">
|
1248
|
+
<data type="boolean"/>
|
1249
|
+
</attribute>
|
1250
|
+
</optional>
|
1241
1251
|
<optional>
|
1242
1252
|
<attribute name="ital">
|
1243
1253
|
<data type="boolean"/>
|
@@ -2653,6 +2663,7 @@
|
|
2653
2663
|
<value>full</value>
|
2654
2664
|
<value>short</value>
|
2655
2665
|
<value>id</value>
|
2666
|
+
<text/>
|
2656
2667
|
</choice>
|
2657
2668
|
</define>
|
2658
2669
|
<define name="erefTypeWithConnective">
|
data/metanorma-bipm.gemspec
CHANGED
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
29
29
|
|
30
|
-
spec.add_dependency "metanorma-generic", "~> 2.
|
31
|
-
spec.add_dependency "metanorma-iso", "~> 2.
|
30
|
+
spec.add_dependency "metanorma-generic", "~> 2.3.0"
|
31
|
+
spec.add_dependency "metanorma-iso", "~> 2.3.0"
|
32
32
|
|
33
33
|
spec.add_development_dependency "debug"
|
34
34
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: metanorma-iso
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.3.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
40
|
+
version: 2.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: debug
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -297,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
297
297
|
- !ruby/object:Gem::Version
|
298
298
|
version: '0'
|
299
299
|
requirements: []
|
300
|
-
rubygems_version: 3.3.
|
300
|
+
rubygems_version: 3.3.26
|
301
301
|
signing_key:
|
302
302
|
specification_version: 4
|
303
303
|
summary: metanorma-bipm lets you write BIPM standards in Metanorma.
|