metanorma-mpfa 0.5.6 → 0.5.11

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: '028095c8e9593bbd435c9c26a832aa880035eb14677e39cbc3404ade7b43c87c'
4
- data.tar.gz: 0ca0917efb37987a0740e0fae27b57cb36418940cb7a4be77fd6e941835ae4ab
3
+ metadata.gz: b6b4fb45cca9108e736075604129bbd75df3639b0da7e4acf98e260f8b1423a2
4
+ data.tar.gz: 197f73f8a3f35bf7a1a33d80c8d392f882ec40dace0f4005c8f4c023e24bc62c
5
5
  SHA512:
6
- metadata.gz: 1c94dc642e33f3def7152b42c9805057a1cb70ab01814848c1bc82961f52b26a27c084ddd579ca541d25b387d92642ec771180c5021febe241208e0ed5fddcce
7
- data.tar.gz: eeb38f86787013cd4a977b36e4ea50a55e92c9d7c18641ea193899427efbe98a6550600cf0e08484acd1efd5719b9105041f78f075b73ee94f45ebfdcabea02e
6
+ metadata.gz: 235ee64575a96e7973502abe404564966040aa711ea48a3096364ccda817cb65f0aa1d8da9d57729088a7761b0a8574b8a31a845db9945b1d97ac46d58c0d858
7
+ data.tar.gz: b49a34338f58c0faff58d362f4a9ec17de4482512e116470c40c7a7ef3ee7bd7267e70fc98b8c275d22045de552ff02da21bf868a343e1afd11b7a2703177994
@@ -4,7 +4,8 @@ name: rake
4
4
 
5
5
  on:
6
6
  push:
7
- branches: [ master ]
7
+ branches: [ master, main ]
8
+ tags: [ v* ]
8
9
  pull_request:
9
10
 
10
11
  jobs:
@@ -31,14 +32,34 @@ jobs:
31
32
  steps:
32
33
  - uses: actions/checkout@master
33
34
 
34
- - name: Use Ruby
35
- uses: ruby/setup-ruby@v1
35
+ - uses: ruby/setup-ruby@v1
36
36
  with:
37
37
  ruby-version: ${{ matrix.ruby }}
38
- bundler-cache: true
39
38
 
40
- - name: Update gems
41
- run: bundle install --jobs 4 --retry 3
39
+ - if: matrix.os == 'macos-latest'
40
+ run: brew install autoconf automake libtool
42
41
 
43
- - name: Run specs
44
- run: bundle exec rake
42
+ - uses: actions/cache@v2
43
+ with:
44
+ path: vendor/bundle
45
+ key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
46
+ restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
47
+
48
+ - run: bundle config set path 'vendor/bundle'
49
+
50
+ - run: bundle install --jobs 4 --retry 3
51
+
52
+ - run: bundle exec rake
53
+
54
+ tests-passed:
55
+ needs: rake
56
+ runs-on: ubuntu-latest
57
+ steps:
58
+ - name: Trigger tests passed event
59
+ uses: Sibz/github-status-action@v1
60
+ with:
61
+ authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
62
+ context: 'tests-passed-successfully'
63
+ description: 'Tests passed successfully'
64
+ state: 'success'
65
+ sha: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -1,21 +1,17 @@
1
1
  = Metanorma-MPFA: Metanorma processor for MPFA documents
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-mpfa.svg["Gem Version", link="https://rubygems.org/gems/metanorma-mpfa"]
4
- image:https://github.com/metanorma/metanorma-mpfa/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/metanorma/metanorma-mpfa/actions?workflow=macos"]
5
- image:https://github.com/metanorma/metanorma-mpfa/workflows/ubuntu/badge.svg["Build Status (ubuntu)", link="https://github.com/metanorma/metanorma-mpfa/actions?workflow=ubuntu"]
6
- image:https://github.com/metanorma/metanorma-mpfa/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/metanorma/metanorma-mpfa/actions?workflow=windows"]
4
+ image:https://github.com/metanorma/metanorma-mpfa/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-mpfa/actions?workflow=rake"]
7
5
  image:https://codeclimate.com/github/metanorma/metanorma-mpfa/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-mpfa"]
8
6
  image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-mpfa.svg["Pull Requests", link="https://github.com/metanorma/metanorma-mpfa/pulls"]
9
7
  image:https://img.shields.io/github/commits-since/metanorma/metanorma-mpfa/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-mpfa/releases"]
10
8
 
11
- _Formerly known as_ `metanorma-mpfd`.
12
-
13
9
  WARNING: This gem is still under development. Moreover, unlike other Metanorma gems,
14
10
  there is no formal MPFA specification, and this work is still currently exploratory.
15
11
 
16
12
  == Functionality
17
13
 
18
- This gem processes http://asciidoctor.org/[Asciidoctor] documents following
14
+ This gem processes https://www.metanorma.com/[Metanorma documents] following
19
15
  a template for generating documents for the http://www.mpfa.org.hk[Mandatory Provident Fund Schemes Authority of Hong Kong].
20
16
 
21
17
  The gem currently inherits from the https://github.com/metanorma/metanorma-standoc
@@ -77,3 +73,7 @@ this general model can be found on its page.
77
73
  ////
78
74
  * Document templates are available at the https://github.com/metanorma/mn-templates-mpf[mn-templates-mpf] repository.
79
75
  /////
76
+
77
+ == Notes
78
+
79
+ Metanorma-MPFA was formerly published as `metanorma-mpfd`.
@@ -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">
@@ -0,0 +1,5 @@
1
+ ---
2
+ Titillium Web:
3
+ Space Mono:
4
+ Arial:
5
+ Courier New:
@@ -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,12 @@
233
253
  <data type="boolean"/>
234
254
  </attribute>
235
255
  </optional>
256
+ <optional>
257
+ <attribute name="width"/>
258
+ </optional>
259
+ <optional>
260
+ <ref name="colgroup"/>
261
+ </optional>
236
262
  <optional>
237
263
  <ref name="tname"/>
238
264
  </optional>
@@ -751,6 +777,18 @@
751
777
  </define>
752
778
  </include>
753
779
  <!-- end overrides -->
780
+ <define name="colgroup">
781
+ <element name="colgroup">
782
+ <oneOrMore>
783
+ <ref name="col"/>
784
+ </oneOrMore>
785
+ </element>
786
+ </define>
787
+ <define name="col">
788
+ <element name="col">
789
+ <attribute name="width"/>
790
+ </element>
791
+ </define>
754
792
  <define name="TextElement" combine="choice">
755
793
  <ref name="concept"/>
756
794
  </define>
@@ -801,6 +839,9 @@
801
839
  <data type="boolean"/>
802
840
  </attribute>
803
841
  </optional>
842
+ <optional>
843
+ <attribute name="number"/>
844
+ </optional>
804
845
  <optional>
805
846
  <attribute name="obligation">
806
847
  <choice>
@@ -856,9 +897,11 @@
856
897
  <element name="code">
857
898
  <text/>
858
899
  </element>
859
- <element name="text">
860
- <text/>
861
- </element>
900
+ <optional>
901
+ <element name="text">
902
+ <text/>
903
+ </element>
904
+ </optional>
862
905
  </element>
863
906
  </define>
864
907
  <define name="standard-document">
@@ -1028,6 +1071,9 @@
1028
1071
  </choice>
1029
1072
  </attribute>
1030
1073
  </optional>
1074
+ <optional>
1075
+ <attribute name="number"/>
1076
+ </optional>
1031
1077
  <optional>
1032
1078
  <attribute name="type"/>
1033
1079
  </optional>
@@ -1081,6 +1127,9 @@
1081
1127
  <optional>
1082
1128
  <attribute name="type"/>
1083
1129
  </optional>
1130
+ <optional>
1131
+ <attribute name="number"/>
1132
+ </optional>
1084
1133
  <optional>
1085
1134
  <ref name="section-title"/>
1086
1135
  </optional>
@@ -1183,6 +1232,9 @@
1183
1232
  <optional>
1184
1233
  <attribute name="type"/>
1185
1234
  </optional>
1235
+ <optional>
1236
+ <attribute name="number"/>
1237
+ </optional>
1186
1238
  <optional>
1187
1239
  <attribute name="obligation">
1188
1240
  <choice>
@@ -1511,6 +1563,7 @@
1511
1563
  <value>add</value>
1512
1564
  <value>modify</value>
1513
1565
  <value>delete</value>
1566
+ <value>replace</value>
1514
1567
  </choice>
1515
1568
  </attribute>
1516
1569
  <optional>
@@ -1541,6 +1594,11 @@
1541
1594
  </optional>
1542
1595
  <optional>
1543
1596
  <element name="newcontent">
1597
+ <optional>
1598
+ <attribute name="id">
1599
+ <data type="ID"/>
1600
+ </attribute>
1601
+ </optional>
1544
1602
  <zeroOrMore>
1545
1603
  <ref name="BasicBlock"/>
1546
1604
  </zeroOrMore>
@@ -40,12 +40,12 @@ module IsoDoc
40
40
  end
41
41
  end
42
42
 
43
- def middle_clause
43
+ def middle_clause(_docxml)
44
44
  "//clause[parent::sections][not(descendant::terms)]"
45
45
  end
46
46
 
47
47
  def middle(isoxml, out)
48
- middle_title(out)
48
+ middle_title(isoxml, out)
49
49
  middle_admonitions(isoxml, out)
50
50
  clause isoxml, out
51
51
  annex isoxml, out
@@ -59,7 +59,7 @@ module IsoDoc
59
59
  end
60
60
 
61
61
  def clause(isoxml, out)
62
- isoxml.xpath(ns(middle_clause)).each do |c|
62
+ isoxml.xpath(ns(middle_clause(isoxml))).each do |c|
63
63
  out.div **attr_code(id: c["id"]) do |s|
64
64
  clause_name(nil, c&.at(ns("./title")), s,
65
65
  class: c["container"] ? "containerhdr" : nil )
@@ -224,7 +224,7 @@ body {
224
224
  margin-left: auto;
225
225
  margin-right: auto;
226
226
  max-width: 100%;
227
- font-size: 15px;
227
+ font-size: {{normalfontsize}};
228
228
  font-weight: 300;
229
229
  line-height: 1.4em;
230
230
  color: #301907;
@@ -687,7 +687,7 @@ p.Biblio, p.NormRef {
687
687
  pre,
688
688
  .pseudocode {
689
689
  background-color: #f7f7f7;
690
- font-size: 0.8em;
690
+ font-size: {{monospacefontsize}};
691
691
  line-height: 1.6em;
692
692
  padding: 1.5em;
693
693
  margin: 2em 0 1em 0;
@@ -793,7 +793,7 @@ a.footnote-number {
793
793
  font-size: 0.8em; }
794
794
 
795
795
  .footnote {
796
- font-size: 0.9em; }
796
+ font-size: {{footnotefontsize}}; }
797
797
 
798
798
  /*
799
799
  3.11 Blockquotes
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  body {
17
- @include bodyStyle1(15px, 1.4em, #301907, #f7f7f7, 300);
17
+ @include bodyStyle1($normalfontsize, 1.4em, #301907, #f7f7f7, 300);
18
18
  // @include sidebarNavContainer(323px);
19
19
  main {
20
20
  margin: 0 0 0 6em;
@@ -446,7 +446,7 @@ a.footnote-number {
446
446
  }
447
447
 
448
448
  .footnote {
449
- font-size: 0.9em;
449
+ font-size: $footnotefontsize;
450
450
  }
451
451
 
452
452
 
@@ -9,7 +9,7 @@ p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode, pre {
9
9
  text-align: left;
10
10
  mso-pagination: widow-orphan;
11
11
  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;
12
- font-size: 10.0pt;
12
+ font-size: {{monospacefontsize}};
13
13
  font-family: {{monospacefont}};
14
14
  mso-fareast-font-family: Calibri;
15
15
  mso-bidi-font-family: "Courier New";
@@ -26,7 +26,7 @@ p.pseudocode, li.pseudocode, div.pseudocode {
26
26
  text-align: left;
27
27
  mso-pagination: widow-orphan;
28
28
  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;
29
- font-size: 10.5pt;
29
+ font-size: {{normalfontsize}};
30
30
  font-family: {{bodyfont}};
31
31
  mso-fareast-font-family: Calibri;
32
32
  mso-bidi-font-family: "Courier New";
@@ -44,7 +44,7 @@ p.Biblio, li.Biblio, div.Biblio, p.NormRef, li.NormRef, div.NormRef {
44
44
  tab-stops: 33.15pt;
45
45
  line-height: 12.0pt;
46
46
  mso-pagination: widow-orphan;
47
- font-size: 10.5pt;
47
+ font-size: {{normalfontsize}};
48
48
  font-weight: normal;
49
49
  font-family: {{bodyfont}};
50
50
  mso-fareast-font-family: {{bodyfont}};
@@ -142,10 +142,9 @@ p.Note, div.Note, li.Note, p.TableFootnote, div.TableFootnote, li.TableFootnote
142
142
  line-height: 12.0pt;
143
143
  mso-pagination: widow-orphan;
144
144
  tab-stops: 20.15pt;
145
- font-size: 10.0pt;
145
+ font-size: {{smallerfontsize}};
146
146
  mso-bidi-font-size: 11.0pt;
147
147
  font-family: {{bodyfont}};
148
- font-size: 10.0pt;
149
148
  mso-fareast-font-family: {{bodyfont}};
150
149
  mso-bidi-font-family: {{bodyfont}};
151
150
  mso-ansi-language: EN-GB; }
@@ -410,7 +409,7 @@ p.zzCopyright, li.zzCopyright {
410
409
  tab-stops: 20.15pt 25.7pt 481.15pt;
411
410
  padding: 0cm;
412
411
  mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt;
413
- font-size: 10.5pt;
412
+ font-size: {{normalfontsize}};
414
413
  font-family: {{bodyfont}};
415
414
  mso-fareast-font-family: {{bodyfont}};
416
415
  mso-bidi-font-family: {{bodyfont}};
@@ -496,7 +495,7 @@ p.Quote, li.Quote, div.Quote {
496
495
  line-height: 12.0pt;
497
496
  mso-pagination: widow-orphan;
498
497
  tab-stops: 20.15pt;
499
- font-size: 10.5pt;
498
+ font-size: {{normalfontsize}};
500
499
  font-family: {{bodyfont}};
501
500
  mso-fareast-font-family: {{bodyfont}};
502
501
  mso-bidi-font-family: {{bodyfont}};
@@ -512,7 +511,7 @@ p.QuoteAttribution {
512
511
  line-height: 12.0pt;
513
512
  mso-pagination: widow-orphan;
514
513
  tab-stops: 20.15pt;
515
- font-size: 10.5pt;
514
+ font-size: {{normalfontsize}};
516
515
  font-family: {{bodyfont}};
517
516
  mso-fareast-font-family: {{bodyfont}};
518
517
  mso-bidi-font-family: {{bodyfont}};
@@ -574,7 +573,7 @@ p.Formula, li.Formula, div.Formula {
574
573
  line-height: 12.0pt;
575
574
  mso-pagination: widow-orphan;
576
575
  tab-stops: right 487.45pt;
577
- font-size: 10.5pt;
576
+ font-size: {{normalfontsize}};
578
577
  font-family: {{bodyfont}};
579
578
  mso-fareast-font-family: {{bodyfont}};
580
579
  mso-bidi-font-family: {{bodyfont}};
@@ -688,7 +687,7 @@ table.MsoISOTable, table.MsoISOTableBig {
688
687
  mso-yfti-tbllook: 480;
689
688
  mso-border-insideh: .75pt solid windowtext;
690
689
  mso-border-insidev: .75pt solid windowtext;
691
- font-size: 10.0pt;
690
+ font-size: {{smallerfontsize}};
692
691
  font-family: {{bodyfont}}; }
693
692
 
694
693
  table.MsoISOTable th, table.MsoISOTableBig th {
@@ -702,7 +701,7 @@ table.MsoISOTable td, table.MsoISOTableBig td {
702
701
  padding: 0cm 2.85pt 0cm 2.85pt; }
703
702
 
704
703
  table.MsoISOTable p, table.MsoISOTableBig p {
705
- font-size: 10.0pt; }
704
+ font-size: {{smallerfontsize}}; }
706
705
 
707
706
  table.MsoTableGrid {
708
707
  mso-style-name: "Table Grid";
@@ -718,7 +717,7 @@ table.MsoTableGrid {
718
717
  mso-para-margin: 0cm;
719
718
  mso-para-margin-bottom: .0001pt;
720
719
  mso-pagination: widow-orphan;
721
- font-size: 10.0pt;
720
+ font-size: {{smallerfontsize}};
722
721
  font-family: {{bodyfont}}; }
723
722
 
724
723
  div.formula {
@@ -760,7 +759,7 @@ a.TableFootnoteRef, span.TableFootnoteRef {
760
759
  vertical-align: super; }
761
760
 
762
761
  aside {
763
- font-size: 10.0pt; }
762
+ font-size: {{footnotefontsize}}; }
764
763
 
765
764
  .example-title {
766
765
  font-weight: bold;
@@ -778,32 +777,32 @@ div.example {
778
777
 
779
778
  p.example, li.example, div.example, td.example {
780
779
  mso-pagination: none;
781
- font-size: 10.0pt;
780
+ font-size: {{smallerfontsize}};
782
781
  font-family: {{bodyfont}}; }
783
782
 
784
783
  td.example p.MsoListParagraph {
785
- font-size: 10.0pt; }
784
+ font-size: {{smallerfontsize}}; }
786
785
 
787
786
  div.example p.MsoListParagraph {
788
- font-size: 10.0pt; }
787
+ font-size: {{smallerfontsize}}; }
789
788
 
790
789
  div.Note p.MsoListParagraph {
791
- font-size: 10.0pt;
790
+ font-size: {{smallerfontsize}};
792
791
  margin-left: 1.0cm; }
793
792
 
794
793
  div.Note span.stem {
795
- font-size: 10.0pt; }
794
+ font-size: {{smallerfontsize}}; }
796
795
 
797
796
  div.Note p.Sourcecode, div.Note pre.Sourcecode {
798
797
  font-size: 8.0pt;
799
798
  margin-left: 1.0cm; }
800
799
 
801
800
  div.Note table.dl {
802
- font-size: 10.0pt;
801
+ font-size: {{smallerfontsize}};
803
802
  margin-left: 1.0cm; }
804
803
 
805
804
  span.note_label, span.example_label, td.example_label, td.note_label {
806
- font-size: 10.0pt;
805
+ font-size: {{smallerfontsize}};
807
806
  font-family: {{bodyfont}}; }
808
807
 
809
808
  table.dl {