metanorma-un 0.5.5 → 0.5.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a89fbe7a8aacf50f53139a549d660b7d0706321463965c5050bb6c2c1d4acdac
4
- data.tar.gz: f43a231cf294d7f45becca41ce489d6534811cc9f414a0163aeffcb3aa199415
3
+ metadata.gz: 6000479dcb184f14cff08893a4c89cbf7f2f9f4d8ffdc5c907ed93385c429a46
4
+ data.tar.gz: fd7bb76064bbf07fa758aadea5655a0c5eb2b7b4dea7627f42da27f44d49baba
5
5
  SHA512:
6
- metadata.gz: 62377ec55bd35ef893b6ac9bf80676a2873cdd5a63cf6635412b6ceb294aa6d85b352c535392647e633691fd9c1424a740460586e6f3395c1a8958e230e6ea98
7
- data.tar.gz: 75337ef3e5cab047fae4c81d3e879291d904de3e58bb07bdf976e1bb3197789679b0fecd6f9ecf20b3489701d9a4036ef6584b1f969e56996dd24300195425e4
6
+ metadata.gz: 1fddc8abb9e9fe9c952bdc5bd727cba8bfbeba53e2a2c12ddb40ea5c8ddd0dfdac1bd37486bee884bcd017f383d07f2bb8bc603fc0824db71570692ff9fd0509
7
+ data.tar.gz: c6271a453a8eae392041812fc945a31484e60fb7e705e640512d2bc47b355b6da87fa11fee05301768ac52f87c8d4ec0b7979ccfe9a3f4acb8ec0ffa1e2a6215
@@ -0,0 +1,62 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master, main ]
8
+ tags: [ v* ]
9
+ pull_request:
10
+
11
+ jobs:
12
+ rake:
13
+ name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
14
+ runs-on: ${{ matrix.os }}
15
+ continue-on-error: ${{ matrix.experimental }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby: [ '2.6', '2.5', '2.4' ]
20
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
21
+ experimental: [ false ]
22
+ include:
23
+ - ruby: '2.7'
24
+ os: 'ubuntu-latest'
25
+ experimental: true
26
+ - ruby: '2.7'
27
+ os: 'windows-latest'
28
+ experimental: true
29
+ - ruby: '2.7'
30
+ os: 'macos-latest'
31
+ experimental: true
32
+ steps:
33
+ - uses: actions/checkout@master
34
+
35
+ - uses: ruby/setup-ruby@v1
36
+ with:
37
+ ruby-version: ${{ matrix.ruby }}
38
+
39
+ - uses: actions/cache@v2
40
+ with:
41
+ path: vendor/bundle
42
+ key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
43
+ restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
44
+
45
+ - run: bundle config set path 'vendor/bundle'
46
+
47
+ - run: bundle install --jobs 4 --retry 3
48
+
49
+ - run: bundle exec rake
50
+
51
+ tests-passed:
52
+ needs: rake
53
+ runs-on: ubuntu-latest
54
+ steps:
55
+ - name: Trigger tests passed event
56
+ uses: Sibz/github-status-action@v1
57
+ with:
58
+ authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
59
+ context: 'tests-passed-successfully'
60
+ description: 'Tests passed successfully'
61
+ state: 'success'
62
+ sha: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -3,16 +3,14 @@
3
3
  (Formerly known as metanorma-unece)
4
4
 
5
5
  image:https://img.shields.io/gem/v/metanorma-un.svg["Gem Version", link="https://rubygems.org/gems/metanorma-un"]::
6
- image:https://github.com/metanorma/metanorma-un/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/metanorma/metanorma-un/actions?workflow=macos"]
7
- image:https://github.com/metanorma/metanorma-un/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/metanorma/metanorma-un/actions?workflow=windows"]
8
- image:https://github.com/metanorma/metanorma-un/workflows/ubuntu/badge.svg["Build Status (Ubuntu)", link="https://github.com/metanorma/metanorma-un/actions?workflow=ubuntu"]
6
+ image:https://github.com/metanorma/metanorma-un/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-un/actions?workflow=rake"]
9
7
  image:https://codeclimate.com/github/metanorma/metanorma-unece/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-unece"]
10
8
  image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-un.svg["Pull Requests", link="https://github.com/metanorma/metanorma-un/pulls"]
11
9
  image:https://img.shields.io/github/commits-since/metanorma/metanorma-un/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-un/releases"]
12
10
 
13
11
  == Functionality
14
12
 
15
- This gem processes http://asciidoctor.org/[Asciidoctor] documents following
13
+ This gem processes https://www.metanorma.com/[Metanorma documents] following
16
14
  a template for generating UN International Standards.
17
15
 
18
16
  The gem currently inherits from the https://github.com/metanorma/metanorma-standoc[Metanorma-Standoc]
@@ -596,6 +596,7 @@
596
596
  <ref name="bookmark"/>
597
597
  <ref name="image"/>
598
598
  <ref name="index"/>
599
+ <ref name="index-xref"/>
599
600
  </choice>
600
601
  </define>
601
602
  <define name="PureTextElement">
@@ -728,15 +729,61 @@
728
729
  </define>
729
730
  <define name="index">
730
731
  <element name="index">
731
- <attribute name="primary"/>
732
+ <attribute name="to">
733
+ <data type="IDREF"/>
734
+ </attribute>
735
+ <element name="primary">
736
+ <oneOrMore>
737
+ <ref name="PureTextElement"/>
738
+ </oneOrMore>
739
+ </element>
732
740
  <optional>
733
- <attribute name="secondary"/>
741
+ <element name="secondary">
742
+ <oneOrMore>
743
+ <ref name="PureTextElement"/>
744
+ </oneOrMore>
745
+ </element>
734
746
  </optional>
735
747
  <optional>
736
- <attribute name="tertiary"/>
748
+ <element name="tertiary">
749
+ <oneOrMore>
750
+ <ref name="PureTextElement"/>
751
+ </oneOrMore>
752
+ </element>
737
753
  </optional>
738
754
  </element>
739
755
  </define>
756
+ <define name="index-xref">
757
+ <element name="index-xref">
758
+ <attribute name="also">
759
+ <data type="boolean"/>
760
+ </attribute>
761
+ <element name="primary">
762
+ <oneOrMore>
763
+ <ref name="PureTextElement"/>
764
+ </oneOrMore>
765
+ </element>
766
+ <optional>
767
+ <element name="secondary">
768
+ <oneOrMore>
769
+ <ref name="PureTextElement"/>
770
+ </oneOrMore>
771
+ </element>
772
+ </optional>
773
+ <optional>
774
+ <element name="tertiary">
775
+ <oneOrMore>
776
+ <ref name="PureTextElement"/>
777
+ </oneOrMore>
778
+ </element>
779
+ </optional>
780
+ <element name="target">
781
+ <oneOrMore>
782
+ <ref name="PureTextElement"/>
783
+ </oneOrMore>
784
+ </element>
785
+ </element>
786
+ </define>
740
787
  <!-- bare ID element, used for referencing arbitrary spans of text -->
741
788
  <define name="bookmark">
742
789
  <element name="bookmark">
@@ -24,6 +24,14 @@
24
24
  <start>
25
25
  <ref name="standard-document"/>
26
26
  </start>
27
+ <define name="doctype">
28
+ <element name="doctype">
29
+ <optional>
30
+ <attribute name="abbreviation"/>
31
+ </optional>
32
+ <ref name="DocumentType"/>
33
+ </element>
34
+ </define>
27
35
  <define name="hyperlink">
28
36
  <element name="link">
29
37
  <attribute name="target">
@@ -47,6 +55,13 @@
47
55
  <param name="pattern">\i\c*|\c+#\c+</param>
48
56
  </data>
49
57
  </attribute>
58
+ <optional>
59
+ <attribute name="to">
60
+ <data type="string">
61
+ <param name="pattern">\i\c*|\c+#\c+</param>
62
+ </data>
63
+ </attribute>
64
+ </optional>
50
65
  <optional>
51
66
  <attribute name="type">
52
67
  <ref name="ReferenceFormat"/>
@@ -141,6 +156,11 @@
141
156
  <data type="boolean"/>
142
157
  </attribute>
143
158
  </optional>
159
+ <optional>
160
+ <attribute name="key">
161
+ <data type="boolean"/>
162
+ </attribute>
163
+ </optional>
144
164
  <oneOrMore>
145
165
  <ref name="dt"/>
146
166
  <ref name="dd"/>
@@ -233,6 +253,9 @@
233
253
  <data type="boolean"/>
234
254
  </attribute>
235
255
  </optional>
256
+ <optional>
257
+ <ref name="colgroup"/>
258
+ </optional>
236
259
  <optional>
237
260
  <ref name="tname"/>
238
261
  </optional>
@@ -751,6 +774,18 @@
751
774
  </define>
752
775
  </include>
753
776
  <!-- end overrides -->
777
+ <define name="colgroup">
778
+ <element name="colgroup">
779
+ <oneOrMore>
780
+ <ref name="col"/>
781
+ </oneOrMore>
782
+ </element>
783
+ </define>
784
+ <define name="col">
785
+ <element name="col">
786
+ <attribute name="width"/>
787
+ </element>
788
+ </define>
754
789
  <define name="TextElement" combine="choice">
755
790
  <ref name="concept"/>
756
791
  </define>
@@ -1164,49 +1199,7 @@
1164
1199
  </define>
1165
1200
  <define name="annex">
1166
1201
  <element name="annex">
1167
- <optional>
1168
- <attribute name="id">
1169
- <data type="ID"/>
1170
- </attribute>
1171
- </optional>
1172
- <optional>
1173
- <attribute name="language"/>
1174
- </optional>
1175
- <optional>
1176
- <attribute name="script"/>
1177
- </optional>
1178
- <optional>
1179
- <attribute name="inline-header">
1180
- <data type="boolean"/>
1181
- </attribute>
1182
- </optional>
1183
- <attribute name="obligation">
1184
- <choice>
1185
- <value>normative</value>
1186
- <value>informative</value>
1187
- </choice>
1188
- </attribute>
1189
- <optional>
1190
- <ref name="section-title"/>
1191
- </optional>
1192
- <group>
1193
- <group>
1194
- <zeroOrMore>
1195
- <ref name="BasicBlock"/>
1196
- </zeroOrMore>
1197
- <zeroOrMore>
1198
- <ref name="note"/>
1199
- </zeroOrMore>
1200
- </group>
1201
- <zeroOrMore>
1202
- <choice>
1203
- <ref name="annex-subsection"/>
1204
- <ref name="terms"/>
1205
- <ref name="definitions"/>
1206
- <ref name="references"/>
1207
- </choice>
1208
- </zeroOrMore>
1209
- </group>
1202
+ <ref name="Annex-Section"/>
1210
1203
  </element>
1211
1204
  </define>
1212
1205
  <define name="terms">
@@ -3,7 +3,7 @@ require "fileutils"
3
3
  module IsoDoc
4
4
  module UN
5
5
  module BaseConvert
6
- def middle_clause
6
+ def middle_clause(_docxml)
7
7
  "//clause[parent::sections]"
8
8
  end
9
9
 
@@ -111,6 +111,10 @@ b, strong {
111
111
  div.document-stage-band, div.document-type-band {
112
112
  background-color: #333333; }
113
113
 
114
+ a.FootnoteRef + a.FootnoteRef:before {
115
+ content: ", ";
116
+ vertical-align: super; }
117
+
114
118
  #standard-band {
115
119
  background-color: #0AC442; }
116
120
 
@@ -226,7 +230,7 @@ body {
226
230
  margin-left: auto;
227
231
  margin-right: auto;
228
232
  max-width: 100%;
229
- font-size: 15px;
233
+ font-size: {{normalfontsize}};
230
234
  font-weight: 300;
231
235
  line-height: 1.4em;
232
236
  color: #333;
@@ -705,7 +709,7 @@ p.NormRef {
705
709
  pre,
706
710
  .pseudocode {
707
711
  background-color: #f2f2f2;
708
- font-size: 0.8em;
712
+ font-size: {{monospacefontsize}};
709
713
  line-height: 1.6em;
710
714
  padding: 1.5em;
711
715
  margin: 2em 0 1em 0;
@@ -809,7 +813,7 @@ a.footnote-number {
809
813
  vertical-align: super; }
810
814
 
811
815
  .footnote {
812
- font-size: 0.9em; }
816
+ font-size: {{footnotefontsize}}; }
813
817
 
814
818
  /*
815
819
  3.11 Blockquotes
@@ -58,7 +58,7 @@ $un-admonition-color: #47430c;
58
58
  $un-toc-active: #4d7ea5;
59
59
 
60
60
  body {
61
- @include bodyStyle1(15px, 1.4em, $un-text, #ffffff, 300);
61
+ @include bodyStyle1($normalfontsize, 1.4em, $un-text, #ffffff, 300);
62
62
  font-weight: 400;
63
63
  }
64
64
 
@@ -523,7 +523,7 @@ a.footnote-number {
523
523
  }
524
524
 
525
525
  .footnote {
526
- font-size: 0.9em;
526
+ font-size: $footnotefontsize;
527
527
  }
528
528
 
529
529
 
@@ -14,7 +14,7 @@ p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode, pre {
14
14
  text-align: left;
15
15
  mso-pagination: widow-orphan;
16
16
  tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
17
- font-size: 10.0pt;
17
+ font-size: {{monospacefontsize}};
18
18
  font-family: {{monospacefont}};
19
19
  mso-fareast-font-family: Calibri;
20
20
  mso-bidi-font-family: "Courier New";
@@ -31,7 +31,7 @@ p.pseudocode, li.pseudocode, div.pseudocode {
31
31
  text-align: left;
32
32
  mso-pagination: widow-orphan;
33
33
  tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
34
- font-size: 10.5pt;
34
+ font-size: {{normalfontsize}};
35
35
  font-family: {{bodyfont}};
36
36
  mso-fareast-font-family: Calibri;
37
37
  mso-bidi-font-family: "Courier New";
@@ -49,7 +49,7 @@ p.Biblio, li.Biblio, div.Biblio, p.NormRef, li.NormRef, div.NormRef {
49
49
  tab-stops: 33.15pt;
50
50
  line-height: 12.0pt;
51
51
  mso-pagination: widow-orphan;
52
- font-size: 10.5pt;
52
+ font-size: {{normalfontsize}};
53
53
  font-weight: normal;
54
54
  font-family: {{bodyfont}};
55
55
  mso-fareast-font-family: {{bodyfont}};
@@ -147,10 +147,9 @@ p.Note, div.Note, li.Note, p.TableFootnote, div.TableFootnote, li.TableFootnote
147
147
  line-height: 12.0pt;
148
148
  mso-pagination: widow-orphan;
149
149
  tab-stops: 20.15pt;
150
- font-size: 10.0pt;
150
+ font-size: {{smallerfontsize}};
151
151
  mso-bidi-font-size: 11.0pt;
152
152
  font-family: {{bodyfont}};
153
- font-size: 10.0pt;
154
153
  mso-fareast-font-family: {{bodyfont}};
155
154
  mso-bidi-font-family: {{bodyfont}};
156
155
  mso-ansi-language: EN-GB; }
@@ -415,7 +414,7 @@ p.zzCopyright, li.zzCopyright {
415
414
  tab-stops: 20.15pt 25.7pt 481.15pt;
416
415
  padding: 0cm;
417
416
  mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt;
418
- font-size: 10.5pt;
417
+ font-size: {{normalfontsize}};
419
418
  font-family: {{bodyfont}};
420
419
  mso-fareast-font-family: {{bodyfont}};
421
420
  mso-bidi-font-family: {{bodyfont}};
@@ -501,7 +500,7 @@ p.Quote, li.Quote, div.Quote {
501
500
  line-height: 12.0pt;
502
501
  mso-pagination: widow-orphan;
503
502
  tab-stops: 20.15pt;
504
- font-size: 10.5pt;
503
+ font-size: {{normalfontsize}};
505
504
  font-family: {{bodyfont}};
506
505
  mso-fareast-font-family: {{bodyfont}};
507
506
  mso-bidi-font-family: {{bodyfont}};
@@ -517,7 +516,7 @@ p.QuoteAttribution {
517
516
  line-height: 12.0pt;
518
517
  mso-pagination: widow-orphan;
519
518
  tab-stops: 20.15pt;
520
- font-size: 10.5pt;
519
+ font-size: {{normalfontsize}};
521
520
  font-family: {{bodyfont}};
522
521
  mso-fareast-font-family: {{bodyfont}};
523
522
  mso-bidi-font-family: {{bodyfont}};
@@ -575,7 +574,7 @@ p.Formula, li.Formula, div.Formula {
575
574
  line-height: 12.0pt;
576
575
  mso-pagination: widow-orphan;
577
576
  tab-stops: right 487.45pt;
578
- font-size: 10.5pt;
577
+ font-size: {{normalfontsize}};
579
578
  font-family: {{bodyfont}};
580
579
  mso-fareast-font-family: {{bodyfont}};
581
580
  mso-bidi-font-family: {{bodyfont}};
@@ -698,7 +697,7 @@ table.MsoISOTable, table.MsoISOTableBig {
698
697
  mso-border-insideh: .75pt solid windowtext;
699
698
  mso-border-insidev: .75pt solid windowtext;
700
699
  margin-bottom: 12pt;
701
- font-size: 10.0pt;
700
+ font-size: {{smallerfontsize}};
702
701
  font-family: {{bodyfont}}; }
703
702
 
704
703
  table.MsoISOTable th, table.MsoISOTableBig th {
@@ -707,7 +706,7 @@ table.MsoISOTable th, table.MsoISOTableBig th {
707
706
  padding: 0cm 2.85pt 0cm 2.85pt; }
708
707
 
709
708
  table.MsoISOTable p, table.MsoISOTableBig p {
710
- font-size: 10.0pt; }
709
+ font-size: {{smallerfontsize}}; }
711
710
 
712
711
  table.MsoISOTable td, table.MsoISOTableBig td {
713
712
  border: solid windowtext 1pt;
@@ -729,7 +728,7 @@ table.MsoTableGrid {
729
728
  mso-para-margin-bottom: .0001pt;
730
729
  mso-pagination: widow-orphan;
731
730
  margin-bottom: 12pt;
732
- font-size: 10.0pt;
731
+ font-size: {{smallerfontsize}};
733
732
  font-family: {{bodyfont}}; }
734
733
 
735
734
  div.formula {
@@ -771,7 +770,7 @@ a.TableFootnoteRef, span.TableFootnoteRef {
771
770
  vertical-align: super; }
772
771
 
773
772
  aside {
774
- font-size: 10.0pt; }
773
+ font-size: {{footnotefontsize}}; }
775
774
 
776
775
  .example-title {
777
776
  font-weight: bold;
@@ -789,32 +788,32 @@ div.example {
789
788
 
790
789
  p.example, li.example, div.example, td.example {
791
790
  mso-pagination: none;
792
- font-size: 10.0pt;
791
+ font-size: {{smallerfontsize}};
793
792
  font-family: {{bodyfont}}; }
794
793
 
795
794
  td.example p.MsoListParagraph {
796
- font-size: 10.0pt; }
795
+ font-size: {{smallerfontsize}}; }
797
796
 
798
797
  div.example p.MsoListParagraph {
799
- font-size: 10.0pt; }
798
+ font-size: {{smallerfontsize}}; }
800
799
 
801
800
  div.Note p.MsoListParagraph {
802
- font-size: 10.0pt;
801
+ font-size: {{smallerfontsize}};
803
802
  margin-left: 1.0cm; }
804
803
 
805
804
  div.Note span.stem {
806
- font-size: 10.0pt; }
805
+ font-size: {{smallerfontsize}}; }
807
806
 
808
807
  div.Note p.Sourcecode, div.Note pre.Sourcecode {
809
808
  font-size: 8.0pt;
810
809
  margin-left: 1.0cm; }
811
810
 
812
811
  div.Note table.dl {
813
- font-size: 10.0pt;
812
+ font-size: {{smallerfontsize}};
814
813
  margin-left: 1.0cm; }
815
814
 
816
815
  span.note_label, span.example_label, td.example_label, td.note_label {
817
- font-size: 10.0pt;
816
+ font-size: {{smallerfontsize}};
818
817
  font-family: {{bodyfont}}; }
819
818
 
820
819
  table.dl {