metanorma-csd 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1ce470be7f803b6bb20de0402662dbe90a1ac0af3ab7ec9ca4c80e1c9820e5d
4
- data.tar.gz: 0d21a09837ff407ff7043e60c8142c40c6e4a9ed110681fa576b1ad6dbaadf15
3
+ metadata.gz: 7627c2e066294a10125980df6ac9f96f7c2ebf368c77317e43036de59abb617d
4
+ data.tar.gz: 1da0618c9fca2472453f0210ad5645e825c3fb7d6d0fe28d6fb6f544892540bf
5
5
  SHA512:
6
- metadata.gz: e4ba4cd31db325d93d9d22eb1b065f0b70951a606231d71eaed1a3584e441096ea057959825e91523b3337d1bae6a0465907e0c209af234a028411883350a9ab
7
- data.tar.gz: 41b9deb6232cffd40daf62239192d62083a21c9d9d9961fc1304178adab7706a9773351154ba3b2669849e3d46b5d4a3248dbe337a9984ff99e92b2c1ed165ae
6
+ metadata.gz: 4e5c0e16d39f15587886c38f0b15504782135f66d2d3009e338df68496bd7fd159ab24e5cd0f3e798790aafcae4572a74f10159375998d45f52f910029726a3a
7
+ data.tar.gz: 8a3bedd76c6ec9c44ab4539ccb28e2e05e38442b453815f6621a80465b9b2964ab2b02424ec496f69698d1aedf6a719ed8a12063ebc38ee0ae11d3d5c53def9b
@@ -384,7 +384,7 @@
384
384
  </define>
385
385
  <define name="LocalityType">
386
386
  <data type="string">
387
- <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|example|volume|issue|locality:[a-zA-Z0-9_]+</param>
387
+ <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|locality:[a-zA-Z0-9_]+</param>
388
388
  </data>
389
389
  </define>
390
390
  <define name="referenceFrom">
@@ -700,8 +700,12 @@
700
700
  <ref name="btitle"/>
701
701
  <ref name="formattedref"/>
702
702
  </choice>
703
- <ref name="bplace"/>
704
- <ref name="seriesorganization"/>
703
+ <optional>
704
+ <ref name="bplace"/>
705
+ </optional>
706
+ <optional>
707
+ <ref name="seriesorganization"/>
708
+ </optional>
705
709
  <optional>
706
710
  <ref name="abbreviation"/>
707
711
  </optional>
@@ -1,6 +1,7 @@
1
1
  require "asciidoctor"
2
2
  require "asciidoctor/csd/version"
3
- require "isodoc/csd/csdconvert"
3
+ require "isodoc/csd/html_convert"
4
+ require "isodoc/csd/word_convert"
4
5
  require "asciidoctor/standoc/converter"
5
6
 
6
7
  module Asciidoctor
@@ -15,7 +16,6 @@ module Asciidoctor
15
16
 
16
17
  def initialize(backend, opts)
17
18
  super
18
- warn "The asciidoctor-csd gem has been deprecated and has been replaced by metanorma-csd"
19
19
  end
20
20
 
21
21
  def metadata_author(node, xml)
@@ -113,6 +113,7 @@ module Asciidoctor
113
113
  gsub(%r{^.*/}, "")
114
114
  File.open(filename, "w") { |f| f.write(ret) }
115
115
  html_converter(node).convert filename
116
+ word_converter(node).convert filename
116
117
  pdf_convert(filename.sub(/\.xml$/, ""))
117
118
  end
118
119
  @files_to_delete.each { |f| system "rm #{f}" }
@@ -149,6 +150,10 @@ module Asciidoctor
149
150
  IsoDoc::Csd::HtmlConvert.new(html_extract_attributes(node))
150
151
  end
151
152
 
153
+ def word_converter(node)
154
+ IsoDoc::Csd::WordConvert.new(doc_extract_attributes(node))
155
+ end
156
+
152
157
  def inline_quoted(node)
153
158
  noko do |xml|
154
159
  case node.type
@@ -17,6 +17,9 @@
17
17
  </define>
18
18
  <define name="docidentifier">
19
19
  <element name="docidentifier">
20
+ <optional>
21
+ <attribute name="type"/>
22
+ </optional>
20
23
  <text/>
21
24
  </element>
22
25
  </define>
@@ -956,6 +956,11 @@
956
956
  </define>
957
957
  <define name="li">
958
958
  <element name="li">
959
+ <optional>
960
+ <attribute name="id">
961
+ <data type="ID"/>
962
+ </attribute>
963
+ </optional>
959
964
  <oneOrMore>
960
965
  <ref name="paragraph-with-footnote"/>
961
966
  </oneOrMore>
@@ -999,7 +1004,9 @@
999
1004
  </define>
1000
1005
  <define name="dt">
1001
1006
  <element name="dt">
1002
- <ref name="TextElement"/>
1007
+ <zeroOrMore>
1008
+ <ref name="TextElement"/>
1009
+ </zeroOrMore>
1003
1010
  </element>
1004
1011
  </define>
1005
1012
  <define name="dd">
@@ -20,6 +20,9 @@
20
20
  <!-- add type to docidentifier in isodoc? -->
21
21
  <define name="docidentifier">
22
22
  <element name="docidentifier">
23
+ <optional>
24
+ <attribute name="type"/>
25
+ </optional>
23
26
  <choice>
24
27
  <text/>
25
28
  <group>
@@ -108,6 +111,27 @@
108
111
  <zeroOrMore>
109
112
  <ref name="docrelation"/>
110
113
  </zeroOrMore>
114
+ <zeroOrMore>
115
+ <ref name="series"/>
116
+ </zeroOrMore>
117
+ <optional>
118
+ <ref name="medium"/>
119
+ </optional>
120
+ <zeroOrMore>
121
+ <ref name="bplace"/>
122
+ </zeroOrMore>
123
+ <zeroOrMore>
124
+ <ref name="extent"/>
125
+ </zeroOrMore>
126
+ <zeroOrMore>
127
+ <ref name="accesslocation"/>
128
+ </zeroOrMore>
129
+ <optional>
130
+ <ref name="bclassification"/>
131
+ </optional>
132
+ <optional>
133
+ <ref name="validity"/>
134
+ </optional>
111
135
  <optional>
112
136
  <ref name="editorialgroup"/>
113
137
  </optional>
@@ -164,6 +188,27 @@
164
188
  <zeroOrMore>
165
189
  <ref name="docrelation"/>
166
190
  </zeroOrMore>
191
+ <zeroOrMore>
192
+ <ref name="series"/>
193
+ </zeroOrMore>
194
+ <optional>
195
+ <ref name="medium"/>
196
+ </optional>
197
+ <zeroOrMore>
198
+ <ref name="bplace"/>
199
+ </zeroOrMore>
200
+ <zeroOrMore>
201
+ <ref name="extent"/>
202
+ </zeroOrMore>
203
+ <zeroOrMore>
204
+ <ref name="accesslocation"/>
205
+ </zeroOrMore>
206
+ <optional>
207
+ <ref name="bclassification"/>
208
+ </optional>
209
+ <optional>
210
+ <ref name="validity"/>
211
+ </optional>
167
212
  <ref name="editorialgroup"/>
168
213
  <zeroOrMore>
169
214
  <ref name="ics"/>
@@ -548,10 +593,17 @@
548
593
  </define>
549
594
  <define name="li">
550
595
  <element name="li">
551
- <oneOrMore>
552
- <!-- ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | quote | sourcecode | review | example )+ -->
553
- <ref name="BasicBlock"/>
554
- </oneOrMore>
596
+ <group>
597
+ <optional>
598
+ <!-- ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | quote | sourcecode | review | example )+ -->
599
+ <attribute name="id">
600
+ <data type="ID"/>
601
+ </attribute>
602
+ </optional>
603
+ <oneOrMore>
604
+ <ref name="BasicBlock"/>
605
+ </oneOrMore>
606
+ </group>
555
607
  <!-- exclude figures? -->
556
608
  </element>
557
609
  </define>
@@ -859,7 +911,7 @@
859
911
  </element>
860
912
  </define>
861
913
  <define name="allParts">
862
- <element name="allParts">
914
+ <element name="allparts">
863
915
  <data type="boolean"/>
864
916
  </element>
865
917
  </define>
@@ -947,17 +999,13 @@
947
999
  <optional>
948
1000
  <ref name="section-title"/>
949
1001
  </optional>
950
- <choice>
951
- <oneOrMore>
1002
+ <zeroOrMore>
1003
+ <choice>
952
1004
  <ref name="term-clause"/>
953
- </oneOrMore>
954
- <zeroOrMore>
955
- <choice>
956
- <ref name="terms"/>
957
- <ref name="definitions"/>
958
- </choice>
959
- </zeroOrMore>
960
- </choice>
1005
+ <ref name="terms"/>
1006
+ <ref name="definitions"/>
1007
+ </choice>
1008
+ </zeroOrMore>
961
1009
  </element>
962
1010
  </define>
963
1011
  <define name="reference-clause">
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Csd
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
@@ -1,16 +1,15 @@
1
- p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode
1
+ p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode, pre
2
2
  {mso-style-unhide:no;
3
3
  mso-style-qformat:yes;
4
4
  mso-style-parent:"";
5
- margin-top:0cm;
5
+ margin-top:6.0pt;
6
6
  margin-right:0cm;
7
- margin-bottom:12.0pt;
7
+ margin-bottom:6.0pt;
8
8
  margin-left:0cm;
9
9
  text-align:left;
10
- line-height:12.0pt;
11
10
  mso-pagination:widow-orphan;
12
- tab-stops:20.15pt;
13
- font-size:9.0pt;
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;
14
13
  font-family:$monospacefont;
15
14
  mso-fareast-font-family:Calibri;
16
15
  mso-bidi-font-family:"Courier New";
@@ -27,7 +26,8 @@ p.Biblio, li.Biblio, div.Biblio, p.NormRef, li.NormRef, div.NormRef
27
26
  tab-stops: 33.15pt;
28
27
  line-height:12.0pt;
29
28
  mso-pagination:widow-orphan;
30
- font-size:11.0pt;
29
+ font-size:10.5pt;
30
+ font-weight:normal;
31
31
  font-family:$bodyfont;
32
32
  mso-fareast-font-family:$bodyfont;
33
33
  mso-bidi-font-family:$bodyfont;
@@ -242,7 +242,7 @@ p.zzCopyright, li.zzCopyright
242
242
  tab-stops:20.15pt 25.7pt 481.15pt;
243
243
  padding:0cm;
244
244
  mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
245
- font-size:11.0pt;
245
+ font-size:10.5pt;
246
246
  font-family:$bodyfont;
247
247
  mso-fareast-font-family:$bodyfont;
248
248
  mso-bidi-font-family:$bodyfont;
@@ -323,13 +323,27 @@ p.Quote, li.Quote, div.Quote
323
323
  line-height:12.0pt;
324
324
  mso-pagination:widow-orphan;
325
325
  tab-stops:20.15pt;
326
- font-size:11.0pt;
326
+ font-size:10.5pt;
327
327
  font-family:$bodyfont;
328
328
  mso-fareast-font-family:$bodyfont;
329
329
  mso-bidi-font-family:$bodyfont;
330
330
  mso-ansi-language:EN-GB;}
331
331
  p.QuoteAttribution
332
- {text-align:right;}
332
+ {text-align:right;
333
+ mso-style-priority:99;
334
+ margin-top:0cm;
335
+ margin-right:36.0pt;
336
+ margin-bottom:0cm;
337
+ margin-left:36.0pt;
338
+ line-height:12.0pt;
339
+ mso-pagination:widow-orphan;
340
+ tab-stops:20.15pt;
341
+ font-size:10.5pt;
342
+ font-family:$bodyfont;
343
+ mso-fareast-font-family:$bodyfont;
344
+ mso-bidi-font-family:$bodyfont;
345
+ mso-ansi-language:EN-GB;
346
+ }
333
347
  p.Admonition, li.Admonition, div.Admonition
334
348
  {mso-style-priority:99;
335
349
  margin-top:0cm;
@@ -384,7 +398,7 @@ p.Formula, li.Formula, div.Formula
384
398
  line-height:12.0pt;
385
399
  mso-pagination:widow-orphan;
386
400
  tab-stops:right 487.45pt;
387
- font-size:11.0pt;
401
+ font-size:10.5pt;
388
402
  font-family:$bodyfont;
389
403
  mso-fareast-font-family:$bodyfont;
390
404
  mso-bidi-font-family:$bodyfont;
@@ -495,7 +509,8 @@ dt
495
509
  font-size:14.0pt;
496
510
  font-weight:bold;}
497
511
  .coverpage_techcommittee
498
- {text-align:center;}
512
+ {text-align:center;
513
+ font-size:12.0pt}
499
514
  .coverpage_docstage
500
515
  {text-align:center;
501
516
  font-size:30.0pt;
@@ -505,6 +520,7 @@ div.coverpage_warning
505
520
  border:solid windowtext 1.0pt #485094;
506
521
  mso-border-alt:solid windowtext .5pt;
507
522
  padding:1.0pt 4.0pt 1.0pt 4.0pt #485094;
523
+ font-size:10.0pt;
508
524
  margin-left:4.25pt;
509
525
  margin-right:4.25pt}
510
526
  .coverpage_warning
@@ -1,12 +1,12 @@
1
- <div class="document-stage-band" id="{{ status }}-band">
1
+ <div class="document-stage-band" id="{{ doctype | replace: ' ', '-' | downcase }}-band">
2
2
  <p class="document-stage">{{ status }}</p>
3
3
  </div>
4
4
 
5
- <div class="document-type-band" id="{{ doctype }}-band">
5
+ <div class="document-type-band" id="{{ doctype | replace: ' ', '-' | downcase }}-band">
6
6
  <p class="document-type">Calconnect {{ doctype }}</p>
7
7
  </div>
8
-
9
-
8
+
9
+
10
10
 
11
11
  <div id='toggle'> <span>•</span> </div>
12
12
 
@@ -619,9 +619,12 @@ p.Biblio, p.NormRef {
619
619
  3.8 Examples
620
620
  */
621
621
 
622
- .example {
622
+ table.example {
623
623
  background-color: #e1eef1;
624
- padding: 1.2em;
624
+ }
625
+
626
+ td.example {
627
+ padding: 0 1em 0 1em;
625
628
  margin: 2em 0 1em 0;
626
629
  }
627
630
 
@@ -0,0 +1,17 @@
1
+ <div style='mso-element:para-border-div;border:solid windowtext 1.0pt;
2
+ border-bottom:none;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:
3
+ solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 0cm 4.0pt;
4
+ margin-left:5.1pt;margin-right:5.1pt'>
5
+
6
+ <p class="zzCopyright" align="left" style='margin-top:2.0pt;margin-right:0cm;
7
+ margin-bottom:12.0pt;margin-left:0cm;text-align:left;page-break-before:always;
8
+ mso-layout-grid-align:none;text-autospace:none;border:none;mso-border-top-alt:
9
+ solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-right-alt:
10
+ solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 0cm 4.0pt'><span
11
+ lang="EN-GB" style='color:windowtext'>© {{ agency }} {{ docyear }}.<o:p></o:p></span></p>
12
+
13
+ </div>
14
+
15
+ <p class="zzContents" style='margin-top:0cm'><span lang="EN-GB">Contents</span></p>
16
+
17
+ WORDTOC
@@ -0,0 +1,69 @@
1
+ <p class="MsoNormal" align="right" style='text-align:right'><b style='mso-bidi-font-weight:
2
+ normal'><span lang="EN-GB" style='font-size:14.0pt;mso-no-proof:yes'>{{ docnumber }}:{{ docyear }} {{ draftinfo }}</span></b><b
3
+ style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:14.0pt'><o:p></o:p></span></b></p>
4
+
5
+ <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
6
+ style='mso-no-proof:yes'>CalConnect&nbsp;</span><span lang="EN-GB"><span
7
+ style='mso-no-proof:yes'>{{ tc | join: "/" }}</span></p>
8
+
9
+ <p class="MsoNormal" align="center" style='text-align:center;line-height:18.0pt;margin-bottom:0.0pt'><b
10
+ style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:24.0pt'>{{ doctitle }}</span>
11
+ </b><br/><span lang="EN-GB" style='font-size:16.0pt'>{{ docsubtitle }}</span></p>
12
+
13
+ <p class="MsoNormal" style='margin-top:100.0pt'><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
14
+
15
+ <div style='mso-element:para-border-div;border:solid windowtext 1.0pt;
16
+ mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;
17
+ margin-left:4.25pt;margin-right:4.25pt'>
18
+
19
+ <p class="MsoNormal" align="center" style='text-align:center;border:none;
20
+ mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span
21
+ lang="EN-GB" style='font-size:16.0pt'>{{ status }} {{ doctype }}</span></p>
22
+
23
+ {% if doctype == "Policy And Procedures" or doctype == "Proposal" %}
24
+ <p class="MsoNormal" align="center" style='text-align:center;border:none;
25
+ mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span
26
+ lang="EN-GB" style='font-size:16.0pt'>{{ revdate }}<o:p></o:p></span></p>
27
+ {% endif %}
28
+ </div>
29
+
30
+ <p class="MsoNormal" style='margin-bottom:6.0pt'><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
31
+
32
+ <div style='mso-element:para-border-div;border:solid windowtext 1.0pt;
33
+ mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;
34
+ margin-left:4.25pt;margin-right:4.25pt'>
35
+
36
+ {% if status != "Published" and status != "Withdrawn" %}
37
+ <p class="MsoNormal" align="center" style='margin-bottom:6.0pt;text-align:center;
38
+ border:none;mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:
39
+ 1.0pt 4.0pt 1.0pt 4.0pt'><b style='mso-bidi-font-weight:normal'><span
40
+ lang="EN-GB" style='font-size:10.0pt;mso-bidi-font-size:11.0pt'>Warning for drafts<o:p></o:p></span></b></p>
41
+
42
+ <p class="MsoNormal" style='margin-bottom:6.0pt;border:none;mso-border-alt:solid windowtext .5pt;
43
+ padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span lang="EN-GB"
44
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt;mso-bidi-font-weight:bold'>This document
45
+ is not a CalConnect Standard. It is distributed for review and
46
+ comment, and is subject to change without notice and may not be referred to as
47
+ a Standard. Recipients of this draft are invited to submit, with their
48
+ comments, notification of any relevant patent rights of which they are aware
49
+ and to provide supporting documentation.<o:p></o:p></span></p>
50
+
51
+ <p class="MsoNormal" style='border:none;mso-border-alt:solid windowtext .5pt;
52
+ padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span lang="EN-GB"
53
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt;mso-bidi-font-weight:bold'>Recipients
54
+ of this draft are invited to submit, with their comments, notification of any
55
+ relevant patent rights of which they are aware and to provide supporting
56
+ documentation.</span><span lang="EN-GB" style='font-size:10.0pt;mso-bidi-font-size:
57
+ 11.0pt'><o:p></o:p></span></p>
58
+
59
+ {% endif %}
60
+
61
+ </div>
62
+
63
+ <p class="MsoNormal" align="center" style='text-align:center'><span lang="EN-GB"
64
+ style='mso-no-proof:yes'>The Calendaring and Scheduling Consortium, Inc.&nbsp;</span><span lang="EN-GB"><span
65
+ style='mso-no-proof:yes'>{{ docyear }}</span></p>
66
+
67
+
68
+
69
+