metanorma-iec 0.1.1 → 0.1.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 +4 -4
- data/README.adoc +2 -5
- data/lib/asciidoctor/iec/basicdoc.rng +3 -0
- data/lib/asciidoctor/iec/biblio.rng +10 -3
- data/lib/asciidoctor/iec/converter.rb +8 -0
- data/lib/asciidoctor/iec/isostandard.rng +3 -1
- data/lib/metanorma/iec/version.rb +1 -1
- data/spec/asciidoctor-iec/table_spec.rb +5 -5
- data/spec/isodoc/postproc_spec.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48263a7614294561a2577b0e4ba1cc0b7e059ca9828d17c74c463a6c844fe0cd
|
|
4
|
+
data.tar.gz: 7e07b0cd665b25c1f53d69df8f8468e0ea94aa295450611e997165c6b8a01c8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11d8b762d159293e32cdc2d71d539eaa728c5e89788a8ed628e03f56af35f79dfe91d6a2327b7879934e76a4e602b21692171fae2b943f71e081656392313cb0
|
|
7
|
+
data.tar.gz: b206a77da3013cfbf41f5e886575cb4a9cb13013b69f015d4e68c6253047643dff7d2640fb61c1d2da5dcc21d501fc8839ad5238add7badfb2990eec675f98ab
|
data/README.adoc
CHANGED
|
@@ -77,11 +77,8 @@ Please refer to the Metanorma-ISO documentation for general documentation.
|
|
|
77
77
|
|
|
78
78
|
See https://www.metanorma.com/author/iso/[Write ISO documents with Metanorma]
|
|
79
79
|
|
|
80
|
-
////
|
|
81
80
|
== Examples
|
|
82
81
|
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* link:spec/examples/rfc6350.doc[] is a Word document generated from the Asciidoctor.
|
|
86
|
-
////
|
|
82
|
+
* Example documents are avalable at the https://github.com/metanorma/mn-samples-iec[mn-samples-iec] repository.
|
|
83
|
+
* Document templates are available at the https://github.com/metanorma/mn-templates-iec[mn-templates-iec] repository.
|
|
87
84
|
|
|
@@ -278,10 +278,12 @@
|
|
|
278
278
|
</define>
|
|
279
279
|
<define name="organization">
|
|
280
280
|
<element name="organization">
|
|
281
|
-
<
|
|
282
|
-
|
|
281
|
+
<oneOrMore>
|
|
282
|
+
<ref name="orgname"/>
|
|
283
|
+
</oneOrMore>
|
|
284
|
+
<zeroOrMore>
|
|
283
285
|
<ref name="subdivision"/>
|
|
284
|
-
</
|
|
286
|
+
</zeroOrMore>
|
|
285
287
|
<optional>
|
|
286
288
|
<ref name="abbreviation"/>
|
|
287
289
|
</optional>
|
|
@@ -357,6 +359,9 @@
|
|
|
357
359
|
</define>
|
|
358
360
|
<define name="phone">
|
|
359
361
|
<element name="phone">
|
|
362
|
+
<optional>
|
|
363
|
+
<attribute name="type"/>
|
|
364
|
+
</optional>
|
|
360
365
|
<text/>
|
|
361
366
|
</element>
|
|
362
367
|
</define>
|
|
@@ -1024,6 +1029,8 @@
|
|
|
1024
1029
|
<value>correctedBy</value>
|
|
1025
1030
|
<value>revises</value>
|
|
1026
1031
|
<value>revisedBy</value>
|
|
1032
|
+
<value>describes</value>
|
|
1033
|
+
<value>describedBy</value>
|
|
1027
1034
|
</choice>
|
|
1028
1035
|
</define>
|
|
1029
1036
|
<define name="docrelation">
|
|
@@ -39,6 +39,14 @@ module Asciidoctor
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
def iso_id(node, xml)
|
|
43
|
+
return unless node.attr("docnumber")
|
|
44
|
+
part, subpart = node&.attr("partnumber")&.split(/-/)
|
|
45
|
+
dn = add_id_parts(node.attr("docnumber"), part, subpart)
|
|
46
|
+
dn = id_stage_prefix(dn, node)
|
|
47
|
+
xml.docidentifier dn, **attr_code(type: "iso")
|
|
48
|
+
end
|
|
49
|
+
|
|
42
50
|
def make_preface(x, s)
|
|
43
51
|
s.previous = boilerplate(x)
|
|
44
52
|
super
|
|
@@ -130,14 +130,14 @@ RSpec.describe Asciidoctor::Iec do
|
|
|
130
130
|
| Husked rice, parboiled | 1,0 | 1,0 | Not applicable | 1,0
|
|
131
131
|
| Milled rice, parboiled | 1,0 | 1,0 | 1,0 | Not applicable
|
|
132
132
|
| Chips | 0,1 | 0,1 | 0,1 | 0,1
|
|
133
|
-
| HDK | 2,0
|
|
133
|
+
| HDK | 2,0 footnote:defectsmass[The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.] | 2,0 | 2,0 footnote:defectsmass[] | 2,0
|
|
134
134
|
| Damaged kernels | 4,0 | 3,0 | 4,0 | 3,0
|
|
135
135
|
| Immature and/or malformed kernels | 8,0 | 2,0 | 8,0 | 2,0
|
|
136
|
-
| Chalky kernels | 5,0
|
|
137
|
-
| Red kernels and red-streaked kernels | 12,0 | 12,0 | 12,0
|
|
138
|
-
| Partly gelatinized kernels | Not applicable | Not applicable | 11,0
|
|
136
|
+
| Chalky kernels | 5,0 footnote:defectsmass[] | 5,0 | Not applicable | Not applicable
|
|
137
|
+
| Red kernels and red-streaked kernels | 12,0 | 12,0 | 12,0 footnote:defectsmass[] | 12,0
|
|
138
|
+
| Partly gelatinized kernels | Not applicable | Not applicable | 11,0 footnote:defectsmass[] | 11,0
|
|
139
139
|
| Pecks | Not applicable | Not applicable | 4,0 | 2,0
|
|
140
|
-
| Waxy rice | 1,0
|
|
140
|
+
| Waxy rice | 1,0 footnote:defectsmass[] | 1,0 | 1,0 footnote:defectsmass[] | 1,0
|
|
141
141
|
|
|
142
142
|
5+a| Live insects shall not be present. Dead insects shall be included in extraneous matter.
|
|
143
143
|
|===
|
|
@@ -264,7 +264,8 @@ RSpec.describe IsoDoc do
|
|
|
264
264
|
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
|
265
265
|
</p>
|
|
266
266
|
<div class="Section3"><a name="P" id="P"></a>
|
|
267
|
-
<p class="Sourcecode"><a name="A" id="A"></a>puts "Hello, world."</p>
|
|
267
|
+
<p class="Sourcecode" style='page-break-after:avoid;'><a name="A" id="A"></a>puts "Hello, world."</p>
|
|
268
|
+
<p class='SourceTitle' style='text-align:center;'>Figure A.1</p>
|
|
268
269
|
<p class="TableTitle" style="text-align:center;">Table A.1</p>
|
|
269
270
|
<div align='center' class='table_container'>
|
|
270
271
|
<table class='MsoISOTable' style='mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
|
|
@@ -272,7 +273,8 @@ RSpec.describe IsoDoc do
|
|
|
272
273
|
<tbody>
|
|
273
274
|
<tr>
|
|
274
275
|
<td style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;" class="TABLE-cell">
|
|
275
|
-
<p class="CODE-TableCell"><a name="B" id="B"></a>puts "Hello, world."</p>
|
|
276
|
+
<p class="CODE-TableCell" style='page-break-after:avoid;'><a name="B" id="B"></a>puts "Hello, world."</p>
|
|
277
|
+
<p class='SourceTitle' style='text-align:center;'>Figure A.2</p>
|
|
276
278
|
</td>
|
|
277
279
|
</tr>
|
|
278
280
|
</tbody>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-iec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-12-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ruby-jing
|