metanorma-csa 1.9.5 → 2.0.3
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 +4 -32
- data/.gitignore +3 -0
- data/bin/console +1 -1
- data/lib/isodoc/csa/csa.standard.xsl +2150 -1509
- data/lib/isodoc/csa/html/csa.css +1 -2
- data/lib/isodoc/csa/html/csa.scss +0 -1
- data/lib/isodoc/csa/html/htmlstyle.css +22 -17
- data/lib/isodoc/csa/html/htmlstyle.scss +9 -2
- data/lib/{asciidoctor → metanorma}/csa/basicdoc.rng +5 -3
- data/lib/{asciidoctor → metanorma}/csa/biblio.rng +7 -5
- data/lib/{asciidoctor → metanorma}/csa/boilerplate.xml +0 -0
- data/lib/{asciidoctor → metanorma}/csa/converter.rb +2 -2
- data/lib/{asciidoctor → metanorma}/csa/csa.rng +0 -0
- data/lib/{asciidoctor → metanorma}/csa/isodoc.rng +98 -1
- data/lib/{asciidoctor → metanorma}/csa/reqt.rng +0 -0
- data/lib/metanorma/csa/version.rb +1 -1
- data/lib/metanorma-csa.rb +1 -1
- data/metanorma-csa.gemspec +1 -1
- data/metanorma.yml +1 -1
- metadata +11 -12
- data/lib/asciidoctor/csa.rb +0 -5
data/lib/isodoc/csa/html/csa.css
CHANGED
@@ -786,8 +786,7 @@ div.example p.MsoListParagraph {
|
|
786
786
|
font-size: {{smallerfontsize}}; }
|
787
787
|
|
788
788
|
div.Note p.MsoListParagraph {
|
789
|
-
font-size: {{smallerfontsize}};
|
790
|
-
margin-left: 1.0cm; }
|
789
|
+
font-size: {{smallerfontsize}}; }
|
791
790
|
|
792
791
|
div.Note span.stem {
|
793
792
|
font-size: {{smallerfontsize}}; }
|
@@ -248,51 +248,56 @@ body {
|
|
248
248
|
main {
|
249
249
|
margin: 0 3em 0 6em; }
|
250
250
|
|
251
|
-
#toc {
|
251
|
+
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
252
252
|
font-family: {{bodyfont}};
|
253
253
|
font-weight: 400; }
|
254
|
-
#toc ul {
|
254
|
+
#toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
|
255
255
|
margin: 0;
|
256
256
|
padding: 0;
|
257
257
|
list-style: none; }
|
258
|
-
#toc ul li a {
|
258
|
+
#toc ul li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
|
259
259
|
padding: 5px 10px; }
|
260
|
-
#toc ul a {
|
260
|
+
#toc ul a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
|
261
261
|
color: #4D7EA5;
|
262
262
|
text-decoration: none;
|
263
263
|
display: block; }
|
264
|
-
#toc ul a:hover {
|
264
|
+
#toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
|
265
265
|
box-shadow: none;
|
266
266
|
color: #4D7EA5; }
|
267
|
-
#toc .h2 {
|
267
|
+
#toc .h2, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
|
268
268
|
padding-left: 30px; }
|
269
|
-
#toc .h3 {
|
269
|
+
#toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
|
270
270
|
padding-left: 50px; }
|
271
|
-
#toc .toc-active, #toc li:hover {
|
271
|
+
#toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
|
272
272
|
background: #4D7EA5;
|
273
273
|
box-shadow: inset -5px 0px 10px -5px #4D7EA5 !important; }
|
274
|
-
#toc .toc-active a, #toc li:hover a {
|
274
|
+
#toc .toc-active a, #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
|
275
275
|
color: #4D7EA5; }
|
276
276
|
@media print {
|
277
|
-
#toc .toc-active, #toc li:hover {
|
277
|
+
#toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
|
278
278
|
background: white;
|
279
279
|
box-shadow: none !important; }
|
280
|
-
#toc .toc-active a {
|
280
|
+
#toc .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
|
281
281
|
color: #4D7EA5; }
|
282
|
-
#toc li:hover a {
|
282
|
+
#toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
|
283
283
|
color: black; } }
|
284
284
|
@media screen and (max-width: 768px) {
|
285
|
-
#toc {
|
285
|
+
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
286
286
|
padding: 0 1.5em;
|
287
287
|
overflow: visible; } }
|
288
|
-
#toc .toc-active a {
|
288
|
+
#toc .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
|
289
289
|
color: white; }
|
290
|
-
#toc li a {
|
290
|
+
#toc li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li a {
|
291
291
|
text-transform: none; }
|
292
|
-
#toc ul a:hover {
|
292
|
+
#toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
|
293
293
|
box-shadow: none;
|
294
294
|
color: white; }
|
295
295
|
|
296
|
+
#toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
297
|
+
margin-top: 0;
|
298
|
+
margin-bottom: 0;
|
299
|
+
font-size: 100%; }
|
300
|
+
|
296
301
|
li {
|
297
302
|
margin-left: 1em;
|
298
303
|
list-style-position: outside; }
|
@@ -353,7 +358,7 @@ li {
|
|
353
358
|
display: none; }
|
354
359
|
h1.toc-contents {
|
355
360
|
margin-top: 1em; }
|
356
|
-
ul#toc-list {
|
361
|
+
ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
357
362
|
padding: 0;
|
358
363
|
margin: 0; } }
|
359
364
|
|
@@ -18,7 +18,7 @@ main {
|
|
18
18
|
margin: 0 3em 0 6em;
|
19
19
|
}
|
20
20
|
|
21
|
-
#toc {
|
21
|
+
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
22
22
|
@include toc(#4D7EA5, #4D7EA5, #4D7EA5);
|
23
23
|
@include sidebarToc();
|
24
24
|
|
@@ -38,6 +38,13 @@ main {
|
|
38
38
|
}
|
39
39
|
}
|
40
40
|
|
41
|
+
#toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
42
|
+
margin-top: 0;
|
43
|
+
margin-bottom: 0;
|
44
|
+
font-size: 100%;
|
45
|
+
}
|
46
|
+
|
47
|
+
|
41
48
|
li {
|
42
49
|
margin-left: 1em;
|
43
50
|
list-style-position: outside;
|
@@ -68,7 +75,7 @@ nav {
|
|
68
75
|
margin-top: 1em;
|
69
76
|
}
|
70
77
|
|
71
|
-
ul#toc-list {
|
78
|
+
ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
72
79
|
padding: 0;
|
73
80
|
margin: 0;
|
74
81
|
}
|
@@ -173,9 +173,11 @@
|
|
173
173
|
<data type="dateTime"/>
|
174
174
|
</attribute>
|
175
175
|
</optional>
|
176
|
-
<
|
177
|
-
<
|
178
|
-
|
176
|
+
<optional>
|
177
|
+
<attribute name="from">
|
178
|
+
<data type="IDREF"/>
|
179
|
+
</attribute>
|
180
|
+
</optional>
|
179
181
|
<optional>
|
180
182
|
<attribute name="to">
|
181
183
|
<data type="IDREF"/>
|
@@ -209,9 +209,6 @@
|
|
209
209
|
<zeroOrMore>
|
210
210
|
<ref name="contact"/>
|
211
211
|
</zeroOrMore>
|
212
|
-
<zeroOrMore>
|
213
|
-
<ref name="uri"/>
|
214
|
-
</zeroOrMore>
|
215
212
|
</element>
|
216
213
|
</define>
|
217
214
|
<define name="fullname">
|
@@ -401,9 +398,9 @@
|
|
401
398
|
<choice>
|
402
399
|
<!-- iso191606 TODO -->
|
403
400
|
<group>
|
404
|
-
<
|
401
|
+
<zeroOrMore>
|
405
402
|
<ref name="street"/>
|
406
|
-
</
|
403
|
+
</zeroOrMore>
|
407
404
|
<ref name="city"/>
|
408
405
|
<optional>
|
409
406
|
<ref name="state"/>
|
@@ -828,6 +825,11 @@
|
|
828
825
|
<optional>
|
829
826
|
<attribute name="scope"/>
|
830
827
|
</optional>
|
828
|
+
<optional>
|
829
|
+
<attribute name="primary">
|
830
|
+
<data type="boolean"/>
|
831
|
+
</attribute>
|
832
|
+
</optional>
|
831
833
|
<text/>
|
832
834
|
</element>
|
833
835
|
</define>
|
File without changes
|
@@ -9,9 +9,9 @@ require "isodoc/csa/presentation_xml_convert"
|
|
9
9
|
require "metanorma/csa"
|
10
10
|
require "fileutils"
|
11
11
|
|
12
|
-
module
|
12
|
+
module Metanorma
|
13
13
|
module Csa
|
14
|
-
class Converter < ::
|
14
|
+
class Converter < ::Metanorma::Generic::Converter
|
15
15
|
XML_ROOT_TAG = "csa-standard"
|
16
16
|
XML_NAMESPACE = "https://www.metanorma.org/ns/csa"
|
17
17
|
|
File without changes
|
@@ -32,6 +32,56 @@
|
|
32
32
|
<ref name="DocumentType"/>
|
33
33
|
</element>
|
34
34
|
</define>
|
35
|
+
<define name="index">
|
36
|
+
<element name="index">
|
37
|
+
<optional>
|
38
|
+
<attribute name="to">
|
39
|
+
<data type="IDREF"/>
|
40
|
+
</attribute>
|
41
|
+
</optional>
|
42
|
+
<element name="primary">
|
43
|
+
<oneOrMore>
|
44
|
+
<choice>
|
45
|
+
<ref name="PureTextElement"/>
|
46
|
+
<ref name="stem"/>
|
47
|
+
</choice>
|
48
|
+
</oneOrMore>
|
49
|
+
</element>
|
50
|
+
<optional>
|
51
|
+
<element name="secondary">
|
52
|
+
<oneOrMore>
|
53
|
+
<choice>
|
54
|
+
<ref name="PureTextElement"/>
|
55
|
+
<ref name="stem"/>
|
56
|
+
</choice>
|
57
|
+
</oneOrMore>
|
58
|
+
</element>
|
59
|
+
</optional>
|
60
|
+
<optional>
|
61
|
+
<element name="tertiary">
|
62
|
+
<oneOrMore>
|
63
|
+
<choice>
|
64
|
+
<ref name="PureTextElement"/>
|
65
|
+
<ref name="stem"/>
|
66
|
+
</choice>
|
67
|
+
</oneOrMore>
|
68
|
+
</element>
|
69
|
+
</optional>
|
70
|
+
</element>
|
71
|
+
</define>
|
72
|
+
<define name="bibitem">
|
73
|
+
<element name="bibitem">
|
74
|
+
<attribute name="id">
|
75
|
+
<data type="ID"/>
|
76
|
+
</attribute>
|
77
|
+
<optional>
|
78
|
+
<attribute name="hidden">
|
79
|
+
<data type="boolean"/>
|
80
|
+
</attribute>
|
81
|
+
</optional>
|
82
|
+
<ref name="BibliographicItem"/>
|
83
|
+
</element>
|
84
|
+
</define>
|
35
85
|
<define name="section-title">
|
36
86
|
<element name="title">
|
37
87
|
<zeroOrMore>
|
@@ -690,6 +740,7 @@
|
|
690
740
|
<ref name="terms"/>
|
691
741
|
<ref name="term-clause"/>
|
692
742
|
<ref name="definitions"/>
|
743
|
+
<ref name="floating-title"/>
|
693
744
|
</choice>
|
694
745
|
</oneOrMore>
|
695
746
|
</element>
|
@@ -1013,6 +1064,26 @@
|
|
1013
1064
|
</zeroOrMore>
|
1014
1065
|
</element>
|
1015
1066
|
</define>
|
1067
|
+
<define name="sub">
|
1068
|
+
<element name="sub">
|
1069
|
+
<zeroOrMore>
|
1070
|
+
<choice>
|
1071
|
+
<ref name="PureTextElement"/>
|
1072
|
+
<ref name="stem"/>
|
1073
|
+
</choice>
|
1074
|
+
</zeroOrMore>
|
1075
|
+
</element>
|
1076
|
+
</define>
|
1077
|
+
<define name="sup">
|
1078
|
+
<element name="sup">
|
1079
|
+
<zeroOrMore>
|
1080
|
+
<choice>
|
1081
|
+
<ref name="PureTextElement"/>
|
1082
|
+
<ref name="stem"/>
|
1083
|
+
</choice>
|
1084
|
+
</zeroOrMore>
|
1085
|
+
</element>
|
1086
|
+
</define>
|
1016
1087
|
<define name="pagebreak">
|
1017
1088
|
<element name="pagebreak">
|
1018
1089
|
<optional>
|
@@ -1680,6 +1751,7 @@
|
|
1680
1751
|
<ref name="clause-subsection"/>
|
1681
1752
|
<ref name="terms"/>
|
1682
1753
|
<ref name="definitions"/>
|
1754
|
+
<ref name="floating-title"/>
|
1683
1755
|
</choice>
|
1684
1756
|
</oneOrMore>
|
1685
1757
|
</choice>
|
@@ -1722,6 +1794,7 @@
|
|
1722
1794
|
<ref name="terms"/>
|
1723
1795
|
<ref name="definitions"/>
|
1724
1796
|
<ref name="references"/>
|
1797
|
+
<ref name="floating-title"/>
|
1725
1798
|
</choice>
|
1726
1799
|
</zeroOrMore>
|
1727
1800
|
</group>
|
@@ -2200,7 +2273,18 @@
|
|
2200
2273
|
<ref name="MultilingualRenderingType"/>
|
2201
2274
|
</attribute>
|
2202
2275
|
</optional>
|
2203
|
-
<
|
2276
|
+
<oneOrMore>
|
2277
|
+
<choice>
|
2278
|
+
<ref name="formula"/>
|
2279
|
+
<ref name="ul"/>
|
2280
|
+
<ref name="ol"/>
|
2281
|
+
<ref name="dl"/>
|
2282
|
+
<ref name="quote"/>
|
2283
|
+
<ref name="sourcecode"/>
|
2284
|
+
<ref name="paragraph"/>
|
2285
|
+
<ref name="figure"/>
|
2286
|
+
</choice>
|
2287
|
+
</oneOrMore>
|
2204
2288
|
</element>
|
2205
2289
|
</define>
|
2206
2290
|
<define name="termsource">
|
@@ -2534,4 +2618,17 @@
|
|
2534
2618
|
</oneOrMore>
|
2535
2619
|
</element>
|
2536
2620
|
</define>
|
2621
|
+
<define name="floating-title">
|
2622
|
+
<element name="floating-title">
|
2623
|
+
<attribute name="id">
|
2624
|
+
<data type="ID"/>
|
2625
|
+
</attribute>
|
2626
|
+
<attribute name="depth">
|
2627
|
+
<data type="int"/>
|
2628
|
+
</attribute>
|
2629
|
+
<zeroOrMore>
|
2630
|
+
<ref name="TextElement"/>
|
2631
|
+
</zeroOrMore>
|
2632
|
+
</element>
|
2633
|
+
</define>
|
2537
2634
|
</grammar>
|
File without changes
|
data/lib/metanorma-csa.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'asciidoctor' unless defined? Asciidoctor::Converter
|
2
|
-
require_relative '
|
2
|
+
require_relative 'metanorma/csa/converter'
|
3
3
|
require_relative 'isodoc/csa/html_convert'
|
4
4
|
require_relative 'isodoc/csa/pdf_convert'
|
5
5
|
require_relative 'isodoc/csa/word_convert'
|
data/metanorma-csa.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
30
30
|
|
31
|
-
spec.add_dependency "metanorma-generic", "~>
|
31
|
+
spec.add_dependency "metanorma-generic", "~> 2.0.0"
|
32
32
|
|
33
33
|
spec.add_development_dependency "debug"
|
34
34
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
data/metanorma.yml
CHANGED
@@ -6,7 +6,7 @@ xml_root_tag: csa-standard
|
|
6
6
|
html_bodyfont: 'Lato,"Source Sans Pro",sans-serif'
|
7
7
|
html_headerfont: 'Lato,"Source Sans Pro",sans-serif'
|
8
8
|
html_monospacefont: '"Source Code Pro",monospace'
|
9
|
-
validate_rng_file: lib/
|
9
|
+
validate_rng_file: lib/metanorma/csa/csa.rng
|
10
10
|
htmlcoverpage: lib/isodoc/csa/html/html_csa_titlepage.html
|
11
11
|
htmlintropage: lib/isodoc/csa/html/html_csa_intro.html
|
12
12
|
htmlstylesheet: lib/isodoc/csa/html/htmlstyle.scss
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-csa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.3
|
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: 2022-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.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:
|
26
|
+
version: 2.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,14 +188,6 @@ files:
|
|
188
188
|
- bin/console
|
189
189
|
- bin/rspec
|
190
190
|
- bin/setup
|
191
|
-
- lib/asciidoctor/csa.rb
|
192
|
-
- lib/asciidoctor/csa/basicdoc.rng
|
193
|
-
- lib/asciidoctor/csa/biblio.rng
|
194
|
-
- lib/asciidoctor/csa/boilerplate.xml
|
195
|
-
- lib/asciidoctor/csa/converter.rb
|
196
|
-
- lib/asciidoctor/csa/csa.rng
|
197
|
-
- lib/asciidoctor/csa/isodoc.rng
|
198
|
-
- lib/asciidoctor/csa/reqt.rng
|
199
191
|
- lib/isodoc/csa/base_convert.rb
|
200
192
|
- lib/isodoc/csa/csa.standard.xsl
|
201
193
|
- lib/isodoc/csa/html/csa-logo-white.png
|
@@ -225,7 +217,14 @@ files:
|
|
225
217
|
- lib/isodoc/csa/xref.rb
|
226
218
|
- lib/metanorma-csa.rb
|
227
219
|
- lib/metanorma/csa.rb
|
220
|
+
- lib/metanorma/csa/basicdoc.rng
|
221
|
+
- lib/metanorma/csa/biblio.rng
|
222
|
+
- lib/metanorma/csa/boilerplate.xml
|
223
|
+
- lib/metanorma/csa/converter.rb
|
224
|
+
- lib/metanorma/csa/csa.rng
|
225
|
+
- lib/metanorma/csa/isodoc.rng
|
228
226
|
- lib/metanorma/csa/processor.rb
|
227
|
+
- lib/metanorma/csa/reqt.rng
|
229
228
|
- lib/metanorma/csa/version.rb
|
230
229
|
- metanorma-csa.gemspec
|
231
230
|
- metanorma.yml
|