metanorma-un 0.5.6 → 0.5.11
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 +4 -4
- data/.github/workflows/rake.yml +29 -8
- data/README.adoc +2 -4
- data/lib/asciidoctor/un/basicdoc.rng +50 -3
- data/lib/asciidoctor/un/isodoc.rng +61 -3
- data/lib/isodoc/un/base_convert.rb +1 -1
- data/lib/isodoc/un/html/htmlstyle.css +3 -3
- data/lib/isodoc/un/html/htmlstyle.scss +2 -2
- data/lib/isodoc/un/html/unece.css +19 -20
- data/lib/isodoc/un/html/unece.scss +19 -20
- data/lib/isodoc/un/html/wordstyle.css +17 -17
- data/lib/isodoc/un/html/wordstyle.scss +17 -17
- data/lib/isodoc/un/html_convert.rb +3 -1
- data/lib/isodoc/un/i18n-en.yaml +1 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +312 -61
- data/lib/isodoc/un/un.plenary.xsl +312 -61
- data/lib/isodoc/un/un.recommendation.xsl +280 -62
- data/lib/isodoc/un/word_convert.rb +5 -1
- data/lib/isodoc/un/xref.rb +8 -6
- data/lib/metanorma/un/processor.rb +11 -8
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +2 -2
- metadata +6 -6
@@ -20,7 +20,11 @@ module IsoDoc
|
|
20
20
|
'"Times New Roman",serif'),
|
21
21
|
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
|
22
22
|
'"Times New Roman",serif'),
|
23
|
-
|
23
|
+
monospacefont: '"Courier New",monospace',
|
24
|
+
normalfontsize: "10.5pt",
|
25
|
+
monospacefontsize: "10.0pt",
|
26
|
+
smallerfontsize: "10.0pt",
|
27
|
+
footnotefontsize: "9.0pt",
|
24
28
|
}
|
25
29
|
end
|
26
30
|
|
data/lib/isodoc/un/xref.rb
CHANGED
@@ -23,8 +23,10 @@ module IsoDoc
|
|
23
23
|
def clause_names(docxml, sect_num)
|
24
24
|
q = "//clause[parent::sections]"
|
25
25
|
@paranumber = 0
|
26
|
-
|
27
|
-
|
26
|
+
i = 0
|
27
|
+
docxml.xpath(ns(q)).each do |c|
|
28
|
+
section_names(c, i, 1)
|
29
|
+
i += 1
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
@@ -56,14 +58,14 @@ module IsoDoc
|
|
56
58
|
def label_leaf_section(clause, lvl)
|
57
59
|
@paranumber += 1
|
58
60
|
@anchors[clause["id"]] = {label: @paranumber.to_s,
|
59
|
-
xref: "paragraph #{@paranumber}",
|
61
|
+
xref: l10n("#{@labels['paragraph']} #{@paranumber}"),
|
60
62
|
level: lvl, type: "paragraph" }
|
61
63
|
end
|
62
64
|
|
63
65
|
def label_annex_leaf_section(clause, num, lvl)
|
64
66
|
@paranumber += 1
|
65
67
|
@anchors[clause["id"]] = {label: @paranumber.to_s,
|
66
|
-
xref: "paragraph #{num}.#{@paranumber}",
|
68
|
+
xref: l10n("#{@labels['paragraph']} #{num}.#{@paranumber}"),
|
67
69
|
level: lvl, type: "paragraph" }
|
68
70
|
end
|
69
71
|
|
@@ -109,7 +111,7 @@ module IsoDoc
|
|
109
111
|
label_annex_leaf_section(clause, num, 1) and return
|
110
112
|
@anchors[clause["id"]] = { label: annex_name_lbl(clause, num),
|
111
113
|
type: "clause", value: num,
|
112
|
-
xref: "#{@labels['annex']} #{num}", level: 1 }
|
114
|
+
xref: l10n("#{@labels['annex']} #{num}"), level: 1 }
|
113
115
|
if a = single_annex_special_section(clause)
|
114
116
|
annex_names1(a, "#{num}", 1)
|
115
117
|
else
|
@@ -126,7 +128,7 @@ module IsoDoc
|
|
126
128
|
leaf_section?(clause) and
|
127
129
|
label_annex_leaf_section(clause, num, level) and return
|
128
130
|
/\.(?<leafnum>[^.]+$)/ =~ num
|
129
|
-
@anchors[clause["id"]] = { label: leafnum, xref: "#{@labels['annex']} #{num}",
|
131
|
+
@anchors[clause["id"]] = { label: leafnum, xref: l10n("#{@labels['annex']} #{num}"),
|
130
132
|
level: level, type: "clause" }
|
131
133
|
i = 1
|
132
134
|
clause.xpath(ns("./clause | ./references")).each do |c|
|
@@ -2,14 +2,6 @@ require "metanorma/processor"
|
|
2
2
|
|
3
3
|
module Metanorma
|
4
4
|
module UN
|
5
|
-
def self.fonts_used
|
6
|
-
{
|
7
|
-
html: ["Arial", "Arial Black", "Courier", "Times New Roman", "HanSans"],
|
8
|
-
doc: ["Arial", "Arial Black", "Courier", "Times New Roman", "HanSans"],
|
9
|
-
pdf: ["Arial", "Arial Black", "Courier", "Times New Roman", "HanSans"],
|
10
|
-
}
|
11
|
-
end
|
12
|
-
|
13
5
|
class Processor < Metanorma::Processor
|
14
6
|
|
15
7
|
def initialize
|
@@ -26,6 +18,17 @@ module Metanorma
|
|
26
18
|
)
|
27
19
|
end
|
28
20
|
|
21
|
+
def fonts_manifest
|
22
|
+
{
|
23
|
+
"Arial" => nil,
|
24
|
+
"Arial Black" => nil,
|
25
|
+
"Courier" => nil,
|
26
|
+
"Times New Roman" => nil,
|
27
|
+
"STIX Two Math" => nil,
|
28
|
+
"Source Han Sans" => nil,
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
29
32
|
def version
|
30
33
|
"Metanorma::UN #{Metanorma::UN::VERSION}"
|
31
34
|
end
|
data/lib/metanorma/un/version.rb
CHANGED
data/metanorma-unece.gemspec
CHANGED
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_dependency "twitter_cldr"
|
31
31
|
spec.add_dependency "iso-639"
|
32
32
|
|
33
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
34
|
-
spec.add_dependency "isodoc", "~> 1.2
|
33
|
+
spec.add_dependency "metanorma-standoc", "~> 1.7.0"
|
34
|
+
spec.add_dependency "isodoc", "~> 1.4.2"
|
35
35
|
|
36
36
|
spec.add_development_dependency "byebug", "~> 9.1"
|
37
37
|
spec.add_development_dependency "sassc", "2.4.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roman-numerals
|
@@ -58,28 +58,28 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.7.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.7.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: isodoc
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.2
|
75
|
+
version: 1.4.2
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.2
|
82
|
+
version: 1.4.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: byebug
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|