metanorma-iso 2.0.8.1 → 2.1.0
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/lib/html2doc/lists.rb +37 -0
- data/lib/isodoc/iso/html/html_iso_titlepage.html +5 -0
- data/lib/isodoc/iso/html/isodoc-dis.css +196 -156
- data/lib/isodoc/iso/html/isodoc-dis.scss +193 -156
- data/lib/isodoc/iso/html/word_iso_intro-dis.html +7 -0
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +2 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +6 -0
- data/lib/isodoc/iso/html/wordstyle-dis.css +204 -34
- data/lib/isodoc/iso/html/wordstyle-dis.scss +198 -34
- data/lib/isodoc/iso/i18n-en.yaml +1 -0
- data/lib/isodoc/iso/i18n-fr.yaml +1 -0
- data/lib/isodoc/iso/i18n-ru.yaml +1 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -0
- data/lib/isodoc/iso/init.rb +17 -1
- data/lib/isodoc/iso/iso.amendment.xsl +470 -201
- data/lib/isodoc/iso/iso.international-standard.xsl +470 -201
- data/lib/isodoc/iso/metadata.rb +5 -11
- data/lib/isodoc/iso/presentation_inline.rb +90 -0
- data/lib/isodoc/iso/presentation_xml_convert.rb +39 -98
- data/lib/isodoc/iso/presentation_xref.rb +126 -0
- data/lib/isodoc/iso/word_cleanup.rb +14 -0
- data/lib/isodoc/iso/word_convert.rb +27 -10
- data/lib/isodoc/iso/word_dis_convert.rb +174 -0
- data/lib/isodoc/iso/xref.rb +46 -25
- data/lib/metanorma/iso/biblio.rng +37 -8
- data/lib/metanorma/iso/boilerplate-fr.xml +1 -1
- data/lib/metanorma/iso/boilerplate-ru.xml +1 -3
- data/lib/metanorma/iso/boilerplate.xml +1 -3
- data/lib/metanorma/iso/cleanup.rb +2 -1
- data/lib/metanorma/iso/isodoc.rng +56 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/metanorma-iso.rb +1 -0
- data/lib/relaton/render/config.yml +4 -0
- data/lib/relaton/render/general.rb +13 -0
- data/metanorma-iso.gemspec +1 -1
- data/spec/isodoc/amd_spec.rb +15 -14
- data/spec/isodoc/blocks_spec.rb +286 -179
- data/spec/isodoc/i18n_spec.rb +187 -21
- data/spec/isodoc/inline_spec.rb +35 -42
- data/spec/isodoc/iso_spec.rb +1 -1
- data/spec/isodoc/postproc_spec.rb +25 -0
- data/spec/isodoc/ref_spec.rb +66 -69
- data/spec/isodoc/section_spec.rb +78 -76
- data/spec/isodoc/table_spec.rb +2 -2
- data/spec/isodoc/terms_spec.rb +2 -2
- data/spec/isodoc/word_dis_spec.rb +760 -0
- data/spec/isodoc/xref_spec.rb +51 -51
- data/spec/metanorma/base_spec.rb +10 -10
- data/spec/spec_helper.rb +4 -1
- data/spec/vcr_cassettes/withdrawn_iso.yml +26 -26
- metadata +11 -5
- data/spec/vcr_cassettes/docrels.yml +0 -385
data/spec/isodoc/blocks_spec.rb
CHANGED
@@ -1,6 +1,110 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc do
|
4
|
+
it "processes admonitions" do
|
5
|
+
input = <<~INPUT
|
6
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
|
+
<preface><foreword>
|
8
|
+
<admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
|
9
|
+
<name>CAUTION</name>
|
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
|
+
presxml = <<~INPUT
|
17
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type='presentation'>
|
18
|
+
<preface><foreword displayorder="1">
|
19
|
+
<admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
|
20
|
+
<p id='_e94663cc-2473-4ccc-9a72-983a74d989f2'>
|
21
|
+
CAUTION — Only use paddy or parboiled rice for the
|
22
|
+
determination of husked rice yield.
|
23
|
+
</p>
|
24
|
+
<p id="_e94663cc-2473-4ccc-9a72-983a74d989f3">Para 2.</p>
|
25
|
+
</admonition>
|
26
|
+
</foreword></preface>
|
27
|
+
</iso-standard>
|
28
|
+
INPUT
|
29
|
+
output = <<~OUTPUT
|
30
|
+
#{HTML_HDR}
|
31
|
+
<br/>
|
32
|
+
<div>
|
33
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
34
|
+
<div id='_70234f78-64e5-4dfc-8b6f-f3f037348b6a' class='Admonition'>
|
35
|
+
<p>
|
36
|
+
CAUTION — Only use paddy or parboiled rice for the
|
37
|
+
determination of husked rice yield.
|
38
|
+
</p>
|
39
|
+
<p id='_e94663cc-2473-4ccc-9a72-983a74d989f3'>Para 2.</p>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
<p class='zzSTDTitle1'/>
|
43
|
+
</div>
|
44
|
+
</body>
|
45
|
+
</html>
|
46
|
+
OUTPUT
|
47
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
48
|
+
.convert("test", input, true)))
|
49
|
+
.to be_equivalent_to xmlpp(presxml)
|
50
|
+
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
|
51
|
+
.convert("test", presxml, true)))
|
52
|
+
.to be_equivalent_to xmlpp(output)
|
53
|
+
end
|
54
|
+
|
55
|
+
it "processes admonitions with titles" do
|
56
|
+
input = <<~INPUT
|
57
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
58
|
+
<preface><foreword>
|
59
|
+
<admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
|
60
|
+
<name>Title</name>
|
61
|
+
<ul>
|
62
|
+
<li>List</li>
|
63
|
+
</ul>
|
64
|
+
<p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
|
65
|
+
</admonition>
|
66
|
+
</foreword></preface>
|
67
|
+
</iso-standard>
|
68
|
+
INPUT
|
69
|
+
presxml = <<~INPUT
|
70
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type='presentation'>
|
71
|
+
<preface><foreword displayorder="1">
|
72
|
+
<admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
|
73
|
+
<name>Title</name>
|
74
|
+
<ul>
|
75
|
+
<li>List</li>
|
76
|
+
</ul>
|
77
|
+
<p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
|
78
|
+
</admonition>
|
79
|
+
</foreword></preface>
|
80
|
+
</iso-standard>
|
81
|
+
INPUT
|
82
|
+
output = <<~OUTPUT
|
83
|
+
#{HTML_HDR}
|
84
|
+
<br/>
|
85
|
+
<div>
|
86
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
87
|
+
<div id='_70234f78-64e5-4dfc-8b6f-f3f037348b6a' class='Admonition'>
|
88
|
+
<p>Title — </p>
|
89
|
+
<ul>
|
90
|
+
<li>List</li>
|
91
|
+
</ul>
|
92
|
+
<p id='_e94663cc-2473-4ccc-9a72-983a74d989f2'>Only use paddy or parboiled rice for the determination of husked rice yield.</p>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
<p class='zzSTDTitle1'/>
|
96
|
+
</div>
|
97
|
+
</body>
|
98
|
+
</html>
|
99
|
+
OUTPUT
|
100
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
101
|
+
.convert("test", input, true)))
|
102
|
+
.to be_equivalent_to xmlpp(presxml)
|
103
|
+
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
|
104
|
+
.convert("test", input, true)))
|
105
|
+
.to be_equivalent_to xmlpp(output)
|
106
|
+
end
|
107
|
+
|
4
108
|
it "renders figures" do
|
5
109
|
input = <<~INPUT
|
6
110
|
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
@@ -114,78 +218,78 @@ RSpec.describe IsoDoc do
|
|
114
218
|
</html>
|
115
219
|
OUTPUT
|
116
220
|
word = <<~OUTPUT
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
221
|
+
<body lang='EN-US' link='blue' vlink='#954F72'>
|
222
|
+
<div class='WordSection1'>
|
223
|
+
<p> </p>
|
224
|
+
</div>
|
225
|
+
<p>
|
226
|
+
<br clear='all' class='section'/>
|
227
|
+
</p>
|
228
|
+
<div class='WordSection2'>
|
121
229
|
<p>
|
122
|
-
<br clear='all'
|
230
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
123
231
|
</p>
|
124
|
-
<div
|
125
|
-
<
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
232
|
+
<div id='fwd'>
|
233
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
234
|
+
<p class='ForewordText'> </p>
|
235
|
+
</div>
|
236
|
+
<p> </p>
|
237
|
+
</div>
|
238
|
+
<p>
|
239
|
+
<br clear='all' class='section'/>
|
240
|
+
</p>
|
241
|
+
<div class='WordSection3'>
|
242
|
+
<p class='zzSTDTitle1'/>
|
243
|
+
<div id='scope'>
|
244
|
+
<h1>Scope</h1>
|
245
|
+
<div id='N' class='figure'>
|
246
|
+
<img src='rice_images/rice_image1.png'/>
|
247
|
+
<p class='FigureTitle' style='text-align:center;'>Figure 1 — Split-it-right sample divider</p>
|
131
248
|
</div>
|
132
|
-
<p
|
249
|
+
<p> </p>
|
133
250
|
</div>
|
134
|
-
<
|
135
|
-
<
|
136
|
-
</
|
137
|
-
<div
|
138
|
-
<
|
139
|
-
<div id='
|
140
|
-
<
|
141
|
-
|
251
|
+
<div id='terms'>
|
252
|
+
<h1/>
|
253
|
+
</div>
|
254
|
+
<div id='widgets'>
|
255
|
+
<h1>Widgets</h1>
|
256
|
+
<div id='widgets1'>
|
257
|
+
<div id='note1' class='figure'>
|
258
|
+
<img src='rice_images/rice_image1.png'/>
|
259
|
+
<p class='FigureTitle' style='text-align:center;'>Figure 2 — Split-it-right sample divider</p>
|
260
|
+
</div>
|
261
|
+
<div id='note2' class='figure'>
|
142
262
|
<img src='rice_images/rice_image1.png'/>
|
143
|
-
<p class='FigureTitle' style='text-align:center;'>Figure
|
263
|
+
<p class='FigureTitle' style='text-align:center;'>Figure 3 — Split-it-right sample divider</p>
|
144
264
|
</div>
|
145
265
|
<p> </p>
|
146
266
|
</div>
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
</div>
|
157
|
-
<div id='note2' class='figure'>
|
158
|
-
<img src='rice_images/rice_image1.png'/>
|
159
|
-
<p class='FigureTitle' style='text-align:center;'>Figure 3 — Split-it-right sample divider</p>
|
160
|
-
</div>
|
161
|
-
<p> </p>
|
267
|
+
</div>
|
268
|
+
<p>
|
269
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
270
|
+
</p>
|
271
|
+
<div id='annex1' class='Section3'>
|
272
|
+
<div id='annex1a'>
|
273
|
+
<div id='AN' class='figure'>
|
274
|
+
<img src='rice_images/rice_image1.png'/>
|
275
|
+
<p class='AnnexFigureTitle' style='text-align:center;'>Figure A.1 — Split-it-right sample divider</p>
|
162
276
|
</div>
|
163
277
|
</div>
|
164
|
-
<
|
165
|
-
<
|
166
|
-
|
167
|
-
|
168
|
-
<div id='annex1a'>
|
169
|
-
<div id='AN' class='figure'>
|
170
|
-
<img src='rice_images/rice_image1.png'/>
|
171
|
-
<p class='AnnexFigureTitle' style='text-align:center;'>Figure A.1 — Split-it-right sample divider</p>
|
172
|
-
</div>
|
278
|
+
<div id='annex1b'>
|
279
|
+
<div id='Anote1' class='figure'>
|
280
|
+
<img src='rice_images/rice_image1.png'/>
|
281
|
+
<p class='AnnexFigureTitle' style='text-align:center;'>Figure A.2 — Split-it-right sample divider</p>
|
173
282
|
</div>
|
174
|
-
<div id='
|
175
|
-
<
|
176
|
-
|
177
|
-
<p class='AnnexFigureTitle' style='text-align:center;'>Figure A.2 — Split-it-right sample divider</p>
|
178
|
-
</div>
|
179
|
-
<div id='Anote2' class='figure'>
|
180
|
-
<img src='rice_images/rice_image1.png'/>
|
181
|
-
<p class='AnnexFigureTitle' style='text-align:center;'>Figure A.3 — Split-it-right sample divider</p>
|
182
|
-
</div>
|
283
|
+
<div id='Anote2' class='figure'>
|
284
|
+
<img src='rice_images/rice_image1.png'/>
|
285
|
+
<p class='AnnexFigureTitle' style='text-align:center;'>Figure A.3 — Split-it-right sample divider</p>
|
183
286
|
</div>
|
184
287
|
</div>
|
185
288
|
</div>
|
186
|
-
|
187
|
-
|
188
|
-
|
289
|
+
</div>
|
290
|
+
<br clear='all' style='page-break-before:left;mso-break-type:section-break'/>
|
291
|
+
<div class='colophon'/>
|
292
|
+
</body>
|
189
293
|
OUTPUT
|
190
294
|
output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", input, true)
|
191
295
|
expect(xmlpp(output)).to be_equivalent_to xmlpp(html)
|
@@ -195,64 +299,65 @@ RSpec.describe IsoDoc do
|
|
195
299
|
end
|
196
300
|
|
197
301
|
it "renders subfigures (HTML)" do
|
198
|
-
output = IsoDoc::Iso::HtmlConvert.new({})
|
199
|
-
|
200
|
-
<
|
201
|
-
<
|
202
|
-
<
|
203
|
-
<
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
<
|
214
|
-
<
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
<
|
219
|
-
|
220
|
-
<
|
221
|
-
<
|
222
|
-
|
302
|
+
output = IsoDoc::Iso::HtmlConvert.new({})
|
303
|
+
.convert("test", <<~"INPUT", true)
|
304
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
305
|
+
<preface>
|
306
|
+
<foreword id='fwd'>
|
307
|
+
<p>
|
308
|
+
<xref target='N'/>
|
309
|
+
<xref target='note1'/>
|
310
|
+
<xref target='note2'/>
|
311
|
+
<xref target='AN'/>
|
312
|
+
<xref target='Anote1'/>
|
313
|
+
<xref target='Anote2'/>
|
314
|
+
</p>
|
315
|
+
</foreword>
|
316
|
+
</preface>
|
317
|
+
<sections>
|
318
|
+
<clause id='scope' type="scope">
|
319
|
+
<title>Scope</title>
|
320
|
+
</clause>
|
321
|
+
<terms id='terms'/>
|
322
|
+
<clause id='widgets'>
|
323
|
+
<title>Widgets</title>
|
324
|
+
<clause id='widgets1'>
|
325
|
+
<figure id='N'>
|
326
|
+
<name>Figure 1</name>
|
327
|
+
<figure id='note1'>
|
328
|
+
<name>a) — Split-it-right sample divider</name>
|
329
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
330
|
+
</figure>
|
331
|
+
<figure id='note2'>
|
332
|
+
<name>b) — Split-it-right sample divider</name>
|
333
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
334
|
+
</figure>
|
335
|
+
</figure>
|
336
|
+
<p>
|
337
|
+
<xref target='note1'/>
|
338
|
+
<xref target='note2'/>
|
339
|
+
</p>
|
340
|
+
</clause>
|
341
|
+
</clause>
|
342
|
+
</sections>
|
343
|
+
<annex id='annex1'>
|
344
|
+
<clause id='annex1a'> </clause>
|
345
|
+
<clause id='annex1b'>
|
346
|
+
<figure id='AN'>
|
347
|
+
<name>Figure A.1</name>
|
348
|
+
<figure id='Anote1'>
|
223
349
|
<name>a) — Split-it-right sample divider</name>
|
224
350
|
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
225
351
|
</figure>
|
226
|
-
<figure id='
|
352
|
+
<figure id='Anote2'>
|
227
353
|
<name>b) — Split-it-right sample divider</name>
|
228
354
|
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
229
355
|
</figure>
|
230
356
|
</figure>
|
231
|
-
<p>
|
232
|
-
<xref target='note1'/>
|
233
|
-
<xref target='note2'/>
|
234
|
-
</p>
|
235
357
|
</clause>
|
236
|
-
</
|
237
|
-
</
|
238
|
-
|
239
|
-
<clause id='annex1a'> </clause>
|
240
|
-
<clause id='annex1b'>
|
241
|
-
<figure id='AN'>
|
242
|
-
<name>Figure A.1</name>
|
243
|
-
<figure id='Anote1'>
|
244
|
-
<name>a) — Split-it-right sample divider</name>
|
245
|
-
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
246
|
-
</figure>
|
247
|
-
<figure id='Anote2'>
|
248
|
-
<name>b) — Split-it-right sample divider</name>
|
249
|
-
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
250
|
-
</figure>
|
251
|
-
</figure>
|
252
|
-
</clause>
|
253
|
-
</annex>
|
254
|
-
</iso-standard>
|
255
|
-
INPUT
|
358
|
+
</annex>
|
359
|
+
</iso-standard>
|
360
|
+
INPUT
|
256
361
|
expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
257
362
|
<html lang='en'>
|
258
363
|
<head/>
|
@@ -450,58 +555,59 @@ RSpec.describe IsoDoc do
|
|
450
555
|
OUTPUT
|
451
556
|
|
452
557
|
word = <<~OUTPUT
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
<p>
|
457
|
-
<span class='stem'>(#(r = 1 %)#)</span>
|
458
|
-
<span style='mso-tab-count:1'>  </span>
|
459
|
-
</p>
|
460
|
-
</div>
|
461
|
-
<p>where</p>
|
462
|
-
<table class="formula_dl">
|
463
|
-
<tr>
|
464
|
-
<td align="left" valign="top">
|
465
|
-
<p align="left" style="margin-left:0pt;text-align:left;">
|
466
|
-
<span class="stem">(#(r)#)</span>
|
467
|
-
</p>
|
468
|
-
</td>
|
469
|
-
<td valign="top">
|
470
|
-
<p class="ForewordText" id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
471
|
-
</td>
|
472
|
-
</tr>
|
473
|
-
<tr>
|
474
|
-
<td align="left" valign="top">
|
475
|
-
<p align="left" style="margin-left:0pt;text-align:left;">
|
476
|
-
<span class="stem">(#(s_1)#)</span>
|
477
|
-
</p>
|
478
|
-
</td>
|
479
|
-
<td valign="top">
|
480
|
-
<p class="ForewordText" id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p>
|
481
|
-
</td>
|
482
|
-
</tr>
|
483
|
-
</table>
|
484
|
-
<div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
|
485
|
-
<p class='Note'>
|
486
|
-
<span class='note_label'>NOTE</span>
|
487
|
-
<span style='mso-tab-count:1'>  </span>
|
488
|
-
[durationUnits] is essentially a duration statement without the "P"
|
489
|
-
prefix. "P" is unnecessary because between "G" and "U" duration is
|
490
|
-
always expressed.
|
491
|
-
</p>
|
492
|
-
</div>
|
493
|
-
</div>
|
494
|
-
<div id='_be9158af-7e93-4ee2-90c5-26d31c181935'><div class='formula'>
|
558
|
+
<div>
|
559
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
560
|
+
<div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
|
495
561
|
<p>
|
496
562
|
<span class='stem'>(#(r = 1 %)#)</span>
|
497
563
|
<span style='mso-tab-count:1'>  </span>
|
498
|
-
(1)
|
499
564
|
</p>
|
500
565
|
</div>
|
566
|
+
<p>where</p>
|
567
|
+
<table class="formula_dl">
|
568
|
+
<tr>
|
569
|
+
<td align="left" valign="top">
|
570
|
+
<p align="left" style="margin-left:0pt;text-align:left;">
|
571
|
+
<span class="stem">(#(r)#)</span>
|
572
|
+
</p>
|
573
|
+
</td>
|
574
|
+
<td valign="top">
|
575
|
+
<p class="ForewordText" id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
576
|
+
</td>
|
577
|
+
</tr>
|
578
|
+
<tr>
|
579
|
+
<td align="left" valign="top">
|
580
|
+
<p align="left" style="margin-left:0pt;text-align:left;">
|
581
|
+
<span class="stem">(#(s_1)#)</span>
|
582
|
+
</p>
|
583
|
+
</td>
|
584
|
+
<td valign="top">
|
585
|
+
<p class="ForewordText" id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p>
|
586
|
+
</td>
|
587
|
+
</tr>
|
588
|
+
</table>
|
589
|
+
<div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
|
590
|
+
<p class='Note'>
|
591
|
+
<span class='note_label'>NOTE</span>
|
592
|
+
<span style='mso-tab-count:1'>  </span>
|
593
|
+
[durationUnits] is essentially a duration statement without the "P"
|
594
|
+
prefix. "P" is unnecessary because between "G" and "U" duration is
|
595
|
+
always expressed.
|
596
|
+
</p>
|
597
|
+
</div>
|
598
|
+
</div>
|
599
|
+
<div id='_be9158af-7e93-4ee2-90c5-26d31c181935'><div class='formula'>
|
600
|
+
<p>
|
601
|
+
<span class='stem'>(#(r = 1 %)#)</span>
|
602
|
+
<span style='mso-tab-count:1'>  </span>
|
603
|
+
(1)
|
604
|
+
</p>
|
501
605
|
</div>
|
502
606
|
</div>
|
503
|
-
|
504
|
-
|
607
|
+
</div>
|
608
|
+
OUTPUT
|
609
|
+
output = IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input,
|
610
|
+
true)
|
505
611
|
expect(xmlpp(output)).to be_equivalent_to xmlpp(presxml)
|
506
612
|
output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true)
|
507
613
|
expect(xmlpp(output)).to be_equivalent_to xmlpp(html)
|
@@ -512,32 +618,33 @@ RSpec.describe IsoDoc do
|
|
512
618
|
end
|
513
619
|
|
514
620
|
it "processes formulae with single definition list entry" do
|
515
|
-
output = IsoDoc::Iso::HtmlConvert.new({}).convert("test",
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
621
|
+
output = IsoDoc::Iso::HtmlConvert.new({}).convert("test",
|
622
|
+
<<~"INPUT", true)
|
623
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
624
|
+
<preface>
|
625
|
+
<foreword>
|
626
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
|
627
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
628
|
+
<dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
|
629
|
+
<dt>
|
630
|
+
<stem type="AsciiMath">r</stem>
|
631
|
+
</dt>
|
632
|
+
<dd>
|
633
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
634
|
+
</dd>
|
635
|
+
</dl>
|
636
|
+
<note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
|
637
|
+
<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>
|
638
|
+
</note>
|
639
|
+
</formula>
|
640
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
|
641
|
+
<name>1</name>
|
642
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
643
|
+
</formula>
|
644
|
+
</foreword>
|
645
|
+
</preface>
|
646
|
+
</iso-standard>
|
647
|
+
INPUT
|
541
648
|
expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
542
649
|
#{HTML_HDR}
|
543
650
|
<br/>
|