metanorma-unece 0.0.4 → 0.0.5

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: 1884c00a1f3cdb5626d42140dbaf0cc1eba0b94a0b55326fcb61299d748670a5
4
- data.tar.gz: 206c2ff4bd76b1737832bd33d5faefeca07fbaa9e3aeb2ee0da9cdda344c0aef
3
+ metadata.gz: 86e4d49b216c7cf8ee9315034243132870f6c4932257128c8eb3c752ad5a87f5
4
+ data.tar.gz: 92c478095f75b798443b4bd1b2317e2f5492e01b732d2b2d94f7fdc174f1bc63
5
5
  SHA512:
6
- metadata.gz: 0b4bced04b985dbe955927b45a46e0d552a7f4197b8346868e44f058ea04773c3bed8ab504f313ed54a5906253a07ec16cbd13e873dfbf47b0ce70281fc2918c
7
- data.tar.gz: cb3a319050a40edc80909a93eff0d3a7f59aac5e1d94e7f5e0e24381ef13e717486e3d3d45a77befdf987c9434ccbcfadcc47d522fe33681aefb654e5a88a961
6
+ metadata.gz: 490b142dcfd116a872c4f28139b8bd267e576705ba09457148667367053e7b0cd0d5be1dd6f3f7ce7db87326a7883cbb684e8572eaaf0823626ad073b34b88c0
7
+ data.tar.gz: '08e69ccc41508b7ef6495dbbfa6cd17fba5fd2ee826459fc52f2a5e4e135d9ff29b89f94a97a6399b79aa52a66dc46b83e2603fe38251a9fce5cc1fa883f40f4'
data/README.adoc CHANGED
@@ -146,7 +146,8 @@ tables etc, and automatically generating references and citations.
146
146
  === Common attributes
147
147
 
148
148
  The gem relies on Asciidoctor document attributes to provide necessary
149
- metadata about the document. These include:
149
+ metadata about the document. The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
150
+ gem documents the Asciidoctor document attributes common to all metanorma gems. These include:
150
151
 
151
152
  `:edition:`:: The document edition
152
153
 
@@ -166,6 +167,15 @@ document identifier. The permitted types for UNECE are:
166
167
  --
167
168
  recommendation:: UNECE Recommendation
168
169
  plenary:: UNECE Plenary document
170
+ addendum:: Addendum
171
+ communication:: Communication
172
+ corrigendum:: Corrigendum
173
+ reissue:: Reissue (of something)
174
+ agenda:: Documents relating to agendas of principal organs
175
+ budgetary:: Documents relating to programme budget implications
176
+ sec-gen-notes:: Notes by the Secretary-General
177
+ expert-report:: Reports of intergovernmental and expert bodies
178
+ resolution:: Resolutions and other formal decisions of United Nations organs
169
179
  --
170
180
 
171
181
  `:status:``:: The document status. The permitted types are: `proposal`,
@@ -203,21 +213,14 @@ these are otherwise suppressed.
203
213
  `:distribution:`:: Extent of distribution allowed. e.g. `General`
204
214
 
205
215
  [[model_additions]]
206
- == Asciidoctor model additions
216
+ == Asciidoctor features specific to CSAND
207
217
 
208
- Refer also to https://github.com/riboseinc/metanorma-standoc/blob/master/README.adoc; this section lists additions specific only to metanorma-unece
218
+ The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
219
+ gem documents the customisations of Asciidoctor markup common to all metanorma gems.
220
+ The following markup is specific to this gem:
209
221
 
210
222
  === Abstract
211
223
 
212
- A clause is recognised as an abstract if it is prefixed with the `[abstract]` style attribute:
213
-
214
- [source,asciidoctor]
215
- --
216
- [abstract]
217
- == Summary
218
- In 2017, the World Economic Forum approached UN/CEFACT in order to create a guide on Paperless Trade which might help countries to understand and implement specific provisions of the World Trade Organization?~@~Ys Trade Facilitation Agreement, specifically article 10 on Formalities connected with importation and exportation (10.2, 10.3 and 10.4) as well as article 7 on Release and clearance of goods (7.1 and 7.2).
219
- --
220
-
221
224
  Abstracts are moved to the front page in plenary documents. In recommendation documents, they appear in the document preface, before the foreword and introduction.
222
225
 
223
226
  === Paragraph numbering
@@ -115,7 +115,8 @@ module Asciidoctor
115
115
 
116
116
  def doctype(node)
117
117
  d = node.attr("doctype")
118
- unless %w{plenary recommendation}.include? d
118
+ unless %w{plenary recommendation addendum communication corrigendum reissue
119
+ agenda budgetary sec-gen-notes expert-report resolution}.include? d
119
120
  warn "#{d} is not a legal document type: reverting to 'recommendation'"
120
121
  d = "recommendation"
121
122
  end
@@ -744,6 +744,9 @@
744
744
  </define>
745
745
  <define name="preface">
746
746
  <element name="preface">
747
+ <optional>
748
+ <ref name="preface_abstract"/>
749
+ </optional>
747
750
  <ref name="foreword"/>
748
751
  <optional>
749
752
  <ref name="introduction"/>
@@ -811,6 +814,11 @@
811
814
  </optional>
812
815
  </element>
813
816
  </define>
817
+ <define name="preface_abstract">
818
+ <element name="abstract">
819
+ <ref name="Basic-Section"/>
820
+ </element>
821
+ </define>
814
822
  <define name="foreword">
815
823
  <element name="foreword">
816
824
  <ref name="Basic-Section"/>
@@ -138,6 +138,15 @@
138
138
  <choice>
139
139
  <value>recommendation</value>
140
140
  <value>plenary</value>
141
+ <value>addendum</value>
142
+ <value>communication</value>
143
+ <value>corrigendum</value>
144
+ <value>reissue</value>
145
+ <value>agenda</value>
146
+ <value>budgetary</value>
147
+ <value>sec-gen-notes</value>
148
+ <value>expert-report</value>
149
+ <value>resolution</value>
141
150
  </choice>
142
151
  </define>
143
152
  <define name="editorialgroup">
@@ -45,7 +45,7 @@
45
45
  </div>
46
46
 
47
47
  <div class="coverpage-stage-block" >
48
- <p><span class="coverpage-maturity" id="{{ status | replace: ' ', '-' | downcase }}">{{ status }}</span></p>
48
+ <p><span class="coverpage-maturity" id="{{ status | replace: ' ', '-' | downcase }}">{% if unpublished %}{{ status }}{% endif %}</span></p>
49
49
  {% if security %}
50
50
  <p><span class="coverpage-maturity">Classification: {{ security }}</span></p>
51
51
  {% endif %}
@@ -55,7 +55,7 @@
55
55
  <div class="coverpage-stage-block" >{{ revdate }}</div>
56
56
  {% endif %}
57
57
 
58
- {% if status != "Published" and status != "Withdrawn" %}
58
+ {% if unpublished %}
59
59
  <div class="coverpage-warning">
60
60
  <span class="title">Warning for Drafts</span>
61
61
 
@@ -54,6 +54,10 @@ module IsoDoc
54
54
  end
55
55
  end
56
56
 
57
+ def unpublished(status)
58
+ %w(published withdrawn).include? status.downcase
59
+ end
60
+
57
61
  def version(isoxml, _out)
58
62
  super
59
63
  revdate = get[:revdate]
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Unece
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-unece
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-19 00:00:00.000000000 Z
11
+ date: 2018-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor