metanorma-generic 1.10.4 → 1.11.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,6 +58,14 @@
58
58
  <optional>
59
59
  <attribute name="type"/>
60
60
  </optional>
61
+ <optional>
62
+ <attribute name="tag"/>
63
+ </optional>
64
+ <optional>
65
+ <attribute name="multilingual-rendering">
66
+ <ref name="MultilingualRenderingType"/>
67
+ </attribute>
68
+ </optional>
61
69
  <optional>
62
70
  <ref name="reqtitle"/>
63
71
  </optional>
@@ -101,7 +109,9 @@
101
109
  </define>
102
110
  <define name="label">
103
111
  <element name="label">
104
- <text/>
112
+ <oneOrMore>
113
+ <ref name="TextElement"/>
114
+ </oneOrMore>
105
115
  </element>
106
116
  </define>
107
117
  <define name="subject">
@@ -175,8 +185,19 @@
175
185
  <data type="boolean"/>
176
186
  </attribute>
177
187
  </optional>
188
+ <optional>
189
+ <attribute name="tag"/>
190
+ </optional>
191
+ <optional>
192
+ <attribute name="multilingual-rendering">
193
+ <ref name="MultilingualRenderingType"/>
194
+ </attribute>
195
+ </optional>
178
196
  <oneOrMore>
179
- <ref name="BasicBlock"/>
197
+ <choice>
198
+ <ref name="BasicBlock"/>
199
+ <ref name="component"/>
200
+ </choice>
180
201
  </oneOrMore>
181
202
  </define>
182
203
  <define name="ObligationType">
@@ -12,14 +12,15 @@ module IsoDoc
12
12
  def term_cleanup(docxml)
13
13
  docxml.xpath("//p[@class = 'Terms']").each do |d|
14
14
  h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
15
- h2.add_child("&nbsp;")
16
- h2.add_child(d.remove)
15
+ d["id"] = h2["id"]
16
+ d.children.first.previous =
17
+ "<strong>#{h2.remove.children.to_xml}</strong>&nbsp;"
17
18
  end
18
19
  docxml
19
20
  end
20
21
 
21
22
  def make_body(xml, docxml)
22
- body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72",
23
+ body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72",
23
24
  "xml:lang": "EN-US", class: "container" }
24
25
  xml.body **body_attr do |body|
25
26
  make_body1(body, docxml)
@@ -296,7 +296,6 @@ p.Terms, li.Terms, div.Terms
296
296
  mso-fareast-font-family:$headerfont;
297
297
  mso-bidi-font-family:$headerfont;
298
298
  mso-ansi-language:EN-GB;
299
- font-weight:bold;
300
299
  mso-bidi-font-weight:normal;}
301
300
  p.AltTerms, li.AltTerms, div.AltTerms
302
301
  {mso-style-name:"AltTerm\(s\)";
@@ -186,7 +186,7 @@ p.document-stage {
186
186
  3.1 Titles
187
187
  */
188
188
 
189
- h1,h2,h3,h4,h5,h6 {
189
+ h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 {
190
190
  font-family: $headerfont;
191
191
  color: #1661AD;
192
192
  font-weight: 300;
@@ -194,31 +194,34 @@ h1,h2,h3,h4,h5,h6 {
194
194
  margin-bottom: 0.3em;
195
195
  }
196
196
 
197
- h1 {
197
+ h1,.h1 {
198
198
  font-size: 1.6em;
199
199
  text-transform: uppercase;
200
200
  margin-top: 2em;
201
201
  }
202
202
 
203
- h1#content {
203
+ h1#content, .h1#content {
204
204
  margin-top: 2em;
205
205
  }
206
206
 
207
- h2 {
207
+ h2,.h2 {
208
208
  margin-top: 1.3em;
209
209
  font-size: 1.3em;
210
210
  font-weight: 400;
211
211
  }
212
212
 
213
- h3 {
213
+ h3,.h3 {
214
214
  margin-top: 1.1em;
215
215
  font-size: 1.1em;
216
216
  font-weight: 100;
217
217
  }
218
218
 
219
+ .TermNum {
220
+ font-weight: 100;
221
+ }
222
+
219
223
  .TermNum, .Terms, .AltTerms {
220
224
  color: #1661AD;
221
- font-weight: 100;
222
225
  }
223
226
 
224
227
  h2.TermNum {
@@ -637,7 +640,7 @@ To top button
637
640
  page-break-after: always;
638
641
  }
639
642
 
640
- h1, h2, h3, h4 {
643
+ h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
641
644
  page-break-after: avoid;
642
645
  margin-top: 1.2em;
643
646
  }
@@ -672,21 +675,21 @@ To top button
672
675
  padding-left: 0;
673
676
  }
674
677
 
675
- h1.content {
678
+ h1.content, .h1.content {
676
679
  margin-top: 2em;
677
680
  line-height: 2.5em;
678
681
  }
679
682
 
680
- h1 {
683
+ h1,.h1 {
681
684
  font-size: 1.5em;
682
685
  line-height: 1.5;
683
686
  }
684
687
 
685
- h2 {
688
+ h2,.h2 {
686
689
  font-size: 1.2em
687
690
  }
688
691
 
689
- h3 {
692
+ h3,.h3 {
690
693
  font-size: 1em;
691
694
  }
692
695
 
@@ -16,7 +16,6 @@ $('#toggle').on('click', function(){
16
16
  else {
17
17
  $('nav').show();
18
18
  $('nav').animate({ 'left': '0px' }, 'slow');
19
- $('.container').animate({ 'padding-left': '360px' }, 'slow');
20
19
  }
21
20
  });
22
21
  </script>
@@ -338,7 +338,7 @@ div.figure, p.figure
338
338
  {text-align: center;}
339
339
 
340
340
 
341
- h1
341
+ h1,.h1
342
342
  {mso-style-priority:1;
343
343
  mso-style-unhide:no;
344
344
  mso-style-qformat:yes;
@@ -352,8 +352,6 @@ h1
352
352
  line-height:13.5pt;
353
353
  mso-pagination:widow-orphan;
354
354
  page-break-after:avoid;
355
- mso-outline-level:1;
356
- mso-list:l1 level1 lfo6;
357
355
  mso-hyphenate:none;
358
356
  tab-stops:20.0pt list 21.6pt left 28.0pt;
359
357
  font-size:13.0pt;
@@ -365,6 +363,10 @@ h1
365
363
  mso-ansi-language:EN-GB;
366
364
  mso-fareast-language:JA;
367
365
  mso-bidi-font-weight:normal;}
366
+ h1 {
367
+ mso-outline-level:1;
368
+ mso-list:l1 level1 lfo6;
369
+ }
368
370
  h1.Annex
369
371
  {mso-style-priority:1;
370
372
  mso-style-unhide:no;
@@ -421,7 +423,7 @@ h1.Annex
421
423
  mso-ansi-language:EN-GB;
422
424
  mso-fareast-language:JA;
423
425
  mso-bidi-font-weight:normal;}
424
- h2
426
+ h2, .h2
425
427
  {mso-style-priority:2;
426
428
  mso-style-unhide:no;
427
429
  mso-style-qformat:yes;
@@ -436,8 +438,6 @@ h2
436
438
  line-height:12.5pt;
437
439
  mso-pagination:widow-orphan;
438
440
  page-break-after:avoid;
439
- mso-outline-level:2;
440
- mso-list:l1 level2 lfo6;
441
441
  mso-hyphenate:none;
442
442
  tab-stops:27.0pt 35.0pt;
443
443
  font-size:12.0pt;
@@ -448,7 +448,11 @@ h2
448
448
  mso-ansi-language:EN-GB;
449
449
  mso-fareast-language:JA;
450
450
  mso-bidi-font-weight:normal;}
451
- h3
451
+ h2 {
452
+ mso-outline-level:2;
453
+ mso-list:l1 level2 lfo6;
454
+ }
455
+ h3, .h3
452
456
  {mso-style-priority:3;
453
457
  mso-style-unhide:no;
454
458
  mso-style-qformat:yes;
@@ -463,8 +467,6 @@ h3
463
467
  line-height:12.0pt;
464
468
  mso-pagination:widow-orphan;
465
469
  page-break-after:avoid;
466
- mso-outline-level:3;
467
- mso-list:l1 level3 lfo6;
468
470
  mso-hyphenate:none;
469
471
  tab-stops:list 36.0pt left 44.0pt;
470
472
  font-size:11.0pt;
@@ -474,7 +476,11 @@ h3
474
476
  mso-ansi-language:EN-GB;
475
477
  mso-fareast-language:JA;
476
478
  mso-bidi-font-weight:normal;}
477
- h4
479
+ h3 {
480
+ mso-outline-level:3;
481
+ mso-list:l1 level3 lfo6;
482
+ }
483
+ h4, .h4
478
484
  {mso-style-priority:4;
479
485
  mso-style-unhide:no;
480
486
  mso-style-qformat:yes;
@@ -489,8 +495,6 @@ h4
489
495
  line-height:12.0pt;
490
496
  mso-pagination:widow-orphan;
491
497
  page-break-after:avoid;
492
- mso-outline-level:4;
493
- mso-list:l1 level4 lfo6;
494
498
  mso-hyphenate:none;
495
499
  tab-stops:51.05pt 57.0pt 68.0pt;
496
500
  font-size:11.0pt;
@@ -500,7 +504,11 @@ h4
500
504
  mso-ansi-language:EN-GB;
501
505
  mso-fareast-language:JA;
502
506
  mso-bidi-font-weight:normal;}
503
- h5
507
+ h4 {
508
+ mso-outline-level:4;
509
+ mso-list:l1 level4 lfo6;
510
+ }
511
+ h5, .h5
504
512
  {mso-style-priority:5;
505
513
  mso-style-unhide:no;
506
514
  mso-style-qformat:yes;
@@ -515,8 +523,6 @@ h5
515
523
  line-height:12.0pt;
516
524
  mso-pagination:widow-orphan;
517
525
  page-break-after:avoid;
518
- mso-outline-level:5;
519
- mso-list:l1 level5 lfo6;
520
526
  mso-hyphenate:none;
521
527
  tab-stops:51.05pt list 54.0pt;
522
528
  font-size:11.0pt;
@@ -526,7 +532,11 @@ h5
526
532
  mso-ansi-language:EN-GB;
527
533
  mso-fareast-language:JA;
528
534
  mso-bidi-font-weight:normal;}
529
- h6
535
+ h5 {
536
+ mso-outline-level:5;
537
+ mso-list:l1 level5 lfo6;
538
+ }
539
+ h6, .h6
530
540
  {mso-style-priority:6;
531
541
  mso-style-unhide:no;
532
542
  mso-style-qformat:yes;
@@ -541,8 +551,6 @@ h6
541
551
  line-height:12.0pt;
542
552
  mso-pagination:widow-orphan;
543
553
  page-break-after:avoid;
544
- mso-outline-level:6;
545
- mso-list:l1 level6 lfo6;
546
554
  mso-hyphenate:none;
547
555
  tab-stops:51.05pt list 72.0pt;
548
556
  font-size:11.0pt;
@@ -552,6 +560,10 @@ h6
552
560
  mso-ansi-language:EN-GB;
553
561
  mso-fareast-language:JA;
554
562
  mso-bidi-font-weight:normal;}
563
+ h6 {
564
+ mso-outline-level:6;
565
+ mso-list:l1 level6 lfo6;
566
+ }
555
567
  p.MsoToc1, li.MsoToc1, div.MsoToc1
556
568
  {mso-style-priority:39;
557
569
  mso-style-unhide:no;
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Generic
3
- VERSION = "1.10.4".freeze
3
+ VERSION = "1.11.3".freeze
4
4
  end
5
5
  end
@@ -4,7 +4,7 @@ require "forwardable"
4
4
  require "yaml"
5
5
 
6
6
  module Metanorma
7
- module Generic
7
+ module Generic # rubocop:disable Style/MutableConstant
8
8
  ORGANIZATION_NAME_SHORT = "Acme"
9
9
  ORGANIZATION_NAME_LONG = "Acme Corp."
10
10
  DOCUMENT_NAMESPACE = "https://www.metanorma.org/ns/generic"
@@ -63,23 +63,10 @@ module Metanorma
63
63
  ].freeze
64
64
 
65
65
  def filepath_attrs
66
- %i[
67
- i18nyaml
68
- boilerplate
69
- logo_path
70
- logo_paths
71
- header
72
- htmlcoverpage
73
- htmlintropage
74
- htmlstylesheet
75
- scripts
76
- scripts_pdf
77
- standardstylesheet
78
- validate_rng_file
79
- wordcoverpage
80
- wordintropage
81
- wordstylesheet
82
- ]
66
+ %i[i18nyaml boilerplate logo_path logo_paths header
67
+ htmlcoverpage htmlintropage htmlstylesheet scripts scripts_pdf
68
+ standardstylesheet validate_rng_file wordcoverpage wordintropage
69
+ wordstylesheet]
83
70
  end
84
71
 
85
72
  attr_accessor(*CONFIG_ATTRS)
@@ -88,7 +75,7 @@ module Metanorma
88
75
  attr_accessor :_file
89
76
  end
90
77
 
91
- def self.inherited(klass)
78
+ def self.inherited(klass) # rubocop:disable Lint/MissingSuper
92
79
  klass._file = caller_locations(1..1).first.absolute_path
93
80
  end
94
81
 
@@ -115,7 +102,8 @@ module Metanorma
115
102
 
116
103
  def set_default_values_from_yaml_file(config_file)
117
104
  root_path = File.dirname(self.class::_file || __FILE__)
118
- default_config_options = YAML.load(File.read(config_file))
105
+ default_config_options =
106
+ YAML.safe_load(File.read(config_file, encoding: "UTF-8"))
119
107
  if default_config_options["doctypes"].is_a? Array
120
108
  default_config_options["doctypes"] =
121
109
  default_config_options["doctypes"].each_with_object({}) do |k, m|
@@ -133,7 +121,7 @@ module Metanorma
133
121
  end
134
122
 
135
123
  def blank?(val)
136
- val.nil? || val.respond_to?(:empty?) && val.empty?
124
+ val.nil? || (val.respond_to?(:empty?) && val.empty?)
137
125
  end
138
126
 
139
127
  def absolute_path(value, root_path)
@@ -27,11 +27,10 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
28
28
 
29
29
  spec.add_dependency "htmlentities", "~> 4.3.4"
30
- spec.add_dependency "isodoc", "~> 1.7.0"
31
- spec.add_dependency "metanorma-standoc", "~> 1.10.0"
30
+ spec.add_dependency "metanorma-standoc", "~> 1.11.0"
32
31
  spec.add_dependency "ruby-jing"
33
32
 
34
- spec.add_development_dependency "byebug", "~> 9.1"
33
+ spec.add_development_dependency "debug"
35
34
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
36
35
  spec.add_development_dependency "guard", "~> 2.14"
37
36
  spec.add_development_dependency "guard-rspec", "~> 4.7"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-generic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.4
4
+ version: 1.11.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: 2021-09-13 00:00:00.000000000 Z
11
+ date: 2021-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -24,34 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.3.4
27
- - !ruby/object:Gem::Dependency
28
- name: isodoc
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 1.7.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.7.0
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: metanorma-standoc
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: 1.10.0
33
+ version: 1.11.0
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: 1.10.0
40
+ version: 1.11.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: ruby-jing
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -67,19 +53,19 @@ dependencies:
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
- name: byebug
56
+ name: debug
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - "~>"
59
+ - - ">="
74
60
  - !ruby/object:Gem::Version
75
- version: '9.1'
61
+ version: '0'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - "~>"
66
+ - - ">="
81
67
  - !ruby/object:Gem::Version
82
- version: '9.1'
68
+ version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: equivalent-xml
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -281,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
267
  - !ruby/object:Gem::Version
282
268
  version: '0'
283
269
  requirements: []
284
- rubygems_version: 3.1.4
270
+ rubygems_version: 3.2.32
285
271
  signing_key:
286
272
  specification_version: 4
287
273
  summary: Metanorma template gem for customisation.