metanorma-mpfa 0.5.4 → 0.5.9

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: 8dcb7661da4f2fcbfb39f502092f2bf7ebb0600931d4af01b4afc47f6ba07cda
4
- data.tar.gz: cc08933866ff4413dbe87680e7663eb68a17d31c9ae9c334d285a0255de738d9
3
+ metadata.gz: f005efd6c0e889d1c0e7c53bb991d7275d3e4b16e4169f70b72754fc54e6bb71
4
+ data.tar.gz: d7fe6df1a1254ff0f99d8795e9a812c3ffd45db9097174234f7fa253a67b2b94
5
5
  SHA512:
6
- metadata.gz: e4dae79748378fc5be7e487e49bd398b3a0cf6fed4ffb8f1942adfb904c3e95ba8b73224fe66eb1505a753ab56b46c1fd00deafe20ec137e9b29f43be907e465
7
- data.tar.gz: 99c560df54d0530e2a11f3ef9a2156aea1a1d10e06abd7183e174b40cc845b67cd4bb55c7835cc364328b83b211bafa7cf5eb0ca670fdc7bc297c7b6593ef488
6
+ metadata.gz: 5c8fe49df8409f3055cdf06208c2c8ef39cd9b40b1d8fa141da8a7650cd895698d288ae6717830735d530ed1342ccc987203250e24c20c5e3b0cc9fdc0a82079
7
+ data.tar.gz: 6f304abcdfb493b81a8a85c1b51e224653a687d08950d6d769933463f81037a691812fe7db238690e81bdd1576d522c871a3c1973b6b794cedcf9058e55f7202
@@ -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 }}
@@ -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">
@@ -737,6 +738,37 @@
737
738
  </optional>
738
739
  </element>
739
740
  </define>
741
+ <define name="index-xref">
742
+ <element name="index-xref">
743
+ <attribute name="also">
744
+ <data type="boolean"/>
745
+ </attribute>
746
+ <element name="primary">
747
+ <oneOrMore>
748
+ <ref name="PureTextElement"/>
749
+ </oneOrMore>
750
+ </element>
751
+ <optional>
752
+ <element name="secondary">
753
+ <oneOrMore>
754
+ <ref name="PureTextElement"/>
755
+ </oneOrMore>
756
+ </element>
757
+ </optional>
758
+ <optional>
759
+ <element name="tertiary">
760
+ <oneOrMore>
761
+ <ref name="PureTextElement"/>
762
+ </oneOrMore>
763
+ </element>
764
+ </optional>
765
+ <element name="target">
766
+ <oneOrMore>
767
+ <ref name="PureTextElement"/>
768
+ </oneOrMore>
769
+ </element>
770
+ </element>
771
+ </define>
740
772
  <!-- bare ID element, used for referencing arbitrary spans of text -->
741
773
  <define name="bookmark">
742
774
  <element name="bookmark">
@@ -56,7 +56,7 @@ module Asciidoctor
56
56
  presentation_xml_converter(node).convert(@filename + ".xml")
57
57
  html_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.html")
58
58
  doc_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
59
- pdf_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
59
+ pdf_converter(node)&.convert(@filename + ".presentation.xml", nil, false, "#{@filename}.pdf")
60
60
  end
61
61
 
62
62
  def validate(doc)
@@ -82,6 +82,7 @@ module Asciidoctor
82
82
  end
83
83
 
84
84
  def pdf_converter(node)
85
+ return if node.attr("no-pdf")
85
86
  IsoDoc::MPFA::PdfConvert.new(doc_extract_attributes(node))
86
87
  end
87
88
  end
@@ -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">
@@ -42,7 +50,6 @@
42
50
  </define>
43
51
  <define name="xref">
44
52
  <element name="xref">
45
- <!-- attribute target { xsd:IDREF }, -->
46
53
  <attribute name="target">
47
54
  <data type="string">
48
55
  <param name="pattern">\i\c*|\c+#\c+</param>
@@ -142,6 +149,11 @@
142
149
  <data type="boolean"/>
143
150
  </attribute>
144
151
  </optional>
152
+ <optional>
153
+ <attribute name="key">
154
+ <data type="boolean"/>
155
+ </attribute>
156
+ </optional>
145
157
  <oneOrMore>
146
158
  <ref name="dt"/>
147
159
  <ref name="dd"/>
@@ -234,6 +246,9 @@
234
246
  <data type="boolean"/>
235
247
  </attribute>
236
248
  </optional>
249
+ <optional>
250
+ <ref name="colgroup"/>
251
+ </optional>
237
252
  <optional>
238
253
  <ref name="tname"/>
239
254
  </optional>
@@ -752,6 +767,18 @@
752
767
  </define>
753
768
  </include>
754
769
  <!-- end overrides -->
770
+ <define name="colgroup">
771
+ <element name="colgroup">
772
+ <oneOrMore>
773
+ <ref name="col"/>
774
+ </oneOrMore>
775
+ </element>
776
+ </define>
777
+ <define name="col">
778
+ <element name="col">
779
+ <attribute name="width"/>
780
+ </element>
781
+ </define>
755
782
  <define name="TextElement" combine="choice">
756
783
  <ref name="concept"/>
757
784
  </define>
@@ -1165,49 +1192,7 @@
1165
1192
  </define>
1166
1193
  <define name="annex">
1167
1194
  <element name="annex">
1168
- <optional>
1169
- <attribute name="id">
1170
- <data type="ID"/>
1171
- </attribute>
1172
- </optional>
1173
- <optional>
1174
- <attribute name="language"/>
1175
- </optional>
1176
- <optional>
1177
- <attribute name="script"/>
1178
- </optional>
1179
- <optional>
1180
- <attribute name="inline-header">
1181
- <data type="boolean"/>
1182
- </attribute>
1183
- </optional>
1184
- <attribute name="obligation">
1185
- <choice>
1186
- <value>normative</value>
1187
- <value>informative</value>
1188
- </choice>
1189
- </attribute>
1190
- <optional>
1191
- <ref name="section-title"/>
1192
- </optional>
1193
- <group>
1194
- <group>
1195
- <zeroOrMore>
1196
- <ref name="BasicBlock"/>
1197
- </zeroOrMore>
1198
- <zeroOrMore>
1199
- <ref name="note"/>
1200
- </zeroOrMore>
1201
- </group>
1202
- <zeroOrMore>
1203
- <choice>
1204
- <ref name="annex-subsection"/>
1205
- <ref name="terms"/>
1206
- <ref name="definitions"/>
1207
- <ref name="references"/>
1208
- </choice>
1209
- </zeroOrMore>
1210
- </group>
1195
+ <ref name="Annex-Section"/>
1211
1196
  </element>
1212
1197
  </define>
1213
1198
  <define name="terms">
@@ -16,7 +16,7 @@ fieldset, form, label, legend,
16
16
  table, caption, tbody, tfoot, thead, tr, th, td,
17
17
  article, aside, canvas, details, embed,
18
18
  figure, figcaption, footer, header, hgroup,
19
- menu, nav, output, ruby, section, summary,
19
+ menu, output, ruby, section, summary,
20
20
  time, mark, audio, video {
21
21
  margin: 0;
22
22
  padding: 0; }
@@ -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
 
@@ -220,7 +224,7 @@ body {
220
224
  margin-left: auto;
221
225
  margin-right: auto;
222
226
  max-width: 100%;
223
- font-size: 15px;
227
+ font-size: {{normalfontsize}};
224
228
  font-weight: 300;
225
229
  line-height: 1.4em;
226
230
  color: #301907;
@@ -683,7 +687,7 @@ p.Biblio, p.NormRef {
683
687
  pre,
684
688
  .pseudocode {
685
689
  background-color: #f7f7f7;
686
- font-size: 0.8em;
690
+ font-size: {{monospacefontsize}};
687
691
  line-height: 1.6em;
688
692
  padding: 1.5em;
689
693
  margin: 2em 0 1em 0;
@@ -789,7 +793,7 @@ a.footnote-number {
789
793
  font-size: 0.8em; }
790
794
 
791
795
  .footnote {
792
- font-size: 0.9em; }
796
+ font-size: {{footnotefontsize}}; }
793
797
 
794
798
  /*
795
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 {