metanorma-nist 1.2.10 → 1.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +9 -29
- data/.gitignore +1 -0
- data/.rubocop.yml +6 -2
- data/README.adoc +3 -0
- data/lib/asciidoctor/nist/basicdoc.rng +5 -3
- data/lib/asciidoctor/nist/biblio.rng +4 -6
- data/lib/asciidoctor/nist/boilerplate.rb +2 -2
- data/lib/asciidoctor/nist/cleanup.rb +3 -2
- data/lib/asciidoctor/nist/converter.rb +4 -2
- data/lib/asciidoctor/nist/front.rb +1 -1
- data/lib/asciidoctor/nist/isodoc.rng +134 -5
- data/lib/asciidoctor/nist/nist.rng +6 -0
- data/lib/asciidoctor/nist/nist_intro.xml +9 -9
- data/lib/asciidoctor/nist/nist_intro_cswp.xml +9 -9
- data/lib/isodoc/nist/html/html_nist_titlepage.html +5 -3
- data/lib/isodoc/nist/html/word_nist_titlepage.html +8 -8
- data/lib/isodoc/nist/html/word_nist_titlepage_cswp.html +2 -0
- data/lib/isodoc/nist/html_convert.rb +6 -8
- data/lib/isodoc/nist/nist.csts.xsl +5021 -0
- data/lib/isodoc/nist/nist.cswp.xsl +587 -253
- data/lib/isodoc/nist/nist.sp.xsl +576 -252
- data/lib/isodoc/nist/pdf_convert.rb +5 -1
- data/lib/isodoc/nist/word_convert.rb +2 -4
- data/lib/isodoc/nist/xref.rb +11 -5
- data/lib/metanorma/nist/processor.rb +0 -2
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +4 -4
- metadata +15 -13
@@ -14,7 +14,11 @@ module IsoDoc
|
|
14
14
|
|
15
15
|
def pdf_stylesheet(docxml)
|
16
16
|
series = docxml&.at(ns("//bibdata/series/abbreviation"))&.text
|
17
|
-
series
|
17
|
+
case series
|
18
|
+
when "NIST CSWP" then "nist.cswp.xsl"
|
19
|
+
when "NIST CSTS" then "nist.csts.xsl"
|
20
|
+
else "nist.sp.xsl"
|
21
|
+
end
|
18
22
|
end
|
19
23
|
end
|
20
24
|
end
|
@@ -37,10 +37,8 @@ module IsoDoc
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def default_fonts(options)
|
40
|
-
{ bodyfont:
|
41
|
-
|
42
|
-
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
|
43
|
-
'"Arial",sans-serif'),
|
40
|
+
{ bodyfont: '"Times New Roman",serif',
|
41
|
+
headerfont: '"Arial",sans-serif',
|
44
42
|
monospacefont: '"Courier New",monospace',
|
45
43
|
normalfontsize: "12.0pt",
|
46
44
|
footnotefontsize: "10.0pt",
|
data/lib/isodoc/nist/xref.rb
CHANGED
@@ -4,6 +4,9 @@ require "fileutils"
|
|
4
4
|
|
5
5
|
module IsoDoc
|
6
6
|
module NIST
|
7
|
+
class Counter < IsoDoc::XrefGen::Counter
|
8
|
+
end
|
9
|
+
|
7
10
|
class Xref < IsoDoc::Xref
|
8
11
|
SECTIONS_XPATH =
|
9
12
|
"//foreword | //introduction | //reviewnote | //executivesummary | //annex | "\
|
@@ -17,15 +20,18 @@ module IsoDoc
|
|
17
20
|
@in_execsummary = true
|
18
21
|
hierarchical_asset_names(d.xpath("//xmlns:executivesummary"), "ES")
|
19
22
|
@in_execsummary = false
|
20
|
-
|
23
|
+
c = Counter.new
|
24
|
+
clause_names(d, c)
|
21
25
|
middle_section_asset_names(d)
|
22
26
|
termnote_anchor_names(d)
|
23
27
|
termexample_anchor_names(d)
|
24
28
|
end
|
25
29
|
|
26
30
|
def back_anchor_names(docxml)
|
27
|
-
|
28
|
-
|
31
|
+
i = Counter.new("@")
|
32
|
+
docxml.xpath(ns("//annex")).each do |c|
|
33
|
+
i.increment(c)
|
34
|
+
annex_names(c, i.print)
|
29
35
|
end
|
30
36
|
docxml.xpath(ns("//bibliography/clause | "\
|
31
37
|
"//bibliography/references")).each do |b|
|
@@ -44,8 +50,8 @@ module IsoDoc
|
|
44
50
|
|
45
51
|
def clause_names(docxml, sect_num)
|
46
52
|
q = "//xmlns:sections/child::*"
|
47
|
-
docxml.xpath(q).
|
48
|
-
section_names(c,
|
53
|
+
docxml.xpath(q).each do |c|
|
54
|
+
section_names(c, sect_num, 1)
|
49
55
|
end
|
50
56
|
end
|
51
57
|
|
data/metanorma-nist.gemspec
CHANGED
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_dependency "iso-639"
|
31
31
|
spec.add_dependency "tzinfo-data" # we need this for windows only
|
32
32
|
|
33
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
34
|
-
spec.add_dependency "isodoc", "~> 1.
|
33
|
+
spec.add_dependency "metanorma-standoc", "~> 1.8.2"
|
34
|
+
spec.add_dependency "isodoc", "~> 1.5.0"
|
35
35
|
#spec.add_dependency "relaton-nist", "~> 0.3.0"
|
36
36
|
|
37
37
|
spec.add_development_dependency "byebug", "~> 9.1"
|
@@ -39,9 +39,9 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
40
40
|
spec.add_development_dependency "guard", "~> 2.14"
|
41
41
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
42
|
-
spec.add_development_dependency "rake", "~>
|
42
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
43
43
|
spec.add_development_dependency "rspec", "~> 3.6"
|
44
|
-
spec.add_development_dependency "rubocop", "
|
44
|
+
spec.add_development_dependency "rubocop", "~> 1.5.2"
|
45
45
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
46
46
|
spec.add_development_dependency "timecop", "~> 0.9"
|
47
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-nist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.15
|
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-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -86,28 +86,28 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: 1.8.2
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.
|
96
|
+
version: 1.8.2
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: isodoc
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
103
|
+
version: 1.5.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
110
|
+
version: 1.5.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: byebug
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: '
|
187
|
+
version: '13.0'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: '
|
194
|
+
version: '13.0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: rspec
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,16 +210,16 @@ dependencies:
|
|
210
210
|
name: rubocop
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- -
|
213
|
+
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
215
|
+
version: 1.5.2
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- -
|
220
|
+
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
222
|
+
version: 1.5.2
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: simplecov
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -259,6 +259,7 @@ extra_rdoc_files: []
|
|
259
259
|
files:
|
260
260
|
- ".github/workflows/rake.yml"
|
261
261
|
- ".github/workflows/release.yml"
|
262
|
+
- ".gitignore"
|
262
263
|
- ".hound.yml"
|
263
264
|
- ".rubocop.yml"
|
264
265
|
- CODE_OF_CONDUCT.md
|
@@ -317,6 +318,7 @@ files:
|
|
317
318
|
- lib/isodoc/nist/init.rb
|
318
319
|
- lib/isodoc/nist/metadata.rb
|
319
320
|
- lib/isodoc/nist/metadata_id.rb
|
321
|
+
- lib/isodoc/nist/nist.csts.xsl
|
320
322
|
- lib/isodoc/nist/nist.cswp.xsl
|
321
323
|
- lib/isodoc/nist/nist.sp.xsl
|
322
324
|
- lib/isodoc/nist/pdf_convert.rb
|
@@ -353,7 +355,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
353
355
|
- !ruby/object:Gem::Version
|
354
356
|
version: '0'
|
355
357
|
requirements: []
|
356
|
-
rubygems_version: 3.
|
358
|
+
rubygems_version: 3.1.4
|
357
359
|
signing_key:
|
358
360
|
specification_version: 4
|
359
361
|
summary: Metanorma NIST gem.
|