metanorma-iso 1.3.23 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +8 -0
- data/.github/workflows/ubuntu.yml +8 -0
- data/.github/workflows/windows.yml +8 -0
- data/lib/asciidoctor/iso/base.rb +26 -13
- data/lib/asciidoctor/iso/biblio.rng +36 -6
- data/lib/asciidoctor/iso/cleanup.rb +20 -3
- data/lib/asciidoctor/iso/front.rb +16 -107
- data/lib/asciidoctor/iso/front_id.rb +196 -0
- data/lib/asciidoctor/iso/isodoc.rng +450 -4
- data/lib/asciidoctor/iso/isostandard-amd.rng +98 -0
- data/lib/asciidoctor/iso/isostandard.rng +12 -1
- data/lib/asciidoctor/iso/macros.rb +21 -0
- data/lib/asciidoctor/iso/reqt.rng +23 -0
- data/lib/asciidoctor/iso/section.rb +18 -32
- data/lib/asciidoctor/iso/term_lookup_cleanup.rb +87 -0
- data/lib/asciidoctor/iso/validate.rb +41 -25
- data/lib/asciidoctor/iso/validate_requirements.rb +1 -1
- data/lib/asciidoctor/iso/validate_section.rb +2 -2
- data/lib/asciidoctor/iso/validate_style.rb +6 -5
- data/lib/asciidoctor/iso/validate_title.rb +1 -1
- data/lib/isodoc/iso/base_convert.rb +67 -99
- data/lib/isodoc/iso/html/header.html +10 -6
- data/lib/isodoc/iso/html/html_iso_titlepage.html +25 -16
- data/lib/isodoc/iso/html/isodoc.scss +25 -0
- data/lib/isodoc/iso/html/scripts.html +18 -0
- data/lib/isodoc/iso/html/style-human.scss +23 -0
- data/lib/isodoc/iso/html/style-iso.scss +18 -0
- data/lib/isodoc/iso/html/word_iso_intro.html +4 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +21 -0
- data/lib/isodoc/iso/html/wordstyle.scss +45 -4
- data/lib/isodoc/iso/html_convert.rb +7 -0
- data/lib/isodoc/iso/iso.amendment.xsl +5082 -0
- data/lib/isodoc/iso/iso.international-standard.xsl +1899 -796
- data/lib/isodoc/iso/metadata.rb +69 -23
- data/lib/isodoc/iso/pdf_convert.rb +5 -11
- data/lib/isodoc/iso/presentation_xml_convert.rb +13 -0
- data/lib/isodoc/iso/sections.rb +66 -0
- data/lib/isodoc/iso/sts_convert.rb +31 -0
- data/lib/isodoc/iso/xref.rb +111 -0
- data/lib/metanorma-iso.rb +2 -0
- data/lib/metanorma/iso/processor.rb +23 -8
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +5 -2
- data/spec/asciidoctor-iso/amd_spec.rb +726 -0
- data/spec/asciidoctor-iso/base_spec.rb +31 -21
- data/spec/asciidoctor-iso/blocks_spec.rb +6 -6
- data/spec/asciidoctor-iso/cleanup_spec.rb +15 -15
- data/spec/asciidoctor-iso/inline_spec.rb +1 -1
- data/spec/asciidoctor-iso/macros_spec.rb +289 -0
- data/spec/asciidoctor-iso/refs_spec.rb +5 -5
- data/spec/asciidoctor-iso/section_spec.rb +8 -8
- data/spec/asciidoctor-iso/table_spec.rb +1 -1
- data/spec/isodoc/amd_spec.rb +652 -0
- data/spec/isodoc/blocks_spec.rb +112 -27
- data/spec/isodoc/i18n_spec.rb +8 -8
- data/spec/isodoc/inline_spec.rb +4 -4
- data/spec/isodoc/iso_spec.rb +1 -1
- data/spec/isodoc/metadata_spec.rb +90 -4
- data/spec/isodoc/postproc_spec.rb +11 -116
- data/spec/isodoc/ref_spec.rb +9 -9
- data/spec/isodoc/section_spec.rb +33 -6
- data/spec/isodoc/table_spec.rb +29 -29
- data/spec/isodoc/terms_spec.rb +4 -4
- data/spec/isodoc/xref_spec.rb +34 -28
- data/spec/metanorma/processor_spec.rb +2 -2
- data/spec/spec_helper.rb +11 -0
- metadata +63 -12
- data/asciidoctor-iso.gemspec.old +0 -50
data/spec/isodoc/ref_spec.rb
CHANGED
@@ -18,7 +18,7 @@ RSpec.describe IsoDoc do
|
|
18
18
|
<eref bibitemid="ref12"/>
|
19
19
|
</p>
|
20
20
|
</foreword></preface>
|
21
|
-
<bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
|
21
|
+
<bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
|
22
22
|
<p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
|
23
23
|
<bibitem id="ISO712" type="standard">
|
24
24
|
<title format="text/plain">Cereals or cereal products</title>
|
@@ -42,7 +42,7 @@ RSpec.describe IsoDoc do
|
|
42
42
|
<abbreviation>ISO</abbreviation>
|
43
43
|
</organization>
|
44
44
|
</contributor>
|
45
|
-
<note format="text/plain" reference="1"
|
45
|
+
<note format="text/plain" reference="1" type="ISO DATE">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
|
46
46
|
<extent type="part">
|
47
47
|
<referenceFrom>all</referenceFrom>
|
48
48
|
</extent>
|
@@ -65,7 +65,7 @@ RSpec.describe IsoDoc do
|
|
65
65
|
</bibitem>
|
66
66
|
<note><p>This is an annotation of ISO 20483:2013-2014</p></note>
|
67
67
|
|
68
|
-
</references><references id="_bibliography" obligation="informative">
|
68
|
+
</references><references id="_bibliography" obligation="informative" normative="false">
|
69
69
|
<title>Bibliography</title>
|
70
70
|
<bibitem id="ISBN" type="ISBN">
|
71
71
|
<title format="text/plain">Chemicals for analytical laboratory use</title>
|
@@ -131,7 +131,7 @@ RSpec.describe IsoDoc do
|
|
131
131
|
<a href="#ISO16634">ISO 16634:--</a>
|
132
132
|
<a href="#ref1">ICC 167</a>
|
133
133
|
<a href="#ref10">[10]</a>
|
134
|
-
<a href="#ref12">
|
134
|
+
<a href="#ref12">Citn</a>
|
135
135
|
</p>
|
136
136
|
</div>
|
137
137
|
<p class="zzSTDTitle1"/>
|
@@ -139,10 +139,10 @@ RSpec.describe IsoDoc do
|
|
139
139
|
<h1>1  Normative references</h1>
|
140
140
|
<p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
|
141
141
|
<p id="ISO712" class="NormRef">ISO 712, <i>Cereals and cereal products</i></p>
|
142
|
-
<p id="ISO16634" class="NormRef">ISO 16634:-- (all parts)<a
|
142
|
+
<p id="ISO16634" class="NormRef">ISO 16634:-- (all parts)<a class="FootnoteRef" href="#fn:1"><sup>1</sup></a>, <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i></p>
|
143
143
|
<p id="ISO20483" class="NormRef">ISO 20483:2013-2014, <i>Cereals and pulses</i></p>
|
144
144
|
<p id="ref1" class="NormRef">ICC 167, <span style="font-variant:small-caps;">Standard No I.C.C 167</span>. <i>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</i> (see <a href="http://www.icc.or.at">http://www.icc.or.at</a>)</p>
|
145
|
-
<div
|
145
|
+
<div class="Note">
|
146
146
|
<p><span class="note_label">NOTE</span>  This is an annotation of ISO 20483:2013-2014</p>
|
147
147
|
</div>
|
148
148
|
</div>
|
@@ -151,16 +151,16 @@ RSpec.describe IsoDoc do
|
|
151
151
|
<h1 class="Section3">Bibliography</h1>
|
152
152
|
<p id="ISBN" class="Biblio">[1]  <i>Chemicals for analytical laboratory use</i></p>
|
153
153
|
<p id="ISSN" class="Biblio">[2]  <i>Instruments for analytical laboratory use</i></p>
|
154
|
-
<div
|
154
|
+
<div class="Note">
|
155
155
|
<p><span class="note_label">NOTE</span>  This is an annotation of document ISSN.</p>
|
156
156
|
</div>
|
157
|
-
<div
|
157
|
+
<div class="Note">
|
158
158
|
<p><span class="note_label">NOTE</span>  This is another annotation of document ISSN.</p>
|
159
159
|
</div>
|
160
160
|
<p id="ISO3696" class="Biblio">[3]  ISO 3696, <i>Water for analytical laboratory use</i></p>
|
161
161
|
<p id="ref10" class="Biblio">[10]  <span style="font-variant:small-caps;">Standard No I.C.C 167</span>. <i>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</i> (see <a href="http://www.icc.or.at">http://www.icc.or.at</a>)</p>
|
162
162
|
<p id="ref11" class="Biblio">[5]  IETF RFC 10, <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i></p>
|
163
|
-
<p id="ref12" class="Biblio">[6]  Citn, CitationWorks. 2019. <i>How to cite a reference</i>.</p>
|
163
|
+
<p id="ref12" class="Biblio">[6]  Citn, IETF RFC 20, CitationWorks. 2019. <i>How to cite a reference</i>.</p>
|
164
164
|
</div>
|
165
165
|
<aside id="fn:1" class="footnote">
|
166
166
|
<p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
|
data/spec/isodoc/section_spec.rb
CHANGED
@@ -56,12 +56,12 @@ RSpec.describe IsoDoc do
|
|
56
56
|
<appendix id="Q2" inline-header="false" obligation="normative">
|
57
57
|
<title>An Appendix</title>
|
58
58
|
</appendix>
|
59
|
-
<references id="Q3"><title>Annex Bibliography</title></references>
|
60
|
-
</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">
|
61
61
|
<title>Normative References</title>
|
62
62
|
</references><clause id="S" obligation="informative">
|
63
63
|
<title>Bibliography</title>
|
64
|
-
<references id="T" obligation="informative">
|
64
|
+
<references id="T" obligation="informative" normative="false">
|
65
65
|
<title>Bibliography Subsection</title>
|
66
66
|
</references>
|
67
67
|
</clause>
|
@@ -202,11 +202,11 @@ OUTPUT
|
|
202
202
|
<appendix id="Q2" inline-header="false" obligation="normative">
|
203
203
|
<title>An Appendix</title>
|
204
204
|
</appendix>
|
205
|
-
</annex><bibliography><references id="R" obligation="informative">
|
205
|
+
</annex><bibliography><references id="R" obligation="informative" normative="true">
|
206
206
|
<title>Normative References</title>
|
207
207
|
</references><clause id="S" obligation="informative">
|
208
208
|
<title>Bibliography</title>
|
209
|
-
<references id="T" obligation="informative">
|
209
|
+
<references id="T" obligation="informative" normative="false">
|
210
210
|
<title>Bibliography Subsection</title>
|
211
211
|
</references>
|
212
212
|
</clause>
|
@@ -391,7 +391,7 @@ OUTPUT
|
|
391
391
|
<h2>1.1  Introduction</h2>
|
392
392
|
</div>
|
393
393
|
<div id="O">
|
394
|
-
<span class="zzMoveToFollowing"><b>1.2  Clause 4.2 </b></span>
|
394
|
+
<span class="zzMoveToFollowing"><b>1.2  Clause 4.2  </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 — Main Title — Title — </p>
|
479
|
+
<p class='zzSTDTitle2'>
|
480
|
+
Part 1:
|
481
|
+
<br/><b>Title Part</b>
|
482
|
+
</p>
|
483
|
+
</div>
|
484
|
+
</body>
|
485
|
+
</html>
|
486
|
+
OUTPUT
|
487
|
+
end
|
461
488
|
|
462
489
|
end
|
data/spec/isodoc/table_spec.rb
CHANGED
@@ -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
|
84
|
-
<td colspan='4' style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt
|
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
|
88
|
-
<td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt
|
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
|
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
|
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
|
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
|
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;
|
102
|
-
<td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;
|
103
|
-
<td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;
|
104
|
-
<td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;
|
105
|
-
<td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;
|
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;
|
109
|
-
<td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;
|
110
|
-
<td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;
|
111
|
-
<td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;
|
112
|
-
<td style='text-align:center;border-top:none;border-bottom:solid windowtext 1.5pt;
|
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;
|
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;
|
125
|
-
<td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;
|
126
|
-
<td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;
|
127
|
-
<td style='text-align:center;border-top:solid windowtext 1.5pt;border-bottom:0pt;
|
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
|
131
|
+
<div class='Note'>
|
132
132
|
<p>
|
133
133
|
<span class='note_label'>NOTE</span>
|
134
134
|
  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
|
141
|
+
<span id='tableD-1a' class='TableFootnoteRef'>a</span>
|
142
142
|
 
|
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
|
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
|
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
|
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">  </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
|
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">  </span></span>Parboiled rice.</p>
|
275
275
|
</div></div></td></tr></tfoot>
|
276
276
|
|
277
277
|
|
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -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>
|
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -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
|
307
|
-
<a href="#note2">Figure 1
|
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
|
310
|
-
<a href="#Anote2">Figure A.1
|
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=
|
326
|
+
<p class='FigureTitle' style='text-align:center;'>a) — 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=
|
331
|
+
<p class='FigureTitle' style='text-align:center;'>b) — Split-it-right sample divider</p>
|
331
332
|
</div>
|
332
|
-
<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=
|
355
|
+
<p class='FigureTitle' style='text-align:center;'>a) — 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=
|
360
|
+
<p class='FigureTitle' style='text-align:center;'>b) — 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  Scope</h1>
|
558
|
-
<div id="N" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (1)</p></div>
|
564
|
+
<div id="N"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (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  Widgets</h1>
|
567
573
|
<div id="widgets1"><span class='zzMoveToFollowing'><b>3.1  </b></span>
|
568
|
-
<div id="note1" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (2)</p></div>
|
569
|
-
<div id="note2" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (3)</p></div>
|
574
|
+
<div id="note1"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (2)</p></div></div>
|
575
|
+
<div id="note2"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (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  </b></span>
|
584
|
-
<div id="AN" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (A.1)</p></div>
|
590
|
+
<div id="AN"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (A.1)</p></div></div>
|
585
591
|
</div>
|
586
592
|
<div id="annex1b"><span class='zzMoveToFollowing'><b>A.2  </b></span>
|
587
|
-
<div id="Anote1" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (A.2)</p></div>
|
588
|
-
<div id="Anote2" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (A.3)</p></div>
|
593
|
+
<div id="Anote1"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (A.2)</p></div></div>
|
594
|
+
<div id="Anote2"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>  (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;
|
714
|
-
<td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;
|
715
|
-
<td style="text-align:center;border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;
|
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  Widgets</h1>
|
727
733
|
<div id="widgets1"><span class='zzMoveToFollowing'><b>3.1  </b></span>
|
728
|
-
<p class="TableTitle" style="text-align:center;">Table 2 — 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;
|
729
|
-
<p class="TableTitle" style="text-align:center;">Table 3 — 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;
|
734
|
+
<p class="TableTitle" style="text-align:center;">Table 2 — 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 — 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  </b></span>
|
744
|
-
<p class="TableTitle" style="text-align:center;">Table A.1 — 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;
|
750
|
+
<p class="TableTitle" style="text-align:center;">Table A.1 — 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  </b></span>
|
747
|
-
<p class="TableTitle" style="text-align:center;">Table A.2 — 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;
|
748
|
-
<p class="TableTitle" style="text-align:center;">Table A.3 — 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;
|
753
|
+
<p class="TableTitle" style="text-align:center;">Table A.2 — 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 — 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  </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>
|
@@ -882,11 +888,11 @@ RSpec.describe IsoDoc do
|
|
882
888
|
<appendix id="Q2" inline-header="false" obligation="normative">
|
883
889
|
<title>An Appendix</title>
|
884
890
|
</appendix>
|
885
|
-
</annex><bibliography><references id="R" obligation="informative">
|
891
|
+
</annex><bibliography><references id="R" obligation="informative" normative="true">
|
886
892
|
<title>Normative References</title>
|
887
893
|
</references><clause id="S" obligation="informative">
|
888
894
|
<title>Bibliography</title>
|
889
|
-
<references id="T" obligation="informative">
|
895
|
+
<references id="T" obligation="informative" normative="false">
|
890
896
|
<title>Bibliography Subsection</title>
|
891
897
|
</references>
|
892
898
|
</clause>
|
@@ -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>
|
data/spec/spec_helper.rb
CHANGED
@@ -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
|