metanorma-iho 0.2.0 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ubuntu.yml +1 -1
- data/lib/asciidoctor/iho/basicdoc.rng +23 -0
- data/lib/asciidoctor/iho/converter.rb +12 -4
- data/lib/asciidoctor/iho/iho.rng +37 -6
- data/lib/asciidoctor/iho/isodoc.rng +124 -15
- data/lib/isodoc/iho/base_convert.rb +121 -1
- data/lib/isodoc/iho/html/htmlstyle.css +1 -1
- data/lib/isodoc/iho/html/iho.css +16 -4
- data/lib/isodoc/iho/html/iho.scss +18 -4
- data/lib/isodoc/iho/html_convert.rb +1 -0
- data/lib/isodoc/iho/i18n-en.yaml +2 -0
- data/lib/isodoc/iho/iho.specification.xsl +1227 -260
- data/lib/isodoc/iho/iho.standard.xsl +1227 -260
- data/lib/isodoc/iho/init.rb +3 -1
- data/lib/isodoc/iho/metadata.rb +0 -8
- data/lib/isodoc/iho/word_convert.rb +1 -0
- data/lib/isodoc/iho/xref.rb +11 -1
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +1 -2
- data/metanorma.yml +1 -0
- metadata +5 -18
data/lib/isodoc/iho/init.rb
CHANGED
data/lib/isodoc/iho/metadata.rb
CHANGED
@@ -8,14 +8,6 @@ module IsoDoc
|
|
8
8
|
Metanorma::IHO.configuration
|
9
9
|
end
|
10
10
|
|
11
|
-
def commentperiod(ixml, _out)
|
12
|
-
from = ixml.at(ns("//bibdata/ext/commentperiod/from"))&.text
|
13
|
-
to = ixml.at(ns("//bibdata/ext/commentperiod/to"))&.text
|
14
|
-
extended = ixml.at(ns("//bibdata/ext/commentperiod/extended"))&.text
|
15
|
-
set(:comment_from, from) if from
|
16
|
-
set(:comment_to, to) if to
|
17
|
-
end
|
18
|
-
|
19
11
|
def series(xml, _out)
|
20
12
|
set(:series, xml.at(ns("//bibdata/series[@type = 'main']/title"))&.text)
|
21
13
|
a = xml.at(ns("//bibdata/series[@type = 'main']/abbreviation"))&.text and
|
data/lib/isodoc/iho/xref.rb
CHANGED
@@ -15,7 +15,7 @@ module IsoDoc
|
|
15
15
|
@labels["appendix"] : @labels["annex"]
|
16
16
|
@anchors[clause["id"]] =
|
17
17
|
{ label: annex_name_lbl(clause, num), type: "clause",
|
18
|
-
xref: "#{lbl} #{num}", level: 1 }
|
18
|
+
xref: "#{lbl} #{num}", level: 1, value: lbl }
|
19
19
|
if a = single_annex_special_section(clause)
|
20
20
|
annex_names1(a, "#{num}", 1)
|
21
21
|
else
|
@@ -59,6 +59,16 @@ module IsoDoc
|
|
59
59
|
@anchors[c["id"]][:container] = clause["id"]
|
60
60
|
end
|
61
61
|
end
|
62
|
+
|
63
|
+
def section_names1(clause, num, level)
|
64
|
+
@anchors[clause["id"]] =
|
65
|
+
{ label: num, level: level, xref: l10n("#{@labels["subclause"]} #{num}"),
|
66
|
+
type: "clause" }
|
67
|
+
clause.xpath(ns(SUBCLAUSES)).
|
68
|
+
each_with_index do |c, i|
|
69
|
+
section_names1(c, "#{num}.#{i + 1}", level + 1)
|
70
|
+
end
|
71
|
+
end
|
62
72
|
end
|
63
73
|
end
|
64
74
|
end
|
data/metanorma-iho.gemspec
CHANGED
@@ -27,9 +27,8 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
28
28
|
|
29
29
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
30
|
-
spec.add_dependency "metanorma-standoc", "~> 1.5.0"
|
31
30
|
spec.add_dependency "isodoc", "~> 1.2.0"
|
32
|
-
spec.add_dependency 'metanorma-generic', '~> 1.
|
31
|
+
spec.add_dependency 'metanorma-generic', '~> 1.7.0'
|
33
32
|
|
34
33
|
spec.add_development_dependency "byebug", "~> 9.1"
|
35
34
|
spec.add_development_dependency "sassc", "2.4.0"
|
data/metanorma.yml
CHANGED
@@ -9,6 +9,7 @@ logo_paths:
|
|
9
9
|
- lib/isodoc/iho/html/image002.png
|
10
10
|
- lib/isodoc/iho/html/image003.png
|
11
11
|
validate_rng_file: lib/asciidoctor/iho/iho.rng
|
12
|
+
i18nyaml: lib/isodoc/iho/i18n-en.yaml
|
12
13
|
htmlcoverpage: lib/isodoc/iho/html/html_iho_titlepage.html
|
13
14
|
htmlintropage: lib/isodoc/iho/html/html_iho_intro.html
|
14
15
|
htmlstylesheet: lib/isodoc/iho/html/htmlstyle.scss
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
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-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.3.4
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: metanorma-standoc
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.5.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 1.5.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: isodoc
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +44,14 @@ dependencies:
|
|
58
44
|
requirements:
|
59
45
|
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
47
|
+
version: 1.7.0
|
62
48
|
type: :runtime
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
54
|
+
version: 1.7.0
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: byebug
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,6 +240,7 @@ files:
|
|
254
240
|
- lib/isodoc/iho/html/wordstyle.css
|
255
241
|
- lib/isodoc/iho/html/wordstyle.scss
|
256
242
|
- lib/isodoc/iho/html_convert.rb
|
243
|
+
- lib/isodoc/iho/i18n-en.yaml
|
257
244
|
- lib/isodoc/iho/iho.specification.xsl
|
258
245
|
- lib/isodoc/iho/iho.standard.xsl
|
259
246
|
- lib/isodoc/iho/init.rb
|