metanorma-iso 1.3.24 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +8 -1
  3. data/.github/workflows/ubuntu.yml +14 -3
  4. data/.github/workflows/windows.yml +8 -1
  5. data/lib/asciidoctor/iso/base.rb +21 -13
  6. data/lib/asciidoctor/iso/biblio.rng +36 -6
  7. data/lib/asciidoctor/iso/cleanup.rb +10 -1
  8. data/lib/asciidoctor/iso/front.rb +16 -110
  9. data/lib/asciidoctor/iso/front_id.rb +196 -0
  10. data/lib/asciidoctor/iso/isodoc.rng +444 -1
  11. data/lib/asciidoctor/iso/isostandard-amd.rng +98 -0
  12. data/lib/asciidoctor/iso/isostandard.rng +12 -1
  13. data/lib/asciidoctor/iso/reqt.rng +23 -0
  14. data/lib/asciidoctor/iso/section.rb +12 -0
  15. data/lib/asciidoctor/iso/term_lookup_cleanup.rb +7 -10
  16. data/lib/asciidoctor/iso/validate.rb +40 -23
  17. data/lib/asciidoctor/iso/validate_requirements.rb +1 -1
  18. data/lib/asciidoctor/iso/validate_style.rb +6 -5
  19. data/lib/asciidoctor/iso/validate_title.rb +1 -1
  20. data/lib/isodoc/iso/base_convert.rb +68 -87
  21. data/lib/isodoc/iso/html/header.html +5 -1
  22. data/lib/isodoc/iso/html/html_iso_titlepage.html +25 -16
  23. data/lib/isodoc/iso/html/isodoc.scss +25 -0
  24. data/lib/isodoc/iso/html/scripts.html +18 -0
  25. data/lib/isodoc/iso/html/style-human.scss +23 -0
  26. data/lib/isodoc/iso/html/style-iso.scss +18 -0
  27. data/lib/isodoc/iso/html/word_iso_intro.html +4 -0
  28. data/lib/isodoc/iso/html/word_iso_titlepage.html +21 -0
  29. data/lib/isodoc/iso/html/wordstyle.scss +45 -4
  30. data/lib/isodoc/iso/iso.amendment.xsl +5082 -0
  31. data/lib/isodoc/iso/iso.international-standard.xsl +1226 -530
  32. data/lib/isodoc/iso/metadata.rb +67 -23
  33. data/lib/isodoc/iso/pdf_convert.rb +5 -11
  34. data/lib/isodoc/iso/presentation_xml_convert.rb +13 -0
  35. data/lib/isodoc/iso/sections.rb +66 -0
  36. data/lib/isodoc/iso/sts_convert.rb +31 -0
  37. data/lib/isodoc/iso/xref.rb +111 -0
  38. data/lib/metanorma-iso.rb +2 -0
  39. data/lib/metanorma/iso/processor.rb +20 -9
  40. data/lib/metanorma/iso/version.rb +1 -1
  41. data/metanorma-iso.gemspec +5 -2
  42. data/spec/asciidoctor-iso/amd_spec.rb +726 -0
  43. data/spec/asciidoctor-iso/base_spec.rb +24 -20
  44. data/spec/asciidoctor-iso/cleanup_spec.rb +2 -2
  45. data/spec/asciidoctor-iso/macros_spec.rb +33 -17
  46. data/spec/asciidoctor-iso/refs_spec.rb +1 -1
  47. data/spec/asciidoctor-iso/table_spec.rb +1 -1
  48. data/spec/isodoc/amd_spec.rb +652 -0
  49. data/spec/isodoc/blocks_spec.rb +112 -27
  50. data/spec/isodoc/inline_spec.rb +2 -2
  51. data/spec/isodoc/metadata_spec.rb +88 -4
  52. data/spec/isodoc/postproc_spec.rb +11 -11
  53. data/spec/isodoc/ref_spec.rb +7 -7
  54. data/spec/isodoc/section_spec.rb +28 -1
  55. data/spec/isodoc/table_spec.rb +29 -29
  56. data/spec/isodoc/terms_spec.rb +4 -4
  57. data/spec/isodoc/xref_spec.rb +32 -26
  58. data/spec/metanorma/processor_spec.rb +2 -2
  59. data/spec/spec_helper.rb +11 -0
  60. metadata +61 -11
@@ -391,7 +391,7 @@ OUTPUT
391
391
  <h2>1.1&#160; Introduction</h2>
392
392
  </div>
393
393
  <div id="O">
394
- <span class="zzMoveToFollowing"><b>1.2&#160; Clause 4.2 </b></span>
394
+ <span class="zzMoveToFollowing"><b>1.2&#160; Clause 4.2&#160; </b></span>
395
395
  </div>
396
396
  </div>
397
397
  </div>
@@ -458,5 +458,32 @@ OUTPUT
458
458
  OUTPUT
459
459
  end
460
460
 
461
+ it "processes middle title" do
462
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
463
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
464
+ <bibdata>
465
+ <title language='en' format='text/plain' type='title-intro'>Introduction</title>
466
+ <title language='en' format='text/plain' type='title-main'>Main Title — Title</title>
467
+ <title language='en' format='text/plain' type='title-part'>Title Part</title>
468
+ <ext>
469
+ <structuredidentifier>
470
+ <project-number part='1' origyr='2016-05-01'>17301</project-number>
471
+ </structuredidentifier>
472
+ </ext>
473
+ </bibdata>
474
+ <sections/>
475
+ </iso-standard>
476
+ INPUT
477
+ #{HTML_HDR}
478
+ <p class='zzSTDTitle1'>Introduction &#8212; Main Title&#8201;&#8212;&#8201;Title &#8212; </p>
479
+ <p class='zzSTDTitle2'>
480
+ Part&#160;1:
481
+ <br/><b>Title Part</b>
482
+ </p>
483
+ </div>
484
+ </body>
485
+ </html>
486
+ OUTPUT
487
+ end
461
488
 
462
489
  end
@@ -80,55 +80,55 @@ RSpec.describe IsoDoc do
80
80
  </caption>
81
81
  <thead>
82
82
  <tr>
83
- <td rowspan='2' style='text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;;text-align:center;vertical-align:middle;' scope='col'>Description</td>
84
- <td colspan='4' style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;padding:0;;text-align:center;vertical-align:middle;' scope='colgroup'>Rice sample</td>
83
+ <td rowspan='2' style='text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;;text-align:center;vertical-align:middle;' scope='col'>Description</td>
84
+ <td colspan='4' style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;;text-align:center;vertical-align:middle;' scope='colgroup'>Rice sample</td>
85
85
  </tr>
86
86
  <tr>
87
- <td style='text-align:left;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;;text-align:center;vertical-align:middle;' scope='col'>Arborio</td>
88
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;;text-align:center;vertical-align:middle;' scope='col'>
87
+ <td style='text-align:left;border-top:none;border-bottom:solid windowtext 1.5pt;;text-align:center;vertical-align:middle;' scope='col'>Arborio</td>
88
+ <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;;text-align:center;vertical-align:middle;' scope='col'>
89
89
  Drago
90
- <a href='#tableD-1a' class='TableFootnoteRef'>a)</a>
90
+ <a href='#tableD-1a' class='TableFootnoteRef'>a</a>
91
91
  </td>
92
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;;text-align:center;vertical-align:middle;' scope='col'>
92
+ <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;;text-align:center;vertical-align:middle;' scope='col'>
93
93
  Balilla
94
- <a href='#tableD-1a' class='TableFootnoteRef'>a)</a>
94
+ <a href='#tableD-1a' class='TableFootnoteRef'>a</a>
95
95
  </td>
96
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;;text-align:center;vertical-align:middle;' scope='col'>Thaibonnet</td>
96
+ <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;;text-align:center;vertical-align:middle;' scope='col'>Thaibonnet</td>
97
97
  </tr>
98
98
  </thead>
99
99
  <tbody>
100
100
  <tr>
101
- <th style='font-weight:bold;text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;padding:0;' scope='row'>Number of laboratories retained after eliminating outliers</th>
102
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;padding:0;'>13</td>
103
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;padding:0;'>11</td>
104
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;padding:0;'>13</td>
105
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;padding:0;'>13</td>
101
+ <th style='font-weight:bold;text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;' scope='row'>Number of laboratories retained after eliminating outliers</th>
102
+ <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;'>13</td>
103
+ <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;'>11</td>
104
+ <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;'>13</td>
105
+ <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;'>13</td>
106
106
  </tr>
107
107
  <tr>
108
- <td style='text-align:left;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;'>Mean value, g/100 g</td>
109
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;'>81,2</td>
110
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;'>82,0</td>
111
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;'>81,8</td>
112
- <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;padding:0;'>77,7</td>
108
+ <td style='text-align:left;border-top:none;border-bottom:solid windowtext 1.5pt;'>Mean value, g/100 g</td>
109
+ <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;'>81,2</td>
110
+ <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;'>82,0</td>
111
+ <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;'>81,8</td>
112
+ <td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;'>77,7</td>
113
113
  </tr>
114
114
  </tbody>
115
115
  <tfoot>
116
116
  <tr>
117
- <td style='text-align:left;border-top:solid windowtext 1.5pt;border-bottom:0pt;padding:0;'>
117
+ <td style='text-align:left;border-top:solid windowtext 1.5pt;border-bottom:0pt;'>
118
118
  Reproducibility limit,
119
119
  <span class='stem'>(#(R)#)</span>
120
120
  (= 2,83
121
121
  <span class='stem'>(#(s_R)#)</span>
122
122
  )
123
123
  </td>
124
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;padding:0;'>2,89</td>
125
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;padding:0;'>0,57</td>
126
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;padding:0;'>2,26</td>
127
- <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;padding:0;'>6,06</td>
124
+ <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;'>2,89</td>
125
+ <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;'>0,57</td>
126
+ <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;'>2,26</td>
127
+ <td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;'>6,06</td>
128
128
  </tr>
129
129
  <tr>
130
130
  <td colspan='5' style='border-top:0pt;border-bottom:solid windowtext 1.5pt;'>
131
- <div id='' class='Note'>
131
+ <div class='Note'>
132
132
  <p>
133
133
  <span class='note_label'>NOTE</span>
134
134
  &#xA0; This is a table about rice
@@ -138,7 +138,7 @@ RSpec.describe IsoDoc do
138
138
  <div id='fn:tableD-1a'>
139
139
  <p id='_0fe65e9a-5531-408e-8295-eeff35f41a55' class='TableFootnote'>
140
140
  <span>
141
- <span id='tableD-1a' class='TableFootnoteRef'>a)</span>
141
+ <span id='tableD-1a' class='TableFootnoteRef'>a</span>
142
142
  &#xA0;
143
143
  </span>
144
144
  Parboiled rice.
@@ -233,8 +233,8 @@ OUTPUT
233
233
  </tr>
234
234
  <tr>
235
235
  <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;" valign="middle">Arborio</td>
236
- <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;" valign="middle">Drago<a href="#tableD-1a" class="TableFootnoteRef">a)</a></td>
237
- <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;" valign="middle">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a)</a></td>
236
+ <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;" valign="middle">Drago<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
237
+ <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;" valign="middle">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
238
238
  <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;" valign="middle">Thaibonnet</td>
239
239
  </tr>
240
240
  </thead>
@@ -268,10 +268,10 @@ OUTPUT
268
268
  <td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:0pt;mso-border-bottom-alt:0pt;">2,26</td>
269
269
  <td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:0pt;mso-border-bottom-alt:0pt;">6,06</td>
270
270
  </tr>
271
- <tr><td colspan="5" style="border-top:0pt;mso-border-top-alt:0pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;"><div id="" class="Note">
271
+ <tr><td colspan="5" style="border-top:0pt;mso-border-top-alt:0pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;"><div class="Note">
272
272
  <p class="Note"><span class="note_label">NOTE</span><span style="mso-tab-count:1">&#xA0; </span>This is a table about rice</p>
273
273
  </div><div class="TableFootnote"><div><a name="ftntableD-1a" id="ftntableD-1a"></a>
274
- <p class="TableFootnote"><a name="_0fe65e9a-5531-408e-8295-eeff35f41a55" id="_0fe65e9a-5531-408e-8295-eeff35f41a55"></a><span><span class="TableFootnoteRef"><a name="tableD-1a" id="tableD-1a"></a>a)</span><span style="mso-tab-count:1">&#xA0; </span></span>Parboiled rice.</p>
274
+ <p class="TableFootnote"><a name="_0fe65e9a-5531-408e-8295-eeff35f41a55" id="_0fe65e9a-5531-408e-8295-eeff35f41a55"></a><span><span class="TableFootnoteRef"><a name="tableD-1a" id="tableD-1a"></a>a</span><span style="mso-tab-count:1">&#xA0; </span></span>Parboiled rice.</p>
275
275
  </div></div></td></tr></tfoot>
276
276
 
277
277
 
@@ -79,8 +79,8 @@ RSpec.describe IsoDoc do
79
79
  <li>A</li>
80
80
  </ul>
81
81
  </div>
82
- <div class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
83
- <div class="Note"><p>Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
82
+ <div id='_671a1994-4783-40d0-bc81-987d06ffb74e' class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
83
+ <div id='_671a1994-4783-40d0-bc81-987d06ffb74f' class="Note"><p>Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
84
84
  <p>[TERMREF]
85
85
  <a href="#ISO7301">ISO 7301:2011, 3.1</a>
86
86
  [/TERMREF]</p></div>
@@ -166,8 +166,8 @@ OUTPUT
166
166
  <li>A</li>
167
167
  </ul>
168
168
  </div>
169
- <div class="Note"><p class="Note">Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
170
- <div class="Note"><p class="Note">Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
169
+ <div id='_671a1994-4783-40d0-bc81-987d06ffb74e' class="Note"><p class="Note">Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
170
+ <div id='_671a1994-4783-40d0-bc81-987d06ffb74f' class="Note"><p class="Note">Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
171
171
  <p>[TERMREF]
172
172
  <a href="#ISO7301">ISO 7301:2011, 3.1</a>
173
173
  [/TERMREF]</p></div>
@@ -303,11 +303,11 @@ RSpec.describe IsoDoc do
303
303
  <h1 class="ForewordTitle">Foreword</h1>
304
304
  <p>
305
305
  <a href="#N">Figure 1</a>
306
- <a href="#note1">Figure 1-1</a>
307
- <a href="#note2">Figure 1-2</a>
306
+ <a href="#note1">Figure 1 a)</a>
307
+ <a href="#note2">Figure 1 b)</a>
308
308
  <a href="#AN">Figure A.1</a>
309
- <a href="#Anote1">Figure A.1-1</a>
310
- <a href="#Anote2">Figure A.1-2</a>
309
+ <a href="#Anote1">Figure A.1 a)</a>
310
+ <a href="#Anote2">Figure A.1 b)</a>
311
311
  </p>
312
312
  </div>
313
313
  <p class="zzSTDTitle1"/>
@@ -323,14 +323,17 @@ RSpec.describe IsoDoc do
323
323
  <div id="note1" class="figure">
324
324
 
325
325
  <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
326
- <p class="FigureTitle" style="text-align:center;">Figure 1-1&#160;&#8212; Split-it-right sample divider</p></div>
326
+ <p class='FigureTitle' style='text-align:center;'>a)&#160;&#8212; Split-it-right sample divider</p>
327
+ </div>
327
328
  <div id="note2" class="figure">
328
329
 
329
330
  <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
330
- <p class="FigureTitle" style="text-align:center;">Figure 1-2&#160;&#8212; Split-it-right sample divider</p></div>
331
+ <p class='FigureTitle' style='text-align:center;'>b)&#160;&#8212; Split-it-right sample divider</p>
331
332
  </div>
332
- <p> <a href="#note1">Figure 1-1</a> <a href="#note2">Figure 1-2</a> </p>
333
+ <p class='FigureTitle' style='text-align:center;'>Figure 1</p>
333
334
  </div>
335
+ <p> <a href="#note1">Figure 1 a)</a> <a href="#note2">Figure 1 b)</a> </p>
336
+ </div>
334
337
  </div>
335
338
  <br/>
336
339
  <div id="annex1" class="Section3">
@@ -349,12 +352,15 @@ RSpec.describe IsoDoc do
349
352
  <div id="Anote1" class="figure">
350
353
 
351
354
  <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
352
- <p class="FigureTitle" style="text-align:center;">Figure A.1-1&#160;&#8212; Split-it-right sample divider</p></div>
355
+ <p class='FigureTitle' style='text-align:center;'>a)&#160;&#8212; Split-it-right sample divider</p>
356
+ </div>
353
357
  <div id="Anote2" class="figure">
354
358
 
355
359
  <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
356
- <p class="FigureTitle" style="text-align:center;">Figure A.1-2&#160;&#8212; Split-it-right sample divider</p></div>
360
+ <p class='FigureTitle' style='text-align:center;'>b)&#160;&#8212; Split-it-right sample divider</p>
357
361
  </div>
362
+ <p class='FigureTitle' style='text-align:center;'>Figure A.1</p>
363
+ </div>
358
364
  </div>
359
365
  </div>
360
366
  </div>
@@ -555,7 +561,7 @@ RSpec.describe IsoDoc do
555
561
  <p class="zzSTDTitle1"/>
556
562
  <div id="scope">
557
563
  <h1>1&#160; Scope</h1>
558
- <div id="N" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</p></div>
564
+ <div id="N"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</p></div></div>
559
565
  <p>
560
566
  <a href="#N">Formula (1)</a>
561
567
  </p>
@@ -565,8 +571,8 @@ RSpec.describe IsoDoc do
565
571
  <div id="widgets">
566
572
  <h1>3&#160; Widgets</h1>
567
573
  <div id="widgets1"><span class='zzMoveToFollowing'><b>3.1&#160; </b></span>
568
- <div id="note1" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (2)</p></div>
569
- <div id="note2" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (3)</p></div>
574
+ <div id="note1"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (2)</p></div></div>
575
+ <div id="note2"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (3)</p></div></div>
570
576
  <p> <a href="#note1">Formula (2)</a> <a href="#note2">Formula (3)</a> </p>
571
577
  </div>
572
578
  </div>
@@ -581,11 +587,11 @@ RSpec.describe IsoDoc do
581
587
  <b/>
582
588
  </h1>
583
589
  <div id="annex1a"><span class='zzMoveToFollowing'><b>A.1&#160; </b></span>
584
- <div id="AN" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (A.1)</p></div>
590
+ <div id="AN"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (A.1)</p></div></div>
585
591
  </div>
586
592
  <div id="annex1b"><span class='zzMoveToFollowing'><b>A.2&#160; </b></span>
587
- <div id="Anote1" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (A.2)</p></div>
588
- <div id="Anote2" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (A.3)</p></div>
593
+ <div id="Anote1"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (A.2)</p></div></div>
594
+ <div id="Anote2"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (A.3)</p></div></div>
589
595
  </div>
590
596
  </div>
591
597
  </div>
@@ -710,9 +716,9 @@ RSpec.describe IsoDoc do
710
716
  <table id="N" class="MsoISOTable" style="border-width:1px;border-spacing:0;">
711
717
  <tbody>
712
718
  <tr>
713
- <td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">Number of laboratories retained after eliminating outliers</td>
714
- <td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">13</td>
715
- <td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">11</td>
719
+ <td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td>
720
+ <td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td>
721
+ <td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td>
716
722
  </tr>
717
723
  </tbody>
718
724
  </table>
@@ -725,8 +731,8 @@ RSpec.describe IsoDoc do
725
731
  <div id="widgets">
726
732
  <h1>3&#160; Widgets</h1>
727
733
  <div id="widgets1"><span class='zzMoveToFollowing'><b>3.1&#160; </b></span>
728
- <p class="TableTitle" style="text-align:center;">Table 2&#160;&#8212; Repeatability and reproducibility of husked rice yield</p><table id="note1" class="MsoISOTable" style="border-width:1px;border-spacing:0;"><tbody><tr><td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">Number of laboratories retained after eliminating outliers</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">13</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">11</td></tr></tbody></table>
729
- <p class="TableTitle" style="text-align:center;">Table 3&#160;&#8212; Repeatability and reproducibility of husked rice yield</p><table id="note2" class="MsoISOTable" style="border-width:1px;border-spacing:0;"><tbody><tr><td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">Number of laboratories retained after eliminating outliers</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">13</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">11</td></tr></tbody></table>
734
+ <p class="TableTitle" style="text-align:center;">Table 2&#160;&#8212; Repeatability and reproducibility of husked rice yield</p><table id="note1" class="MsoISOTable" style="border-width:1px;border-spacing:0;"><tbody><tr><td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
735
+ <p class="TableTitle" style="text-align:center;">Table 3&#160;&#8212; Repeatability and reproducibility of husked rice yield</p><table id="note2" class="MsoISOTable" style="border-width:1px;border-spacing:0;"><tbody><tr><td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
730
736
  <p> <a href="#note1">Table 2</a> <a href="#note2">Table 3</a> </p>
731
737
  </div>
732
738
  </div>
@@ -741,11 +747,11 @@ RSpec.describe IsoDoc do
741
747
  <b/>
742
748
  </h1>
743
749
  <div id="annex1a"><span class='zzMoveToFollowing'><b>A.1&#160; </b></span>
744
- <p class="TableTitle" style="text-align:center;">Table A.1&#160;&#8212; Repeatability and reproducibility of husked rice yield</p><table id="AN" class="MsoISOTable" style="border-width:1px;border-spacing:0;"><tbody><tr><td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">Number of laboratories retained after eliminating outliers</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">13</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">11</td></tr></tbody></table>
750
+ <p class="TableTitle" style="text-align:center;">Table A.1&#160;&#8212; Repeatability and reproducibility of husked rice yield</p><table id="AN" class="MsoISOTable" style="border-width:1px;border-spacing:0;"><tbody><tr><td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
745
751
  </div>
746
752
  <div id="annex1b"><span class='zzMoveToFollowing'><b>A.2&#160; </b></span>
747
- <p class="TableTitle" style="text-align:center;">Table A.2&#160;&#8212; Repeatability and reproducibility of husked rice yield</p><table id="Anote1" class="MsoISOTable" style="border-width:1px;border-spacing:0;"><tbody><tr><td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">Number of laboratories retained after eliminating outliers</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">13</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">11</td></tr></tbody></table>
748
- <p class="TableTitle" style="text-align:center;">Table A.3&#160;&#8212; Repeatability and reproducibility of husked rice yield</p><table id="Anote2" class="MsoISOTable" style="border-width:1px;border-spacing:0;"><tbody><tr><td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">Number of laboratories retained after eliminating outliers</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">13</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;padding:0;">11</td></tr></tbody></table>
753
+ <p class="TableTitle" style="text-align:center;">Table A.2&#160;&#8212; Repeatability and reproducibility of husked rice yield</p><table id="Anote1" class="MsoISOTable" style="border-width:1px;border-spacing:0;"><tbody><tr><td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
754
+ <p class="TableTitle" style="text-align:center;">Table A.3&#160;&#8212; Repeatability and reproducibility of husked rice yield</p><table id="Anote2" class="MsoISOTable" style="border-width:1px;border-spacing:0;"><tbody><tr><td style="text-align:left;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
749
755
  </div>
750
756
  </div>
751
757
  </div>
@@ -801,9 +807,9 @@ RSpec.describe IsoDoc do
801
807
  </div>
802
808
  <div id="terms"><h1>2&#160; </h1>
803
809
  <p class="TermNum" id="_waxy_rice">2.1</p><p class="Terms" style="text-align:left;">waxy rice</p>
804
- <div class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div><p class="TermNum" id="_nonwaxy_rice">2.2</p><p class="Terms" style="text-align:left;">nonwaxy rice</p>
805
- <div class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
806
- <div class="Note"><p>Note 2 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div></div>
810
+ <div id="note1" class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div><p class="TermNum" id="_nonwaxy_rice">2.2</p><p class="Terms" style="text-align:left;">nonwaxy rice</p>
811
+ <div id="note2" class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
812
+ <div id="note3" class="Note"><p>Note 2 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div></div>
807
813
  </div>
808
814
  </body>
809
815
  </html>
@@ -15,7 +15,7 @@ RSpec.describe Metanorma::Iso::Processor do
15
15
 
16
16
  it "registers output formats against metanorma" do
17
17
  expect(processor.output_formats.sort.to_s).to be_equivalent_to <<~"OUTPUT"
18
- [[:doc, "doc"], [:html, "html"], [:html_alt, "alt.html"], [:pdf, "pdf"], [:rxl, "rxl"], [:xml, "xml"]]
18
+ [[:doc, "doc"], [:html, "html"], [:html_alt, "alt.html"], [:pdf, "pdf"], [:presentation, "presentation.xml"], [:rxl, "rxl"], [:sts, "sts.xml"], [:xml, "xml"]]
19
19
  OUTPUT
20
20
  end
21
21
 
@@ -35,7 +35,7 @@ RSpec.describe Metanorma::Iso::Processor do
35
35
 
36
36
  it "generates HTML from IsoDoc XML" do
37
37
  FileUtils.rm_f "test.xml"
38
- processor.output(<<~"INPUT", "test.html", :html)
38
+ processor.output(<<~"INPUT", "test.xml", "test.html", :html)
39
39
  <iso-standard xmlns="http://riboseinc.com/isoxml">
40
40
  <sections>
41
41
  <terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title>
@@ -47,6 +47,17 @@ ASCIIDOC_BLANK_HDR = <<~"HDR"
47
47
 
48
48
  HDR
49
49
 
50
+ AMD_BLANK_HDR = <<~"HDR"
51
+ = Document title
52
+ Author
53
+ :docfile: test.adoc
54
+ :nodoc:
55
+ :novalid:
56
+ :no-isobib:
57
+ :doctype: amendment
58
+
59
+ HDR
60
+
50
61
  ISOBIB_BLANK_HDR = <<~"HDR"
51
62
  = Document title
52
63
  Author
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.24
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-13 00:00:00.000000000 Z
11
+ date: 2020-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing
@@ -30,28 +30,70 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0
33
+ version: 1.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.0
40
+ version: 1.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: metanorma-standoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.3.0
47
+ version: 1.4.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.3.0
54
+ version: 1.4.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: tokenizer
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.3.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.3.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: twitter_cldr
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: mn2sts
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 1.2.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.2.0
55
97
  - !ruby/object:Gem::Dependency
56
98
  name: byebug
57
99
  requirement: !ruby/object:Gem::Requirement
@@ -232,10 +274,12 @@ files:
232
274
  - lib/asciidoctor/iso/cleanup.rb
233
275
  - lib/asciidoctor/iso/converter.rb
234
276
  - lib/asciidoctor/iso/front.rb
277
+ - lib/asciidoctor/iso/front_id.rb
235
278
  - lib/asciidoctor/iso/i18n-en.yaml
236
279
  - lib/asciidoctor/iso/i18n-fr.yaml
237
280
  - lib/asciidoctor/iso/i18n-zh-Hans.yaml
238
281
  - lib/asciidoctor/iso/isodoc.rng
282
+ - lib/asciidoctor/iso/isostandard-amd.rng
239
283
  - lib/asciidoctor/iso/isostandard.rnc
240
284
  - lib/asciidoctor/iso/isostandard.rng
241
285
  - lib/asciidoctor/iso/macros.rb
@@ -260,15 +304,21 @@ files:
260
304
  - lib/isodoc/iso/html/word_iso_titlepage.html
261
305
  - lib/isodoc/iso/html/wordstyle.scss
262
306
  - lib/isodoc/iso/html_convert.rb
307
+ - lib/isodoc/iso/iso.amendment.xsl
263
308
  - lib/isodoc/iso/iso.international-standard.xsl
264
309
  - lib/isodoc/iso/metadata.rb
265
310
  - lib/isodoc/iso/pdf_convert.rb
311
+ - lib/isodoc/iso/presentation_xml_convert.rb
312
+ - lib/isodoc/iso/sections.rb
313
+ - lib/isodoc/iso/sts_convert.rb
266
314
  - lib/isodoc/iso/word_convert.rb
315
+ - lib/isodoc/iso/xref.rb
267
316
  - lib/metanorma-iso.rb
268
317
  - lib/metanorma/iso.rb
269
318
  - lib/metanorma/iso/processor.rb
270
319
  - lib/metanorma/iso/version.rb
271
320
  - metanorma-iso.gemspec
321
+ - spec/asciidoctor-iso/amd_spec.rb
272
322
  - spec/asciidoctor-iso/base_spec.rb
273
323
  - spec/asciidoctor-iso/blocks_spec.rb
274
324
  - spec/asciidoctor-iso/cleanup_spec.rb
@@ -308,6 +358,7 @@ files:
308
358
  - spec/examples/rice_img/rice_image3_1.png
309
359
  - spec/examples/rice_img/rice_image3_2.png
310
360
  - spec/examples/rice_img/rice_image3_3.png
361
+ - spec/isodoc/amd_spec.rb
311
362
  - spec/isodoc/blocks_spec.rb
312
363
  - spec/isodoc/i18n_spec.rb
313
364
  - spec/isodoc/inline_spec.rb
@@ -325,7 +376,7 @@ homepage: https://github.com/metanorma/metanorma-iso
325
376
  licenses:
326
377
  - BSD-2-Clause
327
378
  metadata: {}
328
- post_install_message:
379
+ post_install_message:
329
380
  rdoc_options: []
330
381
  require_paths:
331
382
  - lib
@@ -340,9 +391,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
340
391
  - !ruby/object:Gem::Version
341
392
  version: '0'
342
393
  requirements: []
343
- rubyforge_project:
344
- rubygems_version: 2.7.6
345
- signing_key:
394
+ rubygems_version: 3.0.3
395
+ signing_key:
346
396
  specification_version: 4
347
397
  summary: metanorma-iso lets you write ISO standards in AsciiDoc.
348
398
  test_files: []