metanorma-un 0.5.2 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +63 -0
- data/README.adoc +2 -4
- data/lib/asciidoctor/un/basicdoc.rng +23 -0
- data/lib/asciidoctor/un/boilerplate.xml +7 -5
- data/lib/asciidoctor/un/isodoc.rng +135 -58
- data/lib/asciidoctor/un/un.rng +7 -0
- data/lib/isodoc/un/html/html_unece_plenary_titlepage.html +17 -1
- data/lib/isodoc/un/html/html_unece_titlepage.html +20 -1
- data/lib/isodoc/un/html/htmlstyle.css +8 -1
- data/lib/isodoc/un/html/htmlstyle.scss +4 -0
- data/lib/isodoc/un/html/unece.css +16 -4
- data/lib/isodoc/un/html/unece.scss +18 -4
- data/lib/isodoc/un/html/word_unece_plenary_titlepage.html +17 -1
- data/lib/isodoc/un/html/word_unece_titlepage.html +17 -1
- data/lib/isodoc/un/i18n-en.yaml +1 -0
- data/lib/isodoc/un/pdf_convert.rb +2 -2
- data/lib/isodoc/un/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +1080 -249
- data/lib/isodoc/un/un.plenary.xsl +1080 -249
- data/lib/isodoc/un/un.recommendation.xsl +966 -240
- data/lib/isodoc/un/xref.rb +5 -5
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +1 -1
- metadata +5 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c01dbd7826220e4745047a2e35efb4c1a84652261f3885f867a59c76689afaba
|
4
|
+
data.tar.gz: b92a663a7cfbd929b559fa8066f6c5b09737e85d8ddfb39a804fa51dfa03ddb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47b69cccf5f4f6b0415da7117820238a19e54760598e693e029095360a85fd68f6bccc6b9a3a3e5286a4c166c647a469e17118a98f41332add49e84bd2d687f9
|
7
|
+
data.tar.gz: f5b1c1ab84c63061e38a7134af4daf3e08a5d372c5a528f10915e6790dd417a3739089f5ee20116991ff36903f153d30aedc83b258ce3f509b6f60ba662da595
|
@@ -0,0 +1,63 @@
|
|
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@v1
|
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
|
+
notify:
|
52
|
+
name: Trigger notify workflow
|
53
|
+
needs: rake
|
54
|
+
runs-on: ubuntu-latest
|
55
|
+
steps:
|
56
|
+
- name: Trigger notify workflow
|
57
|
+
uses: Sibz/github-status-action@v1
|
58
|
+
with:
|
59
|
+
authToken: ${{ secrets.GITHUB_TOKEN }}
|
60
|
+
context: 'tests-passed-successfully'
|
61
|
+
description: 'Tests passed successfully'
|
62
|
+
state: 'success'
|
63
|
+
sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
data/README.adoc
CHANGED
@@ -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/
|
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
|
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]
|
@@ -402,6 +402,16 @@
|
|
402
402
|
</choice>
|
403
403
|
</attribute>
|
404
404
|
</optional>
|
405
|
+
<optional>
|
406
|
+
<attribute name="valign">
|
407
|
+
<choice>
|
408
|
+
<value>top</value>
|
409
|
+
<value>middle</value>
|
410
|
+
<value>bottom</value>
|
411
|
+
<value>baseline</value>
|
412
|
+
</choice>
|
413
|
+
</attribute>
|
414
|
+
</optional>
|
405
415
|
<choice>
|
406
416
|
<zeroOrMore>
|
407
417
|
<ref name="TextElement"/>
|
@@ -429,6 +439,16 @@
|
|
429
439
|
</choice>
|
430
440
|
</attribute>
|
431
441
|
</optional>
|
442
|
+
<optional>
|
443
|
+
<attribute name="valign">
|
444
|
+
<choice>
|
445
|
+
<value>top</value>
|
446
|
+
<value>middle</value>
|
447
|
+
<value>bottom</value>
|
448
|
+
<value>baseline</value>
|
449
|
+
</choice>
|
450
|
+
</attribute>
|
451
|
+
</optional>
|
432
452
|
<choice>
|
433
453
|
<zeroOrMore>
|
434
454
|
<ref name="TextElement"/>
|
@@ -998,6 +1018,9 @@
|
|
998
1018
|
<value>alphabet_upper</value>
|
999
1019
|
</choice>
|
1000
1020
|
</attribute>
|
1021
|
+
<optional>
|
1022
|
+
<attribute name="start"/>
|
1023
|
+
</optional>
|
1001
1024
|
<oneOrMore>
|
1002
1025
|
<ref name="li"/>
|
1003
1026
|
</oneOrMore>
|
@@ -40,15 +40,17 @@
|
|
40
40
|
</legal-statement>
|
41
41
|
<feedback-statement>
|
42
42
|
<clause>
|
43
|
-
<p id="boilerplate-feedback-name">UN Economic Commission for Europe: Information Service</p>
|
43
|
+
<p id="boilerplate-feedback-name">{% if subdivision %}{{subdivision}}{% else %}UN Economic Commission for Europe: Information Service{% endif %}</p>
|
44
44
|
<p id="boilerplate-feedback-address">
|
45
|
+
{% if pub_address %}{{ pub_address }}{% else %}
|
45
46
|
Palais des Nations<br />
|
46
47
|
CH-1211 Geneva 10<br />
|
47
|
-
Switzerland<br />
|
48
|
+
Switzerland{% endif %}<br />
|
48
49
|
<br />
|
49
|
-
<link target="tel
|
50
|
-
<link target="
|
51
|
-
<link target="
|
50
|
+
<link target="tel:{% if pub_phone %}{{ pub_phone }}{% else %}+41(0)229171234{% endif %}">{% if pub_phone %}{{ pub_phone }}{% else %}+41 (0) 22 917 12 34 (switchboard){% endif %}</link><br />
|
51
|
+
{% if pub_fax %}<link target="tel:{{pub_fax}}">{{pub_fax}}</link><br/>{% endif %}
|
52
|
+
<link target="mailto:{% if pub_email %}{{ pub_email }}{% else %}unece_info@un.org{% endif %}">{% if pub_email %}{{ pub_email }}{% else %}unece_info@un.org{% endif %}</link><br />
|
53
|
+
<link target="{% if pub_uri %}{{pub_uri}}{% else %}https://www.unece.org/{% endif %}">{% if pub_uri %}{{pub_uri}}{% else %}www.unece.org/{% endif %}</link>
|
52
54
|
</p>
|
53
55
|
</clause>
|
54
56
|
</feedback-statement>
|
@@ -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"/>
|
@@ -581,6 +598,8 @@
|
|
581
598
|
<ref name="ol"/>
|
582
599
|
<ref name="dl"/>
|
583
600
|
<ref name="formula"/>
|
601
|
+
<ref name="quote"/>
|
602
|
+
<ref name="sourcecode"/>
|
584
603
|
</choice>
|
585
604
|
</oneOrMore>
|
586
605
|
</element>
|
@@ -664,6 +683,16 @@
|
|
664
683
|
</choice>
|
665
684
|
</attribute>
|
666
685
|
</optional>
|
686
|
+
<optional>
|
687
|
+
<attribute name="valign">
|
688
|
+
<choice>
|
689
|
+
<value>top</value>
|
690
|
+
<value>middle</value>
|
691
|
+
<value>bottom</value>
|
692
|
+
<value>baseline</value>
|
693
|
+
</choice>
|
694
|
+
</attribute>
|
695
|
+
</optional>
|
667
696
|
<choice>
|
668
697
|
<zeroOrMore>
|
669
698
|
<choice>
|
@@ -700,6 +729,16 @@
|
|
700
729
|
</choice>
|
701
730
|
</attribute>
|
702
731
|
</optional>
|
732
|
+
<optional>
|
733
|
+
<attribute name="valign">
|
734
|
+
<choice>
|
735
|
+
<value>top</value>
|
736
|
+
<value>middle</value>
|
737
|
+
<value>bottom</value>
|
738
|
+
<value>baseline</value>
|
739
|
+
</choice>
|
740
|
+
</attribute>
|
741
|
+
</optional>
|
703
742
|
<choice>
|
704
743
|
<zeroOrMore>
|
705
744
|
<choice>
|
@@ -837,6 +876,13 @@
|
|
837
876
|
</define>
|
838
877
|
<define name="standard-document">
|
839
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>
|
840
886
|
<ref name="bibdata"/>
|
841
887
|
<optional>
|
842
888
|
<ref name="boilerplate"/>
|
@@ -858,7 +904,7 @@
|
|
858
904
|
<oneOrMore>
|
859
905
|
<choice>
|
860
906
|
<ref name="content"/>
|
861
|
-
<ref name="
|
907
|
+
<ref name="abstract"/>
|
862
908
|
<ref name="foreword"/>
|
863
909
|
<ref name="introduction"/>
|
864
910
|
<ref name="acknowledgements"/>
|
@@ -1052,14 +1098,17 @@
|
|
1052
1098
|
<ref name="section-title"/>
|
1053
1099
|
</optional>
|
1054
1100
|
<group>
|
1055
|
-
<
|
1056
|
-
<
|
1057
|
-
<
|
1058
|
-
|
1059
|
-
|
1060
|
-
<
|
1061
|
-
|
1062
|
-
|
1101
|
+
<choice>
|
1102
|
+
<group>
|
1103
|
+
<zeroOrMore>
|
1104
|
+
<ref name="BasicBlock"/>
|
1105
|
+
</zeroOrMore>
|
1106
|
+
<zeroOrMore>
|
1107
|
+
<ref name="note"/>
|
1108
|
+
</zeroOrMore>
|
1109
|
+
</group>
|
1110
|
+
<ref name="amend"/>
|
1111
|
+
</choice>
|
1063
1112
|
<zeroOrMore>
|
1064
1113
|
<choice>
|
1065
1114
|
<ref name="clause-subsection"/>
|
@@ -1128,49 +1177,7 @@
|
|
1128
1177
|
</define>
|
1129
1178
|
<define name="annex">
|
1130
1179
|
<element name="annex">
|
1131
|
-
<
|
1132
|
-
<attribute name="id">
|
1133
|
-
<data type="ID"/>
|
1134
|
-
</attribute>
|
1135
|
-
</optional>
|
1136
|
-
<optional>
|
1137
|
-
<attribute name="language"/>
|
1138
|
-
</optional>
|
1139
|
-
<optional>
|
1140
|
-
<attribute name="script"/>
|
1141
|
-
</optional>
|
1142
|
-
<optional>
|
1143
|
-
<attribute name="inline-header">
|
1144
|
-
<data type="boolean"/>
|
1145
|
-
</attribute>
|
1146
|
-
</optional>
|
1147
|
-
<attribute name="obligation">
|
1148
|
-
<choice>
|
1149
|
-
<value>normative</value>
|
1150
|
-
<value>informative</value>
|
1151
|
-
</choice>
|
1152
|
-
</attribute>
|
1153
|
-
<optional>
|
1154
|
-
<ref name="section-title"/>
|
1155
|
-
</optional>
|
1156
|
-
<group>
|
1157
|
-
<group>
|
1158
|
-
<zeroOrMore>
|
1159
|
-
<ref name="BasicBlock"/>
|
1160
|
-
</zeroOrMore>
|
1161
|
-
<zeroOrMore>
|
1162
|
-
<ref name="note"/>
|
1163
|
-
</zeroOrMore>
|
1164
|
-
</group>
|
1165
|
-
<zeroOrMore>
|
1166
|
-
<choice>
|
1167
|
-
<ref name="annex-subsection"/>
|
1168
|
-
<ref name="terms"/>
|
1169
|
-
<ref name="definitions"/>
|
1170
|
-
<ref name="references"/>
|
1171
|
-
</choice>
|
1172
|
-
</zeroOrMore>
|
1173
|
-
</group>
|
1180
|
+
<ref name="Annex-Section"/>
|
1174
1181
|
</element>
|
1175
1182
|
</define>
|
1176
1183
|
<define name="terms">
|
@@ -1456,11 +1463,6 @@
|
|
1456
1463
|
</optional>
|
1457
1464
|
</element>
|
1458
1465
|
</define>
|
1459
|
-
<define name="preface_abstract">
|
1460
|
-
<element name="abstract">
|
1461
|
-
<ref name="Basic-Section"/>
|
1462
|
-
</element>
|
1463
|
-
</define>
|
1464
1466
|
<define name="term-clause">
|
1465
1467
|
<element name="clause">
|
1466
1468
|
<optional>
|
@@ -1510,4 +1512,79 @@
|
|
1510
1512
|
<ref name="CitationType"/>
|
1511
1513
|
</element>
|
1512
1514
|
</define>
|
1515
|
+
<define name="amend">
|
1516
|
+
<element name="amend">
|
1517
|
+
<optional>
|
1518
|
+
<attribute name="id">
|
1519
|
+
<data type="ID"/>
|
1520
|
+
</attribute>
|
1521
|
+
</optional>
|
1522
|
+
<attribute name="change">
|
1523
|
+
<choice>
|
1524
|
+
<value>add</value>
|
1525
|
+
<value>modify</value>
|
1526
|
+
<value>delete</value>
|
1527
|
+
</choice>
|
1528
|
+
</attribute>
|
1529
|
+
<optional>
|
1530
|
+
<attribute name="path"/>
|
1531
|
+
</optional>
|
1532
|
+
<optional>
|
1533
|
+
<attribute name="path_end"/>
|
1534
|
+
</optional>
|
1535
|
+
<optional>
|
1536
|
+
<attribute name="title"/>
|
1537
|
+
</optional>
|
1538
|
+
<optional>
|
1539
|
+
<element name="location">
|
1540
|
+
<zeroOrMore>
|
1541
|
+
<ref name="locality"/>
|
1542
|
+
</zeroOrMore>
|
1543
|
+
</element>
|
1544
|
+
</optional>
|
1545
|
+
<zeroOrMore>
|
1546
|
+
<ref name="autonumber"/>
|
1547
|
+
</zeroOrMore>
|
1548
|
+
<optional>
|
1549
|
+
<element name="description">
|
1550
|
+
<zeroOrMore>
|
1551
|
+
<ref name="BasicBlock"/>
|
1552
|
+
</zeroOrMore>
|
1553
|
+
</element>
|
1554
|
+
</optional>
|
1555
|
+
<optional>
|
1556
|
+
<element name="newcontent">
|
1557
|
+
<zeroOrMore>
|
1558
|
+
<ref name="BasicBlock"/>
|
1559
|
+
</zeroOrMore>
|
1560
|
+
</element>
|
1561
|
+
</optional>
|
1562
|
+
<optional>
|
1563
|
+
<element name="description">
|
1564
|
+
<zeroOrMore>
|
1565
|
+
<ref name="BasicBlock"/>
|
1566
|
+
</zeroOrMore>
|
1567
|
+
</element>
|
1568
|
+
</optional>
|
1569
|
+
</element>
|
1570
|
+
</define>
|
1571
|
+
<define name="autonumber">
|
1572
|
+
<element name="autonumber">
|
1573
|
+
<attribute name="type">
|
1574
|
+
<choice>
|
1575
|
+
<value>requirement</value>
|
1576
|
+
<value>recommendation</value>
|
1577
|
+
<value>permission</value>
|
1578
|
+
<value>table</value>
|
1579
|
+
<value>figure</value>
|
1580
|
+
<value>admonition</value>
|
1581
|
+
<value>formula</value>
|
1582
|
+
<value>sourcecode</value>
|
1583
|
+
<value>example</value>
|
1584
|
+
<value>note</value>
|
1585
|
+
</choice>
|
1586
|
+
</attribute>
|
1587
|
+
<text/>
|
1588
|
+
</element>
|
1589
|
+
</define>
|
1513
1590
|
</grammar>
|
data/lib/asciidoctor/un/un.rng
CHANGED
@@ -340,6 +340,13 @@
|
|
340
340
|
</define>
|
341
341
|
<define name="un-standard">
|
342
342
|
<element name="un-standard">
|
343
|
+
<attribute name="version"/>
|
344
|
+
<attribute name="type">
|
345
|
+
<choice>
|
346
|
+
<value>semantic</value>
|
347
|
+
<value>presentation</value>
|
348
|
+
</choice>
|
349
|
+
</attribute>
|
343
350
|
<ref name="bibdata"/>
|
344
351
|
<optional>
|
345
352
|
<ref name="boilerplate"/>
|