metanorma-iec 1.0.3 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +8 -7
- data/.github/workflows/ubuntu.yml +12 -9
- data/.github/workflows/windows.yml +8 -8
- data/lib/asciidoctor/iec/biblio.rng +142 -37
- data/lib/asciidoctor/iec/converter.rb +22 -130
- data/lib/asciidoctor/iec/front.rb +220 -0
- data/lib/asciidoctor/iec/isodoc.rng +48 -2
- data/lib/asciidoctor/iec/isostandard.rng +17 -1
- data/lib/isodoc/iec/base_convert.rb +157 -0
- data/lib/isodoc/iec/html/htmlstyle.scss +11 -8
- data/lib/isodoc/iec/html/isodoc.scss +15 -9
- data/lib/isodoc/iec/html/scripts.html +23 -21
- data/lib/isodoc/iec/html/wordstyle.scss +0 -3
- data/lib/isodoc/iec/html_convert.rb +8 -0
- data/lib/isodoc/iec/i18n-en.yaml +2 -0
- data/lib/isodoc/iec/i18n-fr.yaml +2 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +4133 -0
- data/lib/isodoc/iec/metadata.rb +3 -52
- data/lib/isodoc/iec/pdf_convert.rb +31 -0
- data/lib/isodoc/iec/word_convert.rb +17 -6
- data/lib/metanorma-iec.rb +1 -0
- data/lib/metanorma/iec/processor.rb +12 -1
- data/lib/metanorma/iec/version.rb +1 -1
- data/spec/asciidoctor-iec/base_spec.rb +20 -29
- data/spec/asciidoctor-iec/blocks_spec.rb +15 -7
- data/spec/asciidoctor-iec/cleanup_spec.rb +13 -7
- data/spec/asciidoctor-iec/iev_spec.rb +161 -0
- data/spec/asciidoctor-iec/inline_spec.rb +2 -1
- data/spec/asciidoctor-iec/section_spec.rb +8 -8
- data/spec/assets/iso.xml +65 -2
- data/spec/examples/rice.html +5 -5
- data/spec/examples/rice_img/rice_image1.png +0 -0
- data/spec/examples/rice_img/rice_image2.png +0 -0
- data/spec/examples/rice_img/rice_image3_1.png +0 -0
- data/spec/examples/rice_img/rice_image3_2.png +0 -0
- data/spec/examples/rice_img/rice_image3_3.png +0 -0
- data/spec/isodoc/blocks_spec.rb +160 -0
- data/spec/isodoc/i18n_spec.rb +15 -22
- data/spec/isodoc/iev_spec.rb +360 -0
- data/spec/isodoc/inline_spec.rb +2 -2
- data/spec/isodoc/iso_spec.rb +2 -19
- data/spec/isodoc/metadata_spec.rb +92 -9
- data/spec/isodoc/postproc_spec.rb +8 -2
- data/spec/isodoc/ref_spec.rb +249 -0
- data/spec/isodoc/section_spec.rb +49 -14
- data/spec/isodoc/terms_spec.rb +2 -2
- data/spec/metanorma/processor_spec.rb +3 -3
- data/spec/spec_helper.rb +3 -2
- metadata +14 -2
@@ -0,0 +1,161 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "fileutils"
|
3
|
+
|
4
|
+
RSpec.describe Asciidoctor::Iec do
|
5
|
+
it "generates reference boilerplate for IEV" do
|
6
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
7
|
+
= Document title
|
8
|
+
Author
|
9
|
+
:docfile: test.adoc
|
10
|
+
:nodoc:
|
11
|
+
:novalid:
|
12
|
+
:no-isobib:
|
13
|
+
:docnumber: 60050
|
14
|
+
|
15
|
+
[bibliography]
|
16
|
+
== Normative References
|
17
|
+
|
18
|
+
* [[[A,B]]], _TITLE_
|
19
|
+
INPUT
|
20
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
21
|
+
<iec-standard xmlns='https://www.metanorma.org/ns/iec'>
|
22
|
+
<bibdata type='standard'>
|
23
|
+
<docidentifier type='iso'>IEC 60050 ED 1</docidentifier>
|
24
|
+
<docnumber>60050</docnumber>
|
25
|
+
<contributor>
|
26
|
+
<role type='author'/>
|
27
|
+
<organization>
|
28
|
+
<name>International Electrotechnical Commission</name>
|
29
|
+
<abbreviation>IEC</abbreviation>
|
30
|
+
</organization>
|
31
|
+
</contributor>
|
32
|
+
<contributor>
|
33
|
+
<role type='publisher'/>
|
34
|
+
<organization>
|
35
|
+
<name>International Electrotechnical Commission</name>
|
36
|
+
<abbreviation>IEC</abbreviation>
|
37
|
+
</organization>
|
38
|
+
</contributor>
|
39
|
+
<language>en</language>
|
40
|
+
<script>Latn</script>
|
41
|
+
<status>
|
42
|
+
<stage abbreviation="PPUB">60</stage>
|
43
|
+
<substage abbreviation="PPUB">60</substage>
|
44
|
+
</status>
|
45
|
+
<copyright>
|
46
|
+
<from>2020</from>
|
47
|
+
<owner>
|
48
|
+
<organization>
|
49
|
+
<name>International Electrotechnical Commission</name>
|
50
|
+
<abbreviation>IEC</abbreviation>
|
51
|
+
</organization>
|
52
|
+
</owner>
|
53
|
+
</copyright>
|
54
|
+
<ext>
|
55
|
+
<doctype>article</doctype>
|
56
|
+
<editorialgroup>
|
57
|
+
<technical-committee/>
|
58
|
+
<subcommittee/>
|
59
|
+
<workgroup/>
|
60
|
+
</editorialgroup>
|
61
|
+
<structuredidentifier>
|
62
|
+
<project-number>IEC 60050</project-number>
|
63
|
+
</structuredidentifier>
|
64
|
+
<stagename>International standard</stagename>
|
65
|
+
</ext>
|
66
|
+
</bibdata>
|
67
|
+
#{BOILERPLATE}
|
68
|
+
<sections> </sections>
|
69
|
+
<bibliography>
|
70
|
+
<references id='_' obligation='informative' normative="true">
|
71
|
+
<title>Normative References</title>
|
72
|
+
<p id='_'>There are no normative references in this document.</p>
|
73
|
+
<bibitem id='A'>
|
74
|
+
<formattedref format='application/x-isodoc+xml'>
|
75
|
+
<em>TITLE</em>
|
76
|
+
</formattedref>
|
77
|
+
<docidentifier>B</docidentifier>
|
78
|
+
</bibitem>
|
79
|
+
</references>
|
80
|
+
</bibliography>
|
81
|
+
</iec-standard>
|
82
|
+
OUTPUT
|
83
|
+
end
|
84
|
+
|
85
|
+
it "generates terms boilerplate for IEV" do
|
86
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
87
|
+
= Document title
|
88
|
+
Author
|
89
|
+
:docfile: test.adoc
|
90
|
+
:nodoc:
|
91
|
+
:novalid:
|
92
|
+
:no-isobib:
|
93
|
+
:docnumber: 60050
|
94
|
+
|
95
|
+
== Terms and definitions
|
96
|
+
=== General
|
97
|
+
==== Term 1
|
98
|
+
INPUT
|
99
|
+
<iec-standard xmlns='https://www.metanorma.org/ns/iec'>
|
100
|
+
<bibdata type='standard'>
|
101
|
+
<docidentifier type='iso'>IEC 60050 ED 1</docidentifier>
|
102
|
+
<docnumber>60050</docnumber>
|
103
|
+
<contributor>
|
104
|
+
<role type='author'/>
|
105
|
+
<organization>
|
106
|
+
<name>International Electrotechnical Commission</name>
|
107
|
+
<abbreviation>IEC</abbreviation>
|
108
|
+
</organization>
|
109
|
+
</contributor>
|
110
|
+
<contributor>
|
111
|
+
<role type='publisher'/>
|
112
|
+
<organization>
|
113
|
+
<name>International Electrotechnical Commission</name>
|
114
|
+
<abbreviation>IEC</abbreviation>
|
115
|
+
</organization>
|
116
|
+
</contributor>
|
117
|
+
<language>en</language>
|
118
|
+
<script>Latn</script>
|
119
|
+
<status>
|
120
|
+
<stage abbreviation="PPUB">60</stage>
|
121
|
+
<substage abbreviation="PPUB">60</substage>
|
122
|
+
</status>
|
123
|
+
<copyright>
|
124
|
+
<from>2020</from>
|
125
|
+
<owner>
|
126
|
+
<organization>
|
127
|
+
<name>International Electrotechnical Commission</name>
|
128
|
+
<abbreviation>IEC</abbreviation>
|
129
|
+
</organization>
|
130
|
+
</owner>
|
131
|
+
</copyright>
|
132
|
+
<ext>
|
133
|
+
<doctype>article</doctype>
|
134
|
+
<editorialgroup>
|
135
|
+
<technical-committee/>
|
136
|
+
<subcommittee/>
|
137
|
+
<workgroup/>
|
138
|
+
</editorialgroup>
|
139
|
+
<structuredidentifier>
|
140
|
+
<project-number>IEC 60050</project-number>
|
141
|
+
</structuredidentifier>
|
142
|
+
<stagename>International standard</stagename>
|
143
|
+
</ext>
|
144
|
+
</bibdata>
|
145
|
+
#{BOILERPLATE}
|
146
|
+
<sections>
|
147
|
+
<clause id='_' obligation='normative'>
|
148
|
+
<title>Terms and definitions</title>
|
149
|
+
<terms id='_' obligation='normative'>
|
150
|
+
<title>General</title>
|
151
|
+
<term id='term-term-1'>
|
152
|
+
<preferred>Term 1</preferred>
|
153
|
+
</term>
|
154
|
+
</terms>
|
155
|
+
</clause>
|
156
|
+
</sections>
|
157
|
+
</iec-standard>
|
158
|
+
|
159
|
+
OUTPUT
|
160
|
+
end
|
161
|
+
end
|
@@ -127,7 +127,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
127
127
|
#{BLANK_HDR}
|
128
128
|
<sections>
|
129
129
|
|
130
|
-
</sections><bibliography><references id="_" obligation="informative">
|
130
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
131
131
|
<title>Normative References</title>
|
132
132
|
<p id="_">The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
|
133
133
|
<bibitem id="ISO712">
|
@@ -137,6 +137,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
137
137
|
<bibitem id="ISO713">
|
138
138
|
<formattedref format="application/x-isodoc+xml">Reference</formattedref>
|
139
139
|
<docidentifier>ISO713</docidentifier>
|
140
|
+
<docnumber>713</docnumber>
|
140
141
|
</bibitem>
|
141
142
|
</references>
|
142
143
|
</bibliography>
|
@@ -69,7 +69,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
69
69
|
<title>Terms and definitions</title>
|
70
70
|
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
71
71
|
#{TERMS_BOILERPLATE}
|
72
|
-
<term id="
|
72
|
+
<term id="term-term1">
|
73
73
|
<preferred>Term1</preferred>
|
74
74
|
</term>
|
75
75
|
</terms>
|
@@ -94,7 +94,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
94
94
|
</p>
|
95
95
|
</li>
|
96
96
|
</ul>
|
97
|
-
<term id="
|
97
|
+
<term id="term-term2">
|
98
98
|
<preferred>Term2</preferred>
|
99
99
|
</term>
|
100
100
|
</terms>
|
@@ -118,11 +118,11 @@ RSpec.describe Asciidoctor::Iec do
|
|
118
118
|
</clause>
|
119
119
|
<appendix id="_" inline-header="false" obligation="normative">
|
120
120
|
<title>Appendix 1</title>
|
121
|
-
</appendix></annex><bibliography><references id="_" obligation="informative">
|
121
|
+
</appendix></annex><bibliography><references id="_" obligation="informative" normative="true">
|
122
122
|
<title>Normative References</title><p id="_">There are no normative references in this document.</p>
|
123
123
|
</references><clause id="_" obligation="informative">
|
124
124
|
<title>Bibliography</title>
|
125
|
-
<references id="_" obligation="informative">
|
125
|
+
<references id="_" obligation="informative" normative="false">
|
126
126
|
<title>Bibliography Subsection</title>
|
127
127
|
</references>
|
128
128
|
</clause>
|
@@ -209,7 +209,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
209
209
|
<title>Terms and definitions</title>
|
210
210
|
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
211
211
|
#{TERMS_BOILERPLATE}
|
212
|
-
<term id="
|
212
|
+
<term id="term-term1">
|
213
213
|
<preferred>Term1</preferred>
|
214
214
|
</term>
|
215
215
|
</terms>
|
@@ -236,7 +236,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
236
236
|
</p>
|
237
237
|
</li>
|
238
238
|
</ul>
|
239
|
-
<term id='
|
239
|
+
<term id='term-term2'>
|
240
240
|
<preferred>Term2</preferred>
|
241
241
|
</term>
|
242
242
|
</terms>
|
@@ -267,13 +267,13 @@ RSpec.describe Asciidoctor::Iec do
|
|
267
267
|
</appendix>
|
268
268
|
</annex>
|
269
269
|
<bibliography>
|
270
|
-
<references id='_' obligation='informative'>
|
270
|
+
<references id='_' obligation='informative' normative="true">
|
271
271
|
<title>Normative References</title>
|
272
272
|
<p id="_">There are no normative references in this document.</p>
|
273
273
|
</references>
|
274
274
|
<clause id='_' obligation='informative'>
|
275
275
|
<title>Bibliography</title>
|
276
|
-
<references id='_' obligation='informative'>
|
276
|
+
<references id='_' obligation='informative' normative="false">
|
277
277
|
<title>Bibliography Subsection</title>
|
278
278
|
</references>
|
279
279
|
</clause>
|
data/spec/assets/iso.xml
CHANGED
@@ -1,8 +1,71 @@
|
|
1
|
-
|
1
|
+
<iec-standard xmlns="https://www.metanorma.org/ns/iec">
|
2
|
+
<bibdata type="standard">
|
3
|
+
<title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
|
4
|
+
<title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
|
5
|
+
<title type="main" language="en" format="text/plain">Specifications and test methods</title>
|
6
|
+
<title type="title-part" language="en" format="text/plain">Rice</title>
|
7
|
+
<title type="title-intro" language="fr" format="text/plain">Céréales et légumineuses</title>
|
8
|
+
<title type="title-main" language="fr" format="text/plain">Spécification et méthodes d'essai</title>
|
9
|
+
<title type="title-part" language="fr" format="text/plain">Riz</title>
|
10
|
+
<docidentifier type="iso">ISO/PreCD3 17301-1</docidentifier>
|
11
|
+
<docidentifier type="iso-tc">17301</docidentifier>
|
12
|
+
<docnumber>1730</docnumber>
|
13
|
+
<date type="published"><on>2011</on></date>
|
14
|
+
<date type="accessed"><on>2012</on></date>
|
15
|
+
<date type="created"><from>2010</from><to>2011</to></date>
|
16
|
+
<date type="activated"><on>2013</on></date>
|
17
|
+
<date type="obsoleted"><on>2014</on></date>
|
18
|
+
<edition>2</edition>
|
19
|
+
<version>
|
20
|
+
<revision-date>2016-05-01</revision-date>
|
21
|
+
<draft>0.4</draft>
|
22
|
+
</version>
|
23
|
+
<contributor>
|
24
|
+
<role type="author"/>
|
25
|
+
<organization>
|
26
|
+
<name>International Organization for Standardization</name>
|
27
|
+
<abbreviation>ISO</abbreviation>
|
28
|
+
</organization>
|
29
|
+
</contributor>
|
30
|
+
<contributor>
|
31
|
+
<role type="publisher"/>
|
32
|
+
<organization>
|
33
|
+
<name>International Organization for Standardization</name>
|
34
|
+
<abbreviation>ISO</abbreviation>
|
35
|
+
</organization>
|
36
|
+
</contributor>
|
37
|
+
<language>en</language>
|
38
|
+
<script>Latn</script>
|
39
|
+
<status>
|
40
|
+
<stage abbreviation="CD">35</stage>
|
41
|
+
<substage abbreviation="3CD">20</substage>
|
42
|
+
<iteration>3</iteration>
|
43
|
+
</status>
|
44
|
+
<copyright>
|
45
|
+
<from>2016</from>
|
46
|
+
<owner>
|
47
|
+
<organization>
|
48
|
+
<abbreviation>ISO</abbreviation>
|
49
|
+
</organization>
|
50
|
+
</owner>
|
51
|
+
</copyright>
|
52
|
+
<ext>
|
53
|
+
<doctype>international-standard</doctype>
|
54
|
+
<editorialgroup>
|
55
|
+
<technical-committee number="34">Food products</technical-committee>
|
56
|
+
<subcommittee number="4">Cereals and pulses</subcommittee>
|
57
|
+
<workgroup number="3">Rice Group</workgroup>
|
58
|
+
<secretariat>GB</secretariat>
|
59
|
+
</editorialgroup>
|
60
|
+
<structuredidentifier>
|
61
|
+
<project-number part="1">ISO/PreCD3 17301</project-number>
|
62
|
+
</structuredidentifier>
|
63
|
+
</ext>
|
64
|
+
</bibdata>
|
2
65
|
<foreword>
|
3
66
|
<note>
|
4
67
|
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
5
68
|
</note>
|
6
69
|
</foreword>
|
7
|
-
</
|
70
|
+
</iec-standard>
|
8
71
|
|
data/spec/examples/rice.html
CHANGED
@@ -269,14 +269,14 @@ p.Terms {
|
|
269
269
|
font-size: 0.9em;
|
270
270
|
overflow: auto;
|
271
271
|
padding: 0 0 0 20px;
|
272
|
-
background-color: #
|
272
|
+
background-color: #f5faff;
|
273
273
|
line-height: 1.2em; }
|
274
274
|
#toggle {
|
275
275
|
position: fixed;
|
276
276
|
height: 100%;
|
277
277
|
width: 30px;
|
278
278
|
border-right: solid black 1px;
|
279
|
-
background-color: #
|
279
|
+
background-color: #f5faff;
|
280
280
|
color: black !important;
|
281
281
|
cursor: pointer;
|
282
282
|
margin-left: -4em;
|
@@ -506,7 +506,7 @@ p.Biblio, p.NormRef {
|
|
506
506
|
font-variant-ligatures: none; }
|
507
507
|
|
508
508
|
.figure, .Sourcecode {
|
509
|
-
background-color: #
|
509
|
+
background-color: #f5faff;
|
510
510
|
line-height: 1.6em;
|
511
511
|
padding: 1.5em;
|
512
512
|
margin: 2em 0 1em 0;
|
@@ -639,7 +639,7 @@ ol > li > p:before {
|
|
639
639
|
3.11 Blockquotes
|
640
640
|
*/
|
641
641
|
.blockquote, .Quote {
|
642
|
-
background-color: #
|
642
|
+
background-color: #f5faff;
|
643
643
|
font-style: italic;
|
644
644
|
width: 80%;
|
645
645
|
padding: 1.5em;
|
@@ -651,7 +651,7 @@ ol > li > p:before {
|
|
651
651
|
3.12 Formulas
|
652
652
|
*/
|
653
653
|
.formula {
|
654
|
-
background-color: #
|
654
|
+
background-color: #f5faff;
|
655
655
|
padding: 1.5em;
|
656
656
|
margin-top: 2em;
|
657
657
|
text-align: center;
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,160 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe IsoDoc::Iec do
|
4
|
+
|
5
|
+
it "processes admonitions" do
|
6
|
+
expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
7
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
8
|
+
<preface><foreword>
|
9
|
+
<admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
|
10
|
+
<p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
|
11
|
+
<p id="_e94663cc-2473-4ccc-9a72-983a74d989f3">Para 2.</p>
|
12
|
+
</admonition>
|
13
|
+
</foreword></preface>
|
14
|
+
</iso-standard>
|
15
|
+
INPUT
|
16
|
+
#{HTML_HDR}
|
17
|
+
<div>
|
18
|
+
<h1 class='ForewordTitle'>FOREWORD</h1>
|
19
|
+
<div class='boilerplate_legal'/>
|
20
|
+
<div id='_70234f78-64e5-4dfc-8b6f-f3f037348b6a' class='Admonition'>
|
21
|
+
<p>
|
22
|
+
CAUTION — Only use paddy or parboiled rice for the
|
23
|
+
determination of husked rice yield.
|
24
|
+
</p>
|
25
|
+
<p id='_e94663cc-2473-4ccc-9a72-983a74d989f3'>Para 2.</p>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
#{IEC_TITLE}
|
29
|
+
</div>
|
30
|
+
</body>
|
31
|
+
</html>
|
32
|
+
OUTPUT
|
33
|
+
end
|
34
|
+
|
35
|
+
it "processes admonitions with titles" do
|
36
|
+
expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
37
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
38
|
+
<preface><foreword>
|
39
|
+
<admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
|
40
|
+
<name>Title</name>
|
41
|
+
<ul>
|
42
|
+
<li>List</li>
|
43
|
+
</ul>
|
44
|
+
<p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
|
45
|
+
</admonition>
|
46
|
+
</foreword></preface>
|
47
|
+
</iso-standard>
|
48
|
+
INPUT
|
49
|
+
#{HTML_HDR}
|
50
|
+
<div>
|
51
|
+
<h1 class='ForewordTitle'>FOREWORD</h1>
|
52
|
+
<div class='boilerplate_legal'/>
|
53
|
+
<div id='_70234f78-64e5-4dfc-8b6f-f3f037348b6a' class='Admonition'>
|
54
|
+
<p>Title — </p>
|
55
|
+
<ul>
|
56
|
+
<li>List</li>
|
57
|
+
</ul>
|
58
|
+
<p id='_e94663cc-2473-4ccc-9a72-983a74d989f2'>Only use paddy or parboiled rice for the determination of husked rice yield.</p>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
#{IEC_TITLE}
|
62
|
+
</div>
|
63
|
+
</body>
|
64
|
+
</html>
|
65
|
+
OUTPUT
|
66
|
+
end
|
67
|
+
|
68
|
+
it "processes formulae (Word)" do
|
69
|
+
expect(xmlpp(IsoDoc::Iec::WordConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
70
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
71
|
+
<preface><foreword>
|
72
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
|
73
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
74
|
+
<dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
|
75
|
+
<dt>
|
76
|
+
<stem type="AsciiMath">r</stem>
|
77
|
+
</dt>
|
78
|
+
<dd>
|
79
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
80
|
+
</dd>
|
81
|
+
</dl>
|
82
|
+
<note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
|
83
|
+
<p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p>
|
84
|
+
</note>
|
85
|
+
</formula>
|
86
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
|
87
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
88
|
+
</formula>
|
89
|
+
</foreword></preface>
|
90
|
+
</iso-standard>
|
91
|
+
INPUT
|
92
|
+
<html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
|
93
|
+
<head>
|
94
|
+
<style>
|
95
|
+
</style>
|
96
|
+
<style>
|
97
|
+
</style>
|
98
|
+
</head>
|
99
|
+
<body lang='EN-US' link='blue' vlink='#954F72'>
|
100
|
+
<div class='WordSection2'>
|
101
|
+
<p>
|
102
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
103
|
+
</p>
|
104
|
+
#{IEC_TITLE}
|
105
|
+
<div>
|
106
|
+
<h1 class='ForewordTitle'>FOREWORD</h1>
|
107
|
+
<div class='boilerplate_legal'/>
|
108
|
+
<div id='_be9158af-7e93-4ee2-90c5-26d31c181934' class='formula'>
|
109
|
+
<p class='formula'>
|
110
|
+
<span style='mso-tab-count:1'>  </span>
|
111
|
+
<span class='stem'>(#(r = 1 %)#)</span>
|
112
|
+
</p>
|
113
|
+
</div>
|
114
|
+
<p>where</p>
|
115
|
+
<table class='formula_dl'>
|
116
|
+
<tr>
|
117
|
+
<td valign='top' align='left'>
|
118
|
+
<p align='left' style='margin-left:0pt;text-align:left;'>
|
119
|
+
<span class='stem'>(#(r)#)</span>
|
120
|
+
</p>
|
121
|
+
</td>
|
122
|
+
<td valign='top'>
|
123
|
+
<p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
|
124
|
+
</td>
|
125
|
+
</tr>
|
126
|
+
</table>
|
127
|
+
<div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
|
128
|
+
<p class='Note'>
|
129
|
+
<span class='note_label'>NOTE</span>
|
130
|
+
<span style='mso-tab-count:1'>  </span>
|
131
|
+
[durationUnits] is essentially a duration statement without the "P"
|
132
|
+
prefix. "P" is unnecessary because between "G" and "U" duration is
|
133
|
+
always expressed.
|
134
|
+
</p>
|
135
|
+
</div>
|
136
|
+
<div id='_be9158af-7e93-4ee2-90c5-26d31c181935' class='formula'>
|
137
|
+
<p class='formula'>
|
138
|
+
<span style='mso-tab-count:1'>  </span>
|
139
|
+
<span class='stem'>(#(r = 1 %)#)</span>
|
140
|
+
<span style='mso-tab-count:1'>  </span>
|
141
|
+
(1)
|
142
|
+
</p>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
<p> </p>
|
146
|
+
</div>
|
147
|
+
<p>
|
148
|
+
<br clear='all' class='section'/>
|
149
|
+
</p>
|
150
|
+
<div class='WordSection3'>
|
151
|
+
#{IEC_TITLE}
|
152
|
+
</div>
|
153
|
+
<br clear='all' style='page-break-before:left;mso-break-type:section-break'/>
|
154
|
+
<div class='colophon'/>
|
155
|
+
</body>
|
156
|
+
</html>
|
157
|
+
OUTPUT
|
158
|
+
end
|
159
|
+
|
160
|
+
end
|