metanorma-iso 1.3.21 → 1.3.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +8 -7
  3. data/.github/workflows/ubuntu.yml +8 -7
  4. data/.github/workflows/windows.yml +8 -8
  5. data/Gemfile +2 -0
  6. data/lib/asciidoctor/iso/base.rb +22 -0
  7. data/lib/asciidoctor/iso/biblio.rng +142 -37
  8. data/lib/asciidoctor/iso/cleanup.rb +19 -2
  9. data/lib/asciidoctor/iso/front.rb +19 -72
  10. data/lib/asciidoctor/iso/front_id.rb +196 -0
  11. data/lib/asciidoctor/iso/isodoc.rng +48 -2
  12. data/lib/asciidoctor/iso/isostandard-amd.rng +98 -0
  13. data/lib/asciidoctor/iso/isostandard.rng +17 -1
  14. data/lib/asciidoctor/iso/macros.rb +21 -0
  15. data/lib/asciidoctor/iso/section.rb +18 -32
  16. data/lib/asciidoctor/iso/term_lookup_cleanup.rb +87 -0
  17. data/lib/asciidoctor/iso/validate.rb +41 -21
  18. data/lib/asciidoctor/iso/validate_requirements.rb +1 -1
  19. data/lib/asciidoctor/iso/validate_section.rb +2 -2
  20. data/lib/asciidoctor/iso/validate_style.rb +7 -6
  21. data/lib/isodoc/iso/base_convert.rb +48 -64
  22. data/lib/isodoc/iso/html/header.html +10 -6
  23. data/lib/isodoc/iso/html/html_iso_titlepage.html +27 -18
  24. data/lib/isodoc/iso/html/isodoc.scss +49 -28
  25. data/lib/isodoc/iso/html/scripts.html +23 -21
  26. data/lib/isodoc/iso/html/style-human.scss +25 -2
  27. data/lib/isodoc/iso/html/style-iso.scss +20 -2
  28. data/lib/isodoc/iso/html/word_iso_titlepage.html +23 -2
  29. data/lib/isodoc/iso/html/wordstyle.scss +80 -39
  30. data/lib/isodoc/iso/html_convert.rb +7 -9
  31. data/lib/isodoc/iso/iso.amendment.xsl +4597 -0
  32. data/lib/isodoc/iso/iso.international-standard.xsl +4597 -0
  33. data/lib/isodoc/iso/metadata.rb +74 -44
  34. data/lib/isodoc/iso/pdf_convert.rb +39 -0
  35. data/lib/isodoc/iso/sections.rb +66 -0
  36. data/lib/isodoc/iso/sts_convert.rb +29 -0
  37. data/lib/metanorma-iso.rb +2 -0
  38. data/lib/metanorma/iso/processor.rb +16 -1
  39. data/lib/metanorma/iso/version.rb +1 -1
  40. data/metanorma-iso.gemspec +4 -1
  41. data/spec/asciidoctor-iso/amd_spec.rb +726 -0
  42. data/spec/asciidoctor-iso/base_spec.rb +43 -21
  43. data/spec/asciidoctor-iso/blocks_spec.rb +21 -9
  44. data/spec/asciidoctor-iso/cleanup_spec.rb +203 -175
  45. data/spec/asciidoctor-iso/inline_spec.rb +2 -1
  46. data/spec/asciidoctor-iso/macros_spec.rb +275 -0
  47. data/spec/asciidoctor-iso/refs_spec.rb +7 -4
  48. data/spec/asciidoctor-iso/section_spec.rb +8 -8
  49. data/spec/assets/iso.xml +64 -1
  50. data/spec/isodoc/amd_spec.rb +606 -0
  51. data/spec/isodoc/i18n_spec.rb +12 -20
  52. data/spec/isodoc/inline_spec.rb +2 -2
  53. data/spec/isodoc/iso_spec.rb +1 -1
  54. data/spec/isodoc/metadata_spec.rb +12 -4
  55. data/spec/isodoc/postproc_spec.rb +20 -119
  56. data/spec/isodoc/ref_spec.rb +5 -5
  57. data/spec/isodoc/section_spec.rb +36 -13
  58. data/spec/isodoc/table_spec.rb +22 -22
  59. data/spec/isodoc/terms_spec.rb +2 -2
  60. data/spec/isodoc/xref_spec.rb +19 -19
  61. data/spec/metanorma/processor_spec.rb +2 -2
  62. data/spec/spec_helper.rb +13 -1
  63. metadata +57 -5
  64. data/asciidoctor-iso.gemspec.old +0 -50
@@ -12,9 +12,7 @@ RSpec.describe IsoDoc do
12
12
  <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
13
13
  <title>Introduction Subsection</title>
14
14
  </clause>
15
- <patent-notice>
16
15
  <p>This is patent boilerplate</p>
17
- </patent-notice>
18
16
  </introduction></preface><sections>
19
17
  <clause id="D" obligation="normative">
20
18
  <title>Scope</title>
@@ -58,12 +56,12 @@ RSpec.describe IsoDoc do
58
56
  <appendix id="Q2" inline-header="false" obligation="normative">
59
57
  <title>An Appendix</title>
60
58
  </appendix>
61
- <references id="Q3"><title>Annex Bibliography</title></references>
62
- </annex><bibliography><references id="R" obligation="informative">
59
+ <references id="Q3" normative="false"><title>Annex Bibliography</title></references>
60
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
63
61
  <title>Normative References</title>
64
62
  </references><clause id="S" obligation="informative">
65
63
  <title>Bibliography</title>
66
- <references id="T" obligation="informative">
64
+ <references id="T" obligation="informative" normative="false">
67
65
  <title>Bibliography Subsection</title>
68
66
  </references>
69
67
  </clause>
@@ -92,7 +90,7 @@ RSpec.describe IsoDoc do
92
90
  <div>
93
91
  <h1>2&#160; Normative references</h1>
94
92
  </div>
95
- <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
93
+ <div id="H"><h1>3&#160; Terms, Definitions, Symbols and Abbreviated Terms</h1>
96
94
  <div id="I">
97
95
  <h2>3.1&#160; Normal Terms</h2>
98
96
  <p class="TermNum" id="J">3.1.1</p>
@@ -160,9 +158,7 @@ OUTPUT
160
158
  <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
161
159
  <title>Introduction Subsection</title>
162
160
  </clause>
163
- <patent-notice>
164
161
  <p>This is patent boilerplate</p>
165
- </patent-notice>
166
162
  </introduction></preface><sections>
167
163
  <clause id="D" obligation="normative">
168
164
  <title>Scope</title>
@@ -206,11 +202,11 @@ OUTPUT
206
202
  <appendix id="Q2" inline-header="false" obligation="normative">
207
203
  <title>An Appendix</title>
208
204
  </appendix>
209
- </annex><bibliography><references id="R" obligation="informative">
205
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
210
206
  <title>Normative References</title>
211
207
  </references><clause id="S" obligation="informative">
212
208
  <title>Bibliography</title>
213
- <references id="T" obligation="informative">
209
+ <references id="T" obligation="informative" normative="false">
214
210
  <title>Bibliography Subsection</title>
215
211
  </references>
216
212
  </clause>
@@ -248,7 +244,7 @@ OUTPUT
248
244
  <div>
249
245
  <h1>2<span style="mso-tab-count:1">&#160; </span>Normative references</h1>
250
246
  </div>
251
- <div id="H"><h1>3<span style="mso-tab-count:1">&#160; </span>Terms, definitions, symbols and abbreviated terms</h1>
247
+ <div id="H"><h1>3<span style="mso-tab-count:1">&#160; </span>Terms, Definitions, Symbols and Abbreviated Terms</h1>
252
248
  <div id="I">
253
249
  <h2>3.1<span style="mso-tab-count:1">&#160; </span>Normal Terms</h2>
254
250
  <p class="TermNum" id="J">3.1.1</p>
@@ -363,7 +359,7 @@ OUTPUT
363
359
  INPUT
364
360
  #{HTML_HDR}
365
361
  <p class="zzSTDTitle1"/>
366
- <div id="H"><h1>1&#160; Terms and definitions</h1>
362
+ <div id="H"><h1>1&#160; Terms, Definitions, Symbols and Abbreviated Terms</h1>
367
363
  <p class="TermNum" id="J">1.1</p>
368
364
  <p class="Terms" style="text-align:left;">Term2</p>
369
365
  </div>
@@ -395,7 +391,7 @@ OUTPUT
395
391
  <h2>1.1&#160; Introduction</h2>
396
392
  </div>
397
393
  <div id="O">
398
- <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>
399
395
  </div>
400
396
  </div>
401
397
  </div>
@@ -462,5 +458,32 @@ OUTPUT
462
458
  OUTPUT
463
459
  end
464
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
465
488
 
466
489
  end
@@ -68,7 +68,7 @@ RSpec.describe IsoDoc do
68
68
  <button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
69
69
  <br/>
70
70
  <div>
71
- <h1 class='ForewordTitle'>Foreword</h1>
71
+ <h1 class='ForewordTitle' id="toc0">Foreword</h1>
72
72
  <p class='TableTitle' style='text-align:center;'>
73
73
  Table 1&#xA0;&#x2014; Repeatability and reproducibility of
74
74
  <i>husked</i>
@@ -80,51 +80,51 @@ 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
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
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;'>
@@ -54,7 +54,7 @@ RSpec.describe IsoDoc do
54
54
  INPUT
55
55
  #{HTML_HDR}
56
56
  <p class="zzSTDTitle1"/>
57
- <div id="_terms_and_definitions"><h1>1&#160; Terms and definitions</h1>
57
+ <div id="_terms_and_definitions"><h1>1&#160; Terms and Definitions</h1>
58
58
  <p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
59
59
 
60
60
  <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
@@ -141,7 +141,7 @@ OUTPUT
141
141
  </sections>
142
142
  </iso-standard>
143
143
  INPUT
144
- <div id="_terms_and_definitions"><h1>1<span style="mso-tab-count:1">&#160; </span>Terms and definitions</h1>
144
+ <div id="_terms_and_definitions"><h1>1<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1>
145
145
  <p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
146
146
 
147
147
  <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
@@ -78,7 +78,7 @@ RSpec.describe IsoDoc do
78
78
  <a href="#N">Note</a>
79
79
  </p>
80
80
  </div>
81
- <div id="terms"><h1>2&#160; Terms and definitions</h1>
81
+ <div id="terms"><h1>2&#160; </h1>
82
82
  </div>
83
83
  <div id="widgets">
84
84
  <h1>3&#160; Widgets</h1>
@@ -195,7 +195,7 @@ RSpec.describe IsoDoc do
195
195
  <a href="#N">Figure 1</a>
196
196
  </p>
197
197
  </div>
198
- <div id="terms"><h1>2&#160; Terms and definitions</h1>
198
+ <div id="terms"><h1>2&#160; </h1>
199
199
  </div>
200
200
  <div id="widgets">
201
201
  <h1>3&#160; Widgets</h1>
@@ -314,7 +314,7 @@ RSpec.describe IsoDoc do
314
314
  <div id="scope">
315
315
  <h1>1&#160; Scope</h1>
316
316
  </div>
317
- <div id="terms"><h1>2&#160; Terms and definitions</h1>
317
+ <div id="terms"><h1>2&#160; </h1>
318
318
  </div>
319
319
  <div id="widgets">
320
320
  <h1>3&#160; Widgets</h1>
@@ -438,7 +438,7 @@ RSpec.describe IsoDoc do
438
438
  <a href="#N">Example</a>
439
439
  </p>
440
440
  </div>
441
- <div id="terms"><h1>2&#160; Terms and definitions</h1>
441
+ <div id="terms"><h1>2&#160; </h1>
442
442
  </div>
443
443
  <div id="widgets">
444
444
  <h1>3&#160; Widgets</h1>
@@ -560,7 +560,7 @@ RSpec.describe IsoDoc do
560
560
  <a href="#N">Formula (1)</a>
561
561
  </p>
562
562
  </div>
563
- <div id="terms"><h1>2&#160; Terms and definitions</h1>
563
+ <div id="terms"><h1>2&#160; </h1>
564
564
  </div>
565
565
  <div id="widgets">
566
566
  <h1>3&#160; Widgets</h1>
@@ -710,9 +710,9 @@ RSpec.describe IsoDoc do
710
710
  <table id="N" class="MsoISOTable" style="border-width:1px;border-spacing:0;">
711
711
  <tbody>
712
712
  <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>
713
+ <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>
714
+ <td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td>
715
+ <td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td>
716
716
  </tr>
717
717
  </tbody>
718
718
  </table>
@@ -720,13 +720,13 @@ RSpec.describe IsoDoc do
720
720
  <a href="#N">Table 1</a>
721
721
  </p>
722
722
  </div>
723
- <div id="terms"><h1>2&#160; Terms and definitions</h1>
723
+ <div id="terms"><h1>2&#160; </h1>
724
724
  </div>
725
725
  <div id="widgets">
726
726
  <h1>3&#160; Widgets</h1>
727
727
  <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>
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;">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>
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;">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
730
  <p> <a href="#note1">Table 2</a> <a href="#note2">Table 3</a> </p>
731
731
  </div>
732
732
  </div>
@@ -741,11 +741,11 @@ RSpec.describe IsoDoc do
741
741
  <b/>
742
742
  </h1>
743
743
  <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>
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;">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
745
  </div>
746
746
  <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>
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;">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>
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;">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
749
  </div>
750
750
  </div>
751
751
  </div>
@@ -799,7 +799,7 @@ RSpec.describe IsoDoc do
799
799
  <div id="scope">
800
800
  <h1>1&#160; Scope</h1>
801
801
  </div>
802
- <div id="terms"><h1>2&#160; Terms and definitions</h1>
802
+ <div id="terms"><h1>2&#160; </h1>
803
803
  <p class="TermNum" id="_waxy_rice">2.1</p><p class="Terms" style="text-align:left;">waxy rice</p>
804
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
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>
@@ -882,11 +882,11 @@ RSpec.describe IsoDoc do
882
882
  <appendix id="Q2" inline-header="false" obligation="normative">
883
883
  <title>An Appendix</title>
884
884
  </appendix>
885
- </annex><bibliography><references id="R" obligation="informative">
885
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
886
886
  <title>Normative References</title>
887
887
  </references><clause id="S" obligation="informative">
888
888
  <title>Bibliography</title>
889
- <references id="T" obligation="informative">
889
+ <references id="T" obligation="informative" normative="false">
890
890
  <title>Bibliography Subsection</title>
891
891
  </references>
892
892
  </clause>
@@ -1058,7 +1058,7 @@ Text
1058
1058
  <li><p>A</p></li>
1059
1059
  </ol>
1060
1060
  </div>
1061
- <div id="terms"><h1>2&#160; Terms and definitions</h1>
1061
+ <div id="terms"><h1>2&#160; </h1>
1062
1062
  </div>
1063
1063
  <div id="widgets">
1064
1064
  <h1>3&#160; Widgets</h1>
@@ -1172,7 +1172,7 @@ Text
1172
1172
  <li id="N"><p>A</p></li>
1173
1173
  </ol>
1174
1174
  </div>
1175
- <div id="terms"><h1>2&#160; Terms and definitions</h1>
1175
+ <div id="terms"><h1>2&#160; </h1>
1176
1176
  </div>
1177
1177
  <div id="widgets">
1178
1178
  <h1>3&#160; Widgets</h1>
@@ -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"], [:rxl, "rxl"], [:xml, "xml"]]
18
+ [[:doc, "doc"], [:html, "html"], [:html_alt, "alt.html"], [:pdf, "pdf"], [:rxl, "rxl"], [:sts, "sts.xml"], [:xml, "xml"]]
19
19
  OUTPUT
20
20
  end
21
21
 
@@ -49,7 +49,7 @@ RSpec.describe Metanorma::Iso::Processor do
49
49
  expect(xmlpp(File.read("test.html", encoding: "utf-8").gsub(%r{^.*<main}m, "<main").gsub(%r{</main>.*}m, "</main>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
50
50
  <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
51
51
  <p class="zzSTDTitle1"></p>
52
- <div id="H"><h1>1&#xA0; Terms and definitions</h1>
52
+ <div id="H"><h1 id="toc0">1&#xA0; Terms, Definitions, Symbols and Abbreviated Terms</h1>
53
53
  <h2 class="TermNum" id="J">1.1</h2>
54
54
  <p class="Terms" style="text-align:left;">Term2</p>
55
55
  </div>
@@ -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
@@ -125,7 +136,7 @@ BLANK_HDR = <<~"HDR"
125
136
  <language>en</language>
126
137
  <script>Latn</script>
127
138
  <status>
128
- <stage>60</stage>
139
+ <stage abbreviation="IS">60</stage>
129
140
  <substage>60</substage>
130
141
  </status>
131
142
  <copyright>
@@ -144,6 +155,7 @@ BLANK_HDR = <<~"HDR"
144
155
  <subcommittee/>
145
156
  <workgroup/>
146
157
  </editorialgroup>
158
+ <stagename>International standard</stagename>
147
159
  </ext>
148
160
  </bibdata>
149
161
  #{BOILERPLATE}
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.21
4
+ version: 1.3.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-03 00:00:00.000000000 Z
11
+ date: 2020-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing
@@ -44,14 +44,56 @@ dependencies:
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
@@ -220,7 +262,6 @@ files:
220
262
  - Makefile
221
263
  - README.adoc
222
264
  - Rakefile
223
- - asciidoctor-iso.gemspec.old
224
265
  - bin/rspec
225
266
  - docs/asciiiso-syntax.adoc
226
267
  - docs/guidance.adoc
@@ -233,14 +274,18 @@ files:
233
274
  - lib/asciidoctor/iso/cleanup.rb
234
275
  - lib/asciidoctor/iso/converter.rb
235
276
  - lib/asciidoctor/iso/front.rb
277
+ - lib/asciidoctor/iso/front_id.rb
236
278
  - lib/asciidoctor/iso/i18n-en.yaml
237
279
  - lib/asciidoctor/iso/i18n-fr.yaml
238
280
  - lib/asciidoctor/iso/i18n-zh-Hans.yaml
239
281
  - lib/asciidoctor/iso/isodoc.rng
282
+ - lib/asciidoctor/iso/isostandard-amd.rng
240
283
  - lib/asciidoctor/iso/isostandard.rnc
241
284
  - lib/asciidoctor/iso/isostandard.rng
285
+ - lib/asciidoctor/iso/macros.rb
242
286
  - lib/asciidoctor/iso/reqt.rng
243
287
  - lib/asciidoctor/iso/section.rb
288
+ - lib/asciidoctor/iso/term_lookup_cleanup.rb
244
289
  - lib/asciidoctor/iso/validate.rb
245
290
  - lib/asciidoctor/iso/validate_requirements.rb
246
291
  - lib/asciidoctor/iso/validate_section.rb
@@ -259,13 +304,19 @@ files:
259
304
  - lib/isodoc/iso/html/word_iso_titlepage.html
260
305
  - lib/isodoc/iso/html/wordstyle.scss
261
306
  - lib/isodoc/iso/html_convert.rb
307
+ - lib/isodoc/iso/iso.amendment.xsl
308
+ - lib/isodoc/iso/iso.international-standard.xsl
262
309
  - lib/isodoc/iso/metadata.rb
310
+ - lib/isodoc/iso/pdf_convert.rb
311
+ - lib/isodoc/iso/sections.rb
312
+ - lib/isodoc/iso/sts_convert.rb
263
313
  - lib/isodoc/iso/word_convert.rb
264
314
  - lib/metanorma-iso.rb
265
315
  - lib/metanorma/iso.rb
266
316
  - lib/metanorma/iso/processor.rb
267
317
  - lib/metanorma/iso/version.rb
268
318
  - metanorma-iso.gemspec
319
+ - spec/asciidoctor-iso/amd_spec.rb
269
320
  - spec/asciidoctor-iso/base_spec.rb
270
321
  - spec/asciidoctor-iso/blocks_spec.rb
271
322
  - spec/asciidoctor-iso/cleanup_spec.rb
@@ -305,6 +356,7 @@ files:
305
356
  - spec/examples/rice_img/rice_image3_1.png
306
357
  - spec/examples/rice_img/rice_image3_2.png
307
358
  - spec/examples/rice_img/rice_image3_3.png
359
+ - spec/isodoc/amd_spec.rb
308
360
  - spec/isodoc/blocks_spec.rb
309
361
  - spec/isodoc/i18n_spec.rb
310
362
  - spec/isodoc/inline_spec.rb