metanorma-acme 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.rubocop.yml ADDED
@@ -0,0 +1,15 @@
1
+ # This project follows the Ribose OSS style guide.
2
+ # https://github.com/riboseinc/oss-guides
3
+ # All project-specific additions and overrides should be specified in this file.
4
+
5
+ inherit_from:
6
+ # Thoughtbot's style guide from: https://github.com/thoughtbot/guides
7
+ - ".rubocop.tb.yml"
8
+ # Overrides from Ribose
9
+ - ".rubocop.ribose.yml"
10
+ AllCops:
11
+ DisplayCopNames: false
12
+ StyleGuideCopsOnly: false
13
+ TargetRubyVersion: 2.5
14
+ Rails:
15
+ Enabled: true
data/.travis.yml CHANGED
@@ -7,7 +7,7 @@ rvm:
7
7
  - 2.3
8
8
  - ruby-head
9
9
  before_install:
10
- - gem install bundler
10
+ - gem install bundler -v 1.16.1
11
11
  - unset _JAVA_OPTIONS
12
12
  matrix:
13
13
  allow_failures:
data/README.adoc CHANGED
@@ -12,7 +12,8 @@ It has been created as an exemplar for generating new instances of Metanorma gem
12
12
  You can customise output of this gem for your own purposes without needing to customise the gem fully. You can use the
13
13
  following asciidoctor document variables to set the stylesheets that are passed as arguments to the `isodoc` gem:
14
14
 
15
- ````
15
+ [source,asciidoc]
16
+ ----
16
17
  :body-font: (name of the main font to be used)
17
18
  :header-font: (name of the header font to be used)
18
19
  :monospace-font: (name of the monospace font to be used)
@@ -27,7 +28,7 @@ following asciidoctor document variables to set the stylesheets that are passed
27
28
  :wordintropage: (intro page for Word)
28
29
  :ulstyle: (list style selector for unordered lists for Word)
29
30
  :olstyle: (list style selector for ordered lists for Word)
30
- ````
31
+ ----
31
32
 
32
33
  You should run the gem through the https://github.com/riboseinc/metanorma-cli[Metanorma CLI]:
33
34
 
@@ -7,7 +7,7 @@
7
7
  -->
8
8
  <include href="isostandard.rng">
9
9
  <start>
10
- <ref name="acme-standard"/>
10
+ <ref name="rsd-standard"/>
11
11
  </start>
12
12
  <define name="language">
13
13
  <element name="language">
@@ -16,6 +16,9 @@
16
16
  </define>
17
17
  <define name="docidentifier">
18
18
  <element name="docidentifier">
19
+ <optional>
20
+ <attribute name="type"/>
21
+ </optional>
19
22
  <text/>
20
23
  </element>
21
24
  </define>
@@ -29,30 +32,38 @@
29
32
  <attribute name="id">
30
33
  <data type="ID"/>
31
34
  </attribute>
32
- <optional>
33
- <ref name="source"/>
34
- </optional>
35
35
  <optional>
36
36
  <ref name="tname"/>
37
37
  </optional>
38
38
  <choice>
39
+ <ref name="image"/>
40
+ <ref name="pre"/>
39
41
  <oneOrMore>
40
- <ref name="figure"/>
42
+ <ref name="subfigure"/>
41
43
  </oneOrMore>
42
- <group>
43
- <choice>
44
- <zeroOrMore>
45
- <ref name="TextElement"/>
46
- </zeroOrMore>
47
- <ref name="pre"/>
48
- </choice>
49
- <zeroOrMore>
50
- <ref name="note"/>
51
- </zeroOrMore>
52
- <optional>
53
- <ref name="dl"/>
54
- </optional>
55
- </group>
44
+ </choice>
45
+ <zeroOrMore>
46
+ <ref name="fn"/>
47
+ </zeroOrMore>
48
+ <optional>
49
+ <ref name="dl"/>
50
+ </optional>
51
+ <zeroOrMore>
52
+ <ref name="note"/>
53
+ </zeroOrMore>
54
+ </element>
55
+ </define>
56
+ <define name="subfigure">
57
+ <element name="figure">
58
+ <attribute name="id">
59
+ <data type="ID"/>
60
+ </attribute>
61
+ <optional>
62
+ <ref name="tname"/>
63
+ </optional>
64
+ <choice>
65
+ <ref name="image"/>
66
+ <ref name="pre"/>
56
67
  </choice>
57
68
  </element>
58
69
  </define>
@@ -106,7 +117,9 @@
106
117
  </define>
107
118
  <define name="editorialgroup">
108
119
  <element name="editorialgroup">
109
- <ref name="committee"/>
120
+ <oneOrMore>
121
+ <ref name="committee"/>
122
+ </oneOrMore>
110
123
  </element>
111
124
  </define>
112
125
  <define name="BibData">
@@ -190,8 +203,8 @@
190
203
  <text/>
191
204
  </element>
192
205
  </define>
193
- <define name="acme-standard">
194
- <element name="acme-standard">
206
+ <define name="rsd-standard">
207
+ <element name="rsd-standard">
195
208
  <ref name="bibdata"/>
196
209
  <optional>
197
210
  <ref name="version"/>
@@ -259,6 +259,9 @@
259
259
  </define>
260
260
  <define name="uri">
261
261
  <element name="uri">
262
+ <optional>
263
+ <attribute name="type"/>
264
+ </optional>
262
265
  <data type="anyURI"/>
263
266
  </element>
264
267
  </define>
@@ -411,6 +414,20 @@
411
414
  <ref name="BibliographicItem"/>
412
415
  </element>
413
416
  </define>
417
+ <define name="relaton_collection">
418
+ <element name="relaton-collection">
419
+ <optional>
420
+ <attribute name="type"/>
421
+ </optional>
422
+ <ref name="btitle"/>
423
+ <zeroOrMore>
424
+ <ref name="contributor"/>
425
+ </zeroOrMore>
426
+ <zeroOrMore>
427
+ <ref name="docrelation"/>
428
+ </zeroOrMore>
429
+ </element>
430
+ </define>
414
431
  <define name="BibItemType" combine="choice">
415
432
  <choice>
416
433
  <value>article</value>
@@ -444,6 +461,9 @@
444
461
  <ref name="BibItemType"/>
445
462
  </attribute>
446
463
  </optional>
464
+ <optional>
465
+ <ref name="fetched"/>
466
+ </optional>
447
467
  <choice>
448
468
  <oneOrMore>
449
469
  <ref name="btitle"/>
@@ -523,6 +543,14 @@
523
543
  <ref name="FormattedString"/>
524
544
  </element>
525
545
  </define>
546
+ <define name="fetched">
547
+ <element name="fetched">
548
+ <choice>
549
+ <data type="dateTime"/>
550
+ <data type="date"/>
551
+ </choice>
552
+ </element>
553
+ </define>
526
554
  <define name="validity">
527
555
  <element name="validity">
528
556
  <optional>
@@ -538,17 +566,26 @@
538
566
  </define>
539
567
  <define name="validityBegins">
540
568
  <element name="validityBegins">
541
- <data type="dateTime"/>
569
+ <choice>
570
+ <data type="dateTime"/>
571
+ <data type="date"/>
572
+ </choice>
542
573
  </element>
543
574
  </define>
544
575
  <define name="validityEnds">
545
576
  <element name="validityEnds">
546
- <data type="dateTime"/>
577
+ <choice>
578
+ <data type="dateTime"/>
579
+ <data type="date"/>
580
+ </choice>
547
581
  </element>
548
582
  </define>
549
583
  <define name="validityRevision">
550
584
  <element name="revision">
551
- <data type="dateTime"/>
585
+ <choice>
586
+ <data type="dateTime"/>
587
+ <data type="date"/>
588
+ </choice>
552
589
  </element>
553
590
  </define>
554
591
  <define name="TypedTitleString">
@@ -599,6 +636,7 @@
599
636
  <value>issued</value>
600
637
  <value>transmitted</value>
601
638
  <value>copied</value>
639
+ <value>unchanged</value>
602
640
  </choice>
603
641
  </attribute>
604
642
  <choice>
@@ -732,6 +770,7 @@
732
770
  <element name="from">
733
771
  <choice>
734
772
  <data type="dateTime"/>
773
+ <data type="date"/>
735
774
  <data type="gYear"/>
736
775
  </choice>
737
776
  </element>
@@ -740,6 +779,7 @@
740
779
  <element name="to">
741
780
  <choice>
742
781
  <data type="dateTime"/>
782
+ <data type="date"/>
743
783
  <data type="gYear"/>
744
784
  </choice>
745
785
  </element>
@@ -1,5 +1,6 @@
1
1
  require "asciidoctor"
2
2
  require "asciidoctor/standoc/converter"
3
+ require "fileutils"
3
4
 
4
5
  module Asciidoctor
5
6
  module Acme
@@ -33,6 +34,12 @@ module Asciidoctor
33
34
  xml.editorialgroup do |a|
34
35
  a.committee node.attr("committee"),
35
36
  **attr_code(type: node.attr("committee-type"))
37
+ i = 2
38
+ while node.attr("committee_#{i}") do
39
+ a.committee node.attr("committee_#{i}"),
40
+ **attr_code(type: node.attr("committee-type_#{i}"))
41
+ i += 1
42
+ end
36
43
  end
37
44
  end
38
45
 
@@ -119,7 +126,7 @@ module Asciidoctor
119
126
  word_converter(node).convert filename unless node.attr("nodoc")
120
127
  pdf_convert(filename.sub(/\.xml$/, "")) unless node.attr("nodoc")
121
128
  end
122
- @files_to_delete.each { |f| system "rm #{f}" }
129
+ @files_to_delete.each { |f| FileUtils.rm f }
123
130
  ret
124
131
  end
125
132
 
@@ -69,6 +69,9 @@
69
69
  <ref name="BibItemType"/>
70
70
  </attribute>
71
71
  </optional>
72
+ <optional>
73
+ <ref name="fetched"/>
74
+ </optional>
72
75
  <choice>
73
76
  <oneOrMore>
74
77
  <ref name="btitle"/>
@@ -788,13 +791,15 @@
788
791
  </define>
789
792
  <define name="editorialgroup">
790
793
  <element name="editorialgroup">
791
- <ref name="technical-committee"/>
792
- <optional>
794
+ <oneOrMore>
795
+ <ref name="technical-committee"/>
796
+ </oneOrMore>
797
+ <zeroOrMore>
793
798
  <ref name="subcommittee"/>
794
- </optional>
795
- <optional>
799
+ </zeroOrMore>
800
+ <zeroOrMore>
796
801
  <ref name="workgroup"/>
797
- </optional>
802
+ </zeroOrMore>
798
803
  <optional>
799
804
  <ref name="secretariat"/>
800
805
  </optional>
@@ -535,6 +535,8 @@ table.MsoISOTable
535
535
  mso-yfti-tbllook:480;
536
536
  mso-border-insideh:.75pt solid windowtext;
537
537
  mso-border-insidev:.75pt solid windowtext;
538
+ mso-table-bspace:12.0pt;
539
+ mso-table-anchor-vertical:paragraph;
538
540
  font-size:10.0pt;
539
541
  font-family:$bodyfont;}
540
542
  table.MsoISOTable tr
@@ -561,6 +563,8 @@ table.MsoTableGrid
561
563
  mso-para-margin:0cm;
562
564
  mso-para-margin-bottom:.0001pt;
563
565
  mso-pagination:widow-orphan;
566
+ mso-table-bspace:12.0pt;
567
+ mso-table-anchor-vertical:paragraph;
564
568
  font-size:10.0pt;
565
569
  font-family:$bodyfont;}
566
570
  td { page-break-inside:avoid; }
@@ -611,12 +615,21 @@ div.example {
611
615
  margin-left:70.9pt;
612
616
  text-indent:-70.9pt;
613
617
  }
614
- p.example, li.example, div.example, td.example, td.example p
618
+ p.example, li.example, div.example, td.example
615
619
  { margin:0in;
616
620
  margin-bottom:.0001pt;
617
621
  mso-pagination:none;
618
622
  font-size:10.0pt;
619
623
  font-family:$bodyfont;}
624
+
625
+ table.example {
626
+ margin-bottom:12pt;
627
+ }
628
+
629
+ td.example p.MsoListParagraph {
630
+ font-size: 10.0pt;
631
+ }
632
+
620
633
  span.note_label, span.example_label, td.example_label, td.note_label
621
634
  {
622
635
  font-size: 10.0pt;
@@ -208,7 +208,12 @@ table {
208
208
  }
209
209
  }
210
210
 
211
-
211
+ @media screen {
212
+ img {
213
+ width: 100%;
214
+ height: auto;
215
+ }
216
+ }
212
217
 
213
218
  #toc ul {
214
219
  margin: 0;
@@ -517,7 +522,7 @@ p.document-stage {
517
522
  margin-left: -1.2em;
518
523
  }
519
524
 
520
- ul li p {
525
+ ul li p:first-child {
521
526
  display: inline;
522
527
  }
523
528
 
@@ -76,6 +76,66 @@ p.MsoNormal, li.MsoNormal, div.MsoNormal
76
76
  mso-fareast-font-family:"Times New Roman";
77
77
  mso-ansi-language:EN-US;
78
78
  mso-fareast-language:EN-US;}
79
+ p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
80
+ {mso-style-priority:34;
81
+ mso-style-unhide:no;
82
+ mso-style-qformat:yes;
83
+ margin-top:0cm;
84
+ margin-right:0cm;
85
+ margin-bottom:12.0pt;
86
+ /* do not put in margin-left, it is specific to list level */
87
+ mso-add-space:auto;
88
+ mso-pagination:widow-orphan;
89
+ font-size:10.5pt;
90
+ font-family:$bodyfont;
91
+ mso-ansi-language:EN-AU;
92
+ mso-fareast-language:EN-US;}
93
+ p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
94
+ {mso-style-priority:34;
95
+ mso-style-unhide:no;
96
+ mso-style-qformat:yes;
97
+ mso-style-type:export-only;
98
+ margin-top:0cm;
99
+ margin-right:0cm;
100
+ margin-bottom:12.0pt;
101
+ /* do not put in margin-left, it is specific to list level */
102
+ mso-add-space:auto;
103
+ mso-pagination:widow-orphan;
104
+ font-size:10.5pt;
105
+ font-family:$bodyfont;
106
+ mso-ansi-language:EN-AU;
107
+ mso-fareast-language:EN-US;}
108
+ p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
109
+ {mso-style-priority:34;
110
+ mso-style-unhide:no;
111
+ mso-style-qformat:yes;
112
+ mso-style-type:export-only;
113
+ margin-top:0cm;
114
+ margin-right:0cm;
115
+ margin-bottom:12.0pt;
116
+ /* do not put in margin-left, it is specific to list level */
117
+ mso-add-space:auto;
118
+ mso-pagination:widow-orphan;
119
+ font-size:10.5pt;
120
+ font-family:$bodyfont;
121
+ mso-ansi-language:EN-AU;
122
+ mso-fareast-language:EN-US;}
123
+ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
124
+ {mso-style-priority:34;
125
+ mso-style-unhide:no;
126
+ mso-style-qformat:yes;
127
+ mso-style-type:export-only;
128
+ margin-top:0cm;
129
+ margin-right:0cm;
130
+ margin-bottom:12.0pt;
131
+ /* do not put in margin-left, it is specific to list level */
132
+ mso-add-space:auto;
133
+ mso-pagination:widow-orphan;
134
+ font-size:10.5pt;
135
+ font-family:$bodyfont;
136
+ mso-ansi-language:EN-AU;
137
+ mso-fareast-language:EN-US;}
138
+
79
139
  p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
80
140
  {mso-style-noshow:yes;
81
141
  mso-style-unhide:no;
@@ -216,19 +276,6 @@ a:visited, span.MsoHyperlinkFollowed
216
276
  color:purple;
217
277
  text-decoration:underline;
218
278
  text-underline:single;}
219
- p
220
- {mso-style-priority:99;
221
- mso-margin-top-alt:auto;
222
- margin-right:0cm;
223
- mso-margin-bottom-alt:auto;
224
- margin-left:0cm;
225
- mso-pagination:widow-orphan;
226
- font-size:10.0pt;
227
- font-family:$bodyfont;
228
- mso-fareast-font-family:"MS Mincho";
229
- mso-bidi-font-family:"Times New Roman";
230
- mso-ansi-language:EN-US;
231
- mso-fareast-language:EN-US;}
232
279
  p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
233
280
  {mso-style-noshow:yes;
234
281
  mso-style-unhide:no;
@@ -254,75 +301,6 @@ p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
254
301
  mso-fareast-font-family:"Times New Roman";
255
302
  mso-ansi-language:EN-US;
256
303
  mso-fareast-language:EN-US;}
257
- p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
258
- {mso-style-priority:34;
259
- mso-style-unhide:no;
260
- mso-style-qformat:yes;
261
- margin-top:0cm;
262
- margin-right:0cm;
263
- margin-bottom:12.0pt;
264
- margin-left:36.0pt;
265
- mso-add-space:auto;
266
- mso-pagination:widow-orphan;
267
- font-size:10.5pt;
268
- mso-bidi-font-size:11.0pt;
269
- font-family:"Arial",sans-serif;
270
- mso-fareast-font-family:"Times New Roman";
271
- mso-ansi-language:EN-US;
272
- mso-fareast-language:EN-US;}
273
- p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
274
- {mso-style-priority:34;
275
- mso-style-unhide:no;
276
- mso-style-qformat:yes;
277
- mso-style-type:export-only;
278
- margin-top:0cm;
279
- margin-right:0cm;
280
- margin-bottom:0cm;
281
- margin-left:36.0pt;
282
- margin-bottom:.0001pt;
283
- mso-add-space:auto;
284
- mso-pagination:widow-orphan;
285
- font-size:10.5pt;
286
- mso-bidi-font-size:11.0pt;
287
- font-family:"Arial",sans-serif;
288
- mso-fareast-font-family:"Times New Roman";
289
- mso-ansi-language:EN-US;
290
- mso-fareast-language:EN-US;}
291
- p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
292
- {mso-style-priority:34;
293
- mso-style-unhide:no;
294
- mso-style-qformat:yes;
295
- mso-style-type:export-only;
296
- margin-top:0cm;
297
- margin-right:0cm;
298
- margin-bottom:0cm;
299
- margin-left:36.0pt;
300
- margin-bottom:.0001pt;
301
- mso-add-space:auto;
302
- mso-pagination:widow-orphan;
303
- font-size:10.5pt;
304
- mso-bidi-font-size:11.0pt;
305
- font-family:"Arial",sans-serif;
306
- mso-fareast-font-family:"Times New Roman";
307
- mso-ansi-language:EN-US;
308
- mso-fareast-language:EN-US;}
309
- p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
310
- {mso-style-priority:34;
311
- mso-style-unhide:no;
312
- mso-style-qformat:yes;
313
- mso-style-type:export-only;
314
- margin-top:0cm;
315
- margin-right:0cm;
316
- margin-bottom:12.0pt;
317
- margin-left:36.0pt;
318
- mso-add-space:auto;
319
- mso-pagination:widow-orphan;
320
- font-size:10.5pt;
321
- mso-bidi-font-size:11.0pt;
322
- font-family:"Arial",sans-serif;
323
- mso-fareast-font-family:"Times New Roman";
324
- mso-ansi-language:EN-US;
325
- mso-fareast-language:EN-US;}
326
304
  span.blackgraphtxsidebar
327
305
  {mso-style-name:blackgraphtxsidebar;
328
306
  mso-style-unhide:no;
@@ -334,7 +312,8 @@ span.blackgraphtx
334
312
  .MsoChpDefault
335
313
  {mso-style-type:export-only;
336
314
  mso-default-props:yes;}
337
-
315
+ div.figure
316
+ {text-align: center;}
338
317
 
339
318
 
340
319
  h1
@@ -412,6 +391,7 @@ h1.Annex
412
391
  mso-hyphenate:none;
413
392
  tab-stops:27.0pt 35.0pt;
414
393
  font-size:12.0pt;
394
+ font-weight:bold;
415
395
  mso-bidi-font-size:11.0pt;
416
396
  font-family:$headerfont;
417
397
  mso-fareast-font-family:$headerfont;
@@ -1105,6 +1085,8 @@ table.MsoNormalTable
1105
1085
  mso-para-margin:0cm;
1106
1086
  mso-para-margin-bottom:.0001pt;
1107
1087
  mso-pagination:widow-orphan;
1088
+ mso-table-anchor-vertical:paragraph;
1089
+ mso-table-bspace:12.0pt;
1108
1090
  font-size:10.0pt;
1109
1091
  font-family:$bodyfont;}
1110
1092
  br.section