metanorma-iso 2.0.8.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/html2doc/lists.rb +37 -0
  3. data/lib/isodoc/iso/html/html_iso_titlepage.html +5 -0
  4. data/lib/isodoc/iso/html/isodoc-dis.css +196 -156
  5. data/lib/isodoc/iso/html/isodoc-dis.scss +193 -156
  6. data/lib/isodoc/iso/html/word_iso_intro-dis.html +7 -0
  7. data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +2 -0
  8. data/lib/isodoc/iso/html/word_iso_titlepage.html +6 -0
  9. data/lib/isodoc/iso/html/wordstyle-dis.css +204 -34
  10. data/lib/isodoc/iso/html/wordstyle-dis.scss +198 -34
  11. data/lib/isodoc/iso/i18n-en.yaml +1 -0
  12. data/lib/isodoc/iso/i18n-fr.yaml +1 -0
  13. data/lib/isodoc/iso/i18n-ru.yaml +1 -0
  14. data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -0
  15. data/lib/isodoc/iso/init.rb +17 -1
  16. data/lib/isodoc/iso/iso.amendment.xsl +470 -201
  17. data/lib/isodoc/iso/iso.international-standard.xsl +470 -201
  18. data/lib/isodoc/iso/metadata.rb +5 -11
  19. data/lib/isodoc/iso/presentation_inline.rb +90 -0
  20. data/lib/isodoc/iso/presentation_xml_convert.rb +39 -98
  21. data/lib/isodoc/iso/presentation_xref.rb +126 -0
  22. data/lib/isodoc/iso/word_cleanup.rb +14 -0
  23. data/lib/isodoc/iso/word_convert.rb +27 -10
  24. data/lib/isodoc/iso/word_dis_convert.rb +174 -0
  25. data/lib/isodoc/iso/xref.rb +46 -25
  26. data/lib/metanorma/iso/biblio.rng +37 -8
  27. data/lib/metanorma/iso/boilerplate-fr.xml +1 -1
  28. data/lib/metanorma/iso/boilerplate-ru.xml +1 -3
  29. data/lib/metanorma/iso/boilerplate.xml +1 -3
  30. data/lib/metanorma/iso/cleanup.rb +2 -1
  31. data/lib/metanorma/iso/isodoc.rng +56 -0
  32. data/lib/metanorma/iso/version.rb +1 -1
  33. data/lib/metanorma-iso.rb +1 -0
  34. data/lib/relaton/render/config.yml +4 -0
  35. data/lib/relaton/render/general.rb +13 -0
  36. data/metanorma-iso.gemspec +1 -1
  37. data/spec/isodoc/amd_spec.rb +15 -14
  38. data/spec/isodoc/blocks_spec.rb +286 -179
  39. data/spec/isodoc/i18n_spec.rb +187 -21
  40. data/spec/isodoc/inline_spec.rb +35 -42
  41. data/spec/isodoc/iso_spec.rb +1 -1
  42. data/spec/isodoc/postproc_spec.rb +25 -0
  43. data/spec/isodoc/ref_spec.rb +66 -69
  44. data/spec/isodoc/section_spec.rb +78 -76
  45. data/spec/isodoc/table_spec.rb +2 -2
  46. data/spec/isodoc/terms_spec.rb +2 -2
  47. data/spec/isodoc/word_dis_spec.rb +760 -0
  48. data/spec/isodoc/xref_spec.rb +51 -51
  49. data/spec/metanorma/base_spec.rb +10 -10
  50. data/spec/spec_helper.rb +4 -1
  51. data/spec/vcr_cassettes/withdrawn_iso.yml +26 -26
  52. metadata +11 -5
  53. data/spec/vcr_cassettes/docrels.yml +0 -385
@@ -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
- <body lang='EN-US' link='blue' vlink='#954F72'>
118
- <div class='WordSection1'>
119
- <p>&#xA0;</p>
120
- </div>
221
+ <body lang='EN-US' link='blue' vlink='#954F72'>
222
+ <div class='WordSection1'>
223
+ <p>&#xA0;</p>
224
+ </div>
225
+ <p>
226
+ <br clear='all' class='section'/>
227
+ </p>
228
+ <div class='WordSection2'>
121
229
  <p>
122
- <br clear='all' class='section'/>
230
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
123
231
  </p>
124
- <div class='WordSection2'>
125
- <p>
126
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
127
- </p>
128
- <div id='fwd'>
129
- <h1 class='ForewordTitle'>Foreword</h1>
130
- <p class='ForewordText'> </p>
232
+ <div id='fwd'>
233
+ <h1 class='ForewordTitle'>Foreword</h1>
234
+ <p class='ForewordText'> </p>
235
+ </div>
236
+ <p>&#xA0;</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&#xA0;&#x2014; Split-it-right sample divider</p>
131
248
  </div>
132
- <p>&#xA0;</p>
249
+ <p> </p>
133
250
  </div>
134
- <p>
135
- <br clear='all' class='section'/>
136
- </p>
137
- <div class='WordSection3'>
138
- <p class='zzSTDTitle1'/>
139
- <div id='scope'>
140
- <h1>Scope</h1>
141
- <div id='N' class='figure'>
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&#xA0;&#x2014; 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 1&#xA0;&#x2014; Split-it-right sample divider</p>
263
+ <p class='FigureTitle' style='text-align:center;'>Figure 3&#xA0;&#x2014; Split-it-right sample divider</p>
144
264
  </div>
145
265
  <p> </p>
146
266
  </div>
147
- <div id='terms'>
148
- <h1/>
149
- </div>
150
- <div id='widgets'>
151
- <h1>Widgets</h1>
152
- <div id='widgets1'>
153
- <div id='note1' class='figure'>
154
- <img src='rice_images/rice_image1.png'/>
155
- <p class='FigureTitle' style='text-align:center;'>Figure 2&#xA0;&#x2014; Split-it-right sample divider</p>
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&#xA0;&#x2014; 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&#xA0;&#x2014; Split-it-right sample divider</p>
162
276
  </div>
163
277
  </div>
164
- <p>
165
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
166
- </p>
167
- <div id='annex1' class='Section3'>
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&#xA0;&#x2014; 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&#xA0;&#x2014; Split-it-right sample divider</p>
173
282
  </div>
174
- <div id='annex1b'>
175
- <div id='Anote1' class='figure'>
176
- <img src='rice_images/rice_image1.png'/>
177
- <p class='AnnexFigureTitle' style='text-align:center;'>Figure A.2&#xA0;&#x2014; 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&#xA0;&#x2014; 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&#xA0;&#x2014; Split-it-right sample divider</p>
183
286
  </div>
184
287
  </div>
185
288
  </div>
186
- <br clear='all' style='page-break-before:left;mso-break-type:section-break'/>
187
- <div class='colophon'/>
188
- </body>
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({}).convert("test", <<~"INPUT", true)
199
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
200
- <preface>
201
- <foreword id='fwd'>
202
- <p>
203
- <xref target='N'/>
204
- <xref target='note1'/>
205
- <xref target='note2'/>
206
- <xref target='AN'/>
207
- <xref target='Anote1'/>
208
- <xref target='Anote2'/>
209
- </p>
210
- </foreword>
211
- </preface>
212
- <sections>
213
- <clause id='scope' type="scope">
214
- <title>Scope</title>
215
- </clause>
216
- <terms id='terms'/>
217
- <clause id='widgets'>
218
- <title>Widgets</title>
219
- <clause id='widgets1'>
220
- <figure id='N'>
221
- <name>Figure 1</name>
222
- <figure id='note1'>
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)&#xA0;&#x2014; 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)&#xA0;&#x2014; 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)&#xA0;&#x2014; 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='note2'>
352
+ <figure id='Anote2'>
227
353
  <name>b)&#xA0;&#x2014; 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
- </clause>
237
- </sections>
238
- <annex id='annex1'>
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)&#xA0;&#x2014; 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)&#xA0;&#x2014; 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
- <div>
454
- <h1 class='ForewordTitle'>Foreword</h1>
455
- <div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
456
- <p>
457
- <span class='stem'>(#(r = 1 %)#)</span>
458
- <span style='mso-tab-count:1'>&#160; </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'>&#160; </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'>&#160; </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'>&#160; </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'>&#160; </span>
603
+ (1)
604
+ </p>
501
605
  </div>
502
606
  </div>
503
- OUTPUT
504
- output = IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true)
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", <<~"INPUT", true)
516
- <iso-standard xmlns="http://riboseinc.com/isoxml">
517
- <preface>
518
- <foreword>
519
- <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
520
- <stem type="AsciiMath">r = 1 %</stem>
521
- <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
522
- <dt>
523
- <stem type="AsciiMath">r</stem>
524
- </dt>
525
- <dd>
526
- <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
527
- </dd>
528
- </dl>
529
- <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
530
- <p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the &quot;P&quot; prefix. &quot;P&quot; is unnecessary because between &quot;G&quot; and &quot;U&quot; duration is always expressed.</p>
531
- </note>
532
- </formula>
533
- <formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
534
- <name>1</name>
535
- <stem type="AsciiMath">r = 1 %</stem>
536
- </formula>
537
- </foreword>
538
- </preface>
539
- </iso-standard>
540
- INPUT
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 &quot;P&quot; prefix. &quot;P&quot; is unnecessary because between &quot;G&quot; and &quot;U&quot; 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/>