metanorma-mpfa 0.5.3 → 0.5.8

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: ae4dfa96623980717b0d0aa5cab95bb85b8e2783cc3f2f7d150bfbd935fc9f34
4
- data.tar.gz: 8821d201deb2309b37fa71a1dd11201fe40e4341302750209d22cd1972f6f081
3
+ metadata.gz: 596d79a5ba9b9bb29e0f198f49ad991e2e7050b0544208ac76debb9f7c85d18c
4
+ data.tar.gz: dd508a80cb6b33f736752c4bf581f6d7721827134db82218ddb043a8726ef9f5
5
5
  SHA512:
6
- metadata.gz: 360c28eb4430f1decbf67e28afa792958ae2bb191757efc1e11259e64000e86d926c35c082313357c65d120e27d2ac3e1c2224b522b9275c5572310e3b39aec3
7
- data.tar.gz: 2d6839910d73e8da3b1b7549cc4baffbddb347695acff7619f361f4c4660848bfa3389d4c23da945ac6567097130bcba959752db0b1570cdd0dfd867bbaa4148
6
+ metadata.gz: 318a73311033294df909c6231da009cdd54695c1a731017a71945a07f034e6fa6bb66ec2e1217ccaa0703b005ca6fa95efb37ba545b64eac8c0731d873f5bac6
7
+ data.tar.gz: 1109389bdd638728883b07c0112a0f714aa7520ba345a9685af1c4cf926127f22035a6e6707faa4e2b7339f50d67b84ed67b9eab890db5b7d3f2801eebb37a9b
@@ -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`.
@@ -158,17 +158,7 @@
158
158
  <data type="ID"/>
159
159
  </attribute>
160
160
  <oneOrMore>
161
- <choice>
162
- <ref name="formula"/>
163
- <ref name="ul"/>
164
- <ref name="ol"/>
165
- <ref name="dl"/>
166
- <ref name="quote"/>
167
- <ref name="sourcecode"/>
168
- <ref name="paragraph"/>
169
- <ref name="table"/>
170
- <ref name="figure"/>
171
- </choice>
161
+ <ref name="paragraph"/>
172
162
  </oneOrMore>
173
163
  </element>
174
164
  </define>
@@ -1028,6 +1018,9 @@
1028
1018
  <value>alphabet_upper</value>
1029
1019
  </choice>
1030
1020
  </attribute>
1021
+ <optional>
1022
+ <attribute name="start"/>
1023
+ </optional>
1031
1024
  <oneOrMore>
1032
1025
  <ref name="li"/>
1033
1026
  </oneOrMore>
@@ -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>
@@ -64,6 +71,11 @@
64
71
  </choice>
65
72
  </attribute>
66
73
  </optional>
74
+ <optional>
75
+ <attribute name="droploc">
76
+ <data type="boolean"/>
77
+ </attribute>
78
+ </optional>
67
79
  <text/>
68
80
  </element>
69
81
  </define>
@@ -137,6 +149,11 @@
137
149
  <data type="boolean"/>
138
150
  </attribute>
139
151
  </optional>
152
+ <optional>
153
+ <attribute name="key">
154
+ <data type="boolean"/>
155
+ </attribute>
156
+ </optional>
140
157
  <oneOrMore>
141
158
  <ref name="dt"/>
142
159
  <ref name="dd"/>
@@ -859,6 +876,13 @@
859
876
  </define>
860
877
  <define name="standard-document">
861
878
  <element name="standard-document">
879
+ <attribute name="version"/>
880
+ <attribute name="type">
881
+ <choice>
882
+ <value>semantic</value>
883
+ <value>presentation</value>
884
+ </choice>
885
+ </attribute>
862
886
  <ref name="bibdata"/>
863
887
  <optional>
864
888
  <ref name="boilerplate"/>
@@ -880,7 +904,7 @@
880
904
  <oneOrMore>
881
905
  <choice>
882
906
  <ref name="content"/>
883
- <ref name="preface_abstract"/>
907
+ <ref name="abstract"/>
884
908
  <ref name="foreword"/>
885
909
  <ref name="introduction"/>
886
910
  <ref name="acknowledgements"/>
@@ -1153,49 +1177,7 @@
1153
1177
  </define>
1154
1178
  <define name="annex">
1155
1179
  <element name="annex">
1156
- <optional>
1157
- <attribute name="id">
1158
- <data type="ID"/>
1159
- </attribute>
1160
- </optional>
1161
- <optional>
1162
- <attribute name="language"/>
1163
- </optional>
1164
- <optional>
1165
- <attribute name="script"/>
1166
- </optional>
1167
- <optional>
1168
- <attribute name="inline-header">
1169
- <data type="boolean"/>
1170
- </attribute>
1171
- </optional>
1172
- <attribute name="obligation">
1173
- <choice>
1174
- <value>normative</value>
1175
- <value>informative</value>
1176
- </choice>
1177
- </attribute>
1178
- <optional>
1179
- <ref name="section-title"/>
1180
- </optional>
1181
- <group>
1182
- <group>
1183
- <zeroOrMore>
1184
- <ref name="BasicBlock"/>
1185
- </zeroOrMore>
1186
- <zeroOrMore>
1187
- <ref name="note"/>
1188
- </zeroOrMore>
1189
- </group>
1190
- <zeroOrMore>
1191
- <choice>
1192
- <ref name="annex-subsection"/>
1193
- <ref name="terms"/>
1194
- <ref name="definitions"/>
1195
- <ref name="references"/>
1196
- </choice>
1197
- </zeroOrMore>
1198
- </group>
1180
+ <ref name="Annex-Section"/>
1199
1181
  </element>
1200
1182
  </define>
1201
1183
  <define name="terms">
@@ -1481,11 +1463,6 @@
1481
1463
  </optional>
1482
1464
  </element>
1483
1465
  </define>
1484
- <define name="preface_abstract">
1485
- <element name="abstract">
1486
- <ref name="Basic-Section"/>
1487
- </element>
1488
- </define>
1489
1466
  <define name="term-clause">
1490
1467
  <element name="clause">
1491
1468
  <optional>
@@ -59,6 +59,13 @@
59
59
  </define>
60
60
  <define name="mpfd-standard">
61
61
  <element name="mpfd-standard">
62
+ <attribute name="version"/>
63
+ <attribute name="type">
64
+ <choice>
65
+ <value>semantic</value>
66
+ <value>presentation</value>
67
+ </choice>
68
+ </attribute>
62
69
  <ref name="bibdata"/>
63
70
  <zeroOrMore>
64
71
  <ref name="termdocsource"/>
@@ -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 {