isodoc 0.5.9 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/isodoc.gemspec +1 -0
- data/lib/isodoc.rb +2 -0
- data/lib/isodoc/convert.rb +17 -1
- data/lib/isodoc/footnotes.rb +8 -3
- data/lib/isodoc/html.rb +65 -27
- data/lib/isodoc/i18n-en.yaml +1 -1
- data/lib/isodoc/iso/convert.rb +46 -0
- data/lib/isodoc/iso/html/header.html +184 -0
- data/lib/isodoc/iso/html/html_iso_intro.html +34 -0
- data/lib/isodoc/iso/html/html_iso_titlepage.html +32 -0
- data/lib/isodoc/iso/html/htmlstyle.scss +46 -0
- data/lib/isodoc/iso/html/isodoc.scss +679 -0
- data/lib/isodoc/iso/html/scripts.html +174 -0
- data/lib/isodoc/iso/html/style-human.scss +1277 -0
- data/lib/isodoc/iso/html/style-iso.scss +1257 -0
- data/lib/isodoc/iso/html/word_iso_intro.html +72 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +58 -0
- data/lib/isodoc/iso/html/wordstyle.scss +1135 -0
- data/lib/isodoc/iso/wordconvert.rb +34 -0
- data/lib/isodoc/iso2wordhtml.rb +17 -23
- data/lib/isodoc/section.rb +1 -1
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/wordconvert/comments.rb +0 -15
- data/lib/isodoc/wordconvert/convert.rb +1 -0
- data/lib/isodoc/wordconvert/footnotes.rb +0 -12
- data/lib/isodoc/wordconvert/postprocess.rb +110 -0
- data/lib/isodoc/wordconvert/wordconvertmodule.rb +18 -130
- data/lib/isodoc/xref_sect_gen.rb +7 -4
- data/spec/assets/scripts.html +3 -1
- data/spec/isodoc/blocks_spec.rb +97 -211
- data/spec/isodoc/cleanup_spec.rb +27 -0
- data/spec/isodoc/footnotes_spec.rb +40 -53
- data/spec/isodoc/i18n_spec.rb +4 -56
- data/spec/isodoc/inline_spec.rb +7 -98
- data/spec/isodoc/iso_spec.rb +89 -0
- data/spec/isodoc/lists_spec.rb +5 -57
- data/spec/isodoc/postproc_spec.rb +43 -79
- data/spec/isodoc/ref_spec.rb +4 -17
- data/spec/isodoc/section_spec.rb +11 -24
- data/spec/isodoc/table_spec.rb +61 -76
- data/spec/isodoc/terms_spec.rb +1 -13
- data/spec/isodoc/xref_spec.rb +21 -164
- data/spec/spec_helper.rb +21 -1
- metadata +31 -2
data/lib/isodoc/xref_sect_gen.rb
CHANGED
@@ -69,12 +69,15 @@ module IsoDoc
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
def
|
72
|
+
def annex_name_lbl(clause, num)
|
73
73
|
obl = l10n("(#{@inform_annex_lbl})")
|
74
74
|
obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
l10n("<b>#{@annex_lbl} #{num}</b><br/>#{obl}")
|
76
|
+
end
|
77
|
+
|
78
|
+
def annex_names(clause, num)
|
79
|
+
@anchors[clause["id"]] = { label: annex_name_lbl(clause, num),
|
80
|
+
xref: "#{@annex_lbl} #{num}", level: 1 }
|
78
81
|
clause.xpath(ns("./clause")).each_with_index do |c, i|
|
79
82
|
annex_names1(c, "#{num}.#{i + 1}", 2)
|
80
83
|
end
|
data/spec/assets/scripts.html
CHANGED
data/spec/isodoc/blocks_spec.rb
CHANGED
@@ -11,15 +11,7 @@ RSpec.describe IsoDoc do
|
|
11
11
|
</foreword></preface>
|
12
12
|
</iso-standard>
|
13
13
|
INPUT
|
14
|
-
|
15
|
-
<head>
|
16
|
-
<title>test</title>
|
17
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
18
|
-
<div class="WordSection1">
|
19
|
-
<p> </p>
|
20
|
-
</div>
|
21
|
-
<br/>
|
22
|
-
<div class="WordSection2">
|
14
|
+
#{HTML_HDR}
|
23
15
|
<br/>
|
24
16
|
<div>
|
25
17
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -27,14 +19,9 @@ RSpec.describe IsoDoc do
|
|
27
19
|
<p class="Note"><span class="note_label">NOTE</span>  These results are based on a study carried out on three different types of kernel.</p>
|
28
20
|
</div>
|
29
21
|
</div>
|
30
|
-
<p> </p>
|
31
|
-
</div>
|
32
|
-
<br/>
|
33
|
-
<div class="WordSection3">
|
34
22
|
<p class="zzSTDTitle1"/>
|
35
23
|
</div>
|
36
24
|
</body>
|
37
|
-
</head>
|
38
25
|
</html>
|
39
26
|
OUTPUT
|
40
27
|
end
|
@@ -49,15 +36,7 @@ RSpec.describe IsoDoc do
|
|
49
36
|
</foreword></preface>
|
50
37
|
</iso-standard>
|
51
38
|
INPUT
|
52
|
-
|
53
|
-
<head>
|
54
|
-
<title>test</title>
|
55
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
56
|
-
<div class="WordSection1">
|
57
|
-
<p> </p>
|
58
|
-
</div>
|
59
|
-
<br/>
|
60
|
-
<div class="WordSection2">
|
39
|
+
#{HTML_HDR}
|
61
40
|
<br/>
|
62
41
|
<div>
|
63
42
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -65,14 +44,9 @@ INPUT
|
|
65
44
|
<p class="Note"><span class="note_label">NOTE</span>  These results are based on a study carried out on three different types of kernel.</p>
|
66
45
|
</div>
|
67
46
|
</div>
|
68
|
-
<p> </p>
|
69
|
-
</div>
|
70
|
-
<br/>
|
71
|
-
<div class="WordSection3">
|
72
47
|
<p class="zzSTDTitle1"/>
|
73
48
|
</div>
|
74
49
|
</body>
|
75
|
-
</head>
|
76
50
|
</html>
|
77
51
|
OUTPUT
|
78
52
|
end
|
@@ -90,15 +64,7 @@ INPUT
|
|
90
64
|
</foreword></preface>
|
91
65
|
</iso-standard>
|
92
66
|
INPUT
|
93
|
-
|
94
|
-
<head>
|
95
|
-
<title>test</title>
|
96
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
97
|
-
<div class="WordSection1">
|
98
|
-
<p> </p>
|
99
|
-
</div>
|
100
|
-
<br/>
|
101
|
-
<div class="WordSection2">
|
67
|
+
#{HTML_HDR}
|
102
68
|
<br/>
|
103
69
|
<div>
|
104
70
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -109,14 +75,9 @@ INPUT
|
|
109
75
|
<p class="Note"><span class="note_label">NOTE 2</span>  These results are based on a study carried out on three different types of kernel.</p>
|
110
76
|
</div>
|
111
77
|
</div>
|
112
|
-
<p> </p>
|
113
|
-
</div>
|
114
|
-
<br/>
|
115
|
-
<div class="WordSection3">
|
116
78
|
<p class="zzSTDTitle1"/>
|
117
79
|
</div>
|
118
80
|
</body>
|
119
|
-
</head>
|
120
81
|
</html>
|
121
82
|
OUTPUT
|
122
83
|
end
|
@@ -132,15 +93,7 @@ INPUT
|
|
132
93
|
</foreword></preface>
|
133
94
|
</iso-standard>
|
134
95
|
INPUT
|
135
|
-
|
136
|
-
<head>
|
137
|
-
<title>test</title>
|
138
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
139
|
-
<div class="WordSection1">
|
140
|
-
<p> </p>
|
141
|
-
</div>
|
142
|
-
<br/>
|
143
|
-
<div class="WordSection2">
|
96
|
+
#{HTML_HDR}
|
144
97
|
<br/>
|
145
98
|
<div>
|
146
99
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -149,14 +102,9 @@ INPUT
|
|
149
102
|
<p class="Note" id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
150
103
|
</div>
|
151
104
|
</div>
|
152
|
-
<p> </p>
|
153
|
-
</div>
|
154
|
-
<br/>
|
155
|
-
<div class="WordSection3">
|
156
105
|
<p class="zzSTDTitle1"/>
|
157
106
|
</div>
|
158
107
|
</body>
|
159
|
-
</head>
|
160
108
|
</html>
|
161
109
|
OUTPUT
|
162
110
|
end
|
@@ -176,15 +124,7 @@ INPUT
|
|
176
124
|
</foreword></preface>
|
177
125
|
</iso-standard>
|
178
126
|
INPUT
|
179
|
-
|
180
|
-
<head>
|
181
|
-
<title>test</title>
|
182
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
183
|
-
<div class="WordSection1">
|
184
|
-
<p> </p>
|
185
|
-
</div>
|
186
|
-
<br/>
|
187
|
-
<div class="WordSection2">
|
127
|
+
#{HTML_HDR}
|
188
128
|
<br/>
|
189
129
|
<div>
|
190
130
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -194,26 +134,24 @@ INPUT
|
|
194
134
|
<li>C</li></ul>
|
195
135
|
</div>
|
196
136
|
</div>
|
197
|
-
<p> </p>
|
198
|
-
</div>
|
199
|
-
<br/>
|
200
|
-
<div class="WordSection3">
|
201
137
|
<p class="zzSTDTitle1"/>
|
202
138
|
</div>
|
203
139
|
</body>
|
204
|
-
</head>
|
205
140
|
</html>
|
206
141
|
|
207
142
|
OUTPUT
|
208
143
|
end
|
209
144
|
|
210
145
|
it "processes figures" do
|
211
|
-
expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
|
146
|
+
expect(strip_guid(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true))).to be_equivalent_to <<~"OUTPUT"
|
212
147
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
213
148
|
<preface><foreword>
|
214
149
|
<figure id="figureA-1">
|
215
150
|
<name>Split-it-right sample divider</name>
|
216
151
|
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
|
152
|
+
<fn reference="a">
|
153
|
+
<p id="_ef2c85b8-5a5a-4ecd-a1e6-92acefaaa852">The time <stem type="AsciiMath">t_90</stem> was estimated to be 18,2 min for this example.</p>
|
154
|
+
</fn>
|
217
155
|
<dl>
|
218
156
|
<dt>A</dt>
|
219
157
|
<dd><p>B</p></dd>
|
@@ -222,32 +160,73 @@ INPUT
|
|
222
160
|
</foreword></preface>
|
223
161
|
</iso-standard>
|
224
162
|
INPUT
|
225
|
-
|
226
|
-
<head>
|
227
|
-
<title>test</title>
|
228
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
229
|
-
<div class="WordSection1">
|
230
|
-
<p> </p>
|
231
|
-
</div>
|
232
|
-
<br/>
|
233
|
-
<div class="WordSection2">
|
163
|
+
#{HTML_HDR}
|
234
164
|
<br/>
|
235
165
|
<div>
|
236
166
|
<h1 class="ForewordTitle">Foreword</h1>
|
237
167
|
<div id="figureA-1" class="figure">
|
238
168
|
|
239
169
|
<img src="rice_images/rice_image1.png"/>
|
170
|
+
<a href="#_" class="TableFootnoteRef">a</a><aside class="footnote"><div id="fn:_"><a id="_" class="TableFootnoteRef">a  </a>
|
171
|
+
<p id="_">The time <span class="stem">(#(t_90)#)</span> was estimated to be 18,2 min for this example.</p>
|
172
|
+
</div></aside>
|
240
173
|
<p><b>Key</b></p><dl><dt><p>A</p></dt><dd><p>B</p></dd></dl>
|
241
174
|
<p class="FigureTitle" align="center">Figure 1 — Split-it-right sample divider</p></div>
|
242
175
|
</div>
|
243
|
-
<p> </p>
|
244
|
-
</div>
|
245
|
-
<br/>
|
246
|
-
<div class="WordSection3">
|
247
176
|
<p class="zzSTDTitle1"/>
|
248
177
|
</div>
|
249
178
|
</body>
|
179
|
+
</html>
|
180
|
+
OUTPUT
|
181
|
+
end
|
182
|
+
|
183
|
+
it "processes figures (Word)" do
|
184
|
+
expect(strip_guid(IsoDoc::WordConvert.new({}).convert_file(<<~"INPUT", "test", true))).to be_equivalent_to <<~"OUTPUT"
|
185
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
186
|
+
<preface><foreword>
|
187
|
+
<figure id="figureA-1">
|
188
|
+
<name>Split-it-right sample divider</name>
|
189
|
+
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
|
190
|
+
<fn reference="a">
|
191
|
+
<p id="_ef2c85b8-5a5a-4ecd-a1e6-92acefaaa852">The time <stem type="AsciiMath">t_90</stem> was estimated to be 18,2 min for this example.</p>
|
192
|
+
</fn>
|
193
|
+
<dl>
|
194
|
+
<dt>A</dt>
|
195
|
+
<dd><p>B</p></dd>
|
196
|
+
</dl>
|
197
|
+
</figure>
|
198
|
+
</foreword></preface>
|
199
|
+
</iso-standard>
|
200
|
+
INPUT
|
201
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
202
|
+
<head>
|
203
|
+
<title>test</title>
|
250
204
|
</head>
|
205
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
206
|
+
<div class="WordSection1">
|
207
|
+
<p> </p>
|
208
|
+
</div>
|
209
|
+
<br clear="all" class="section"/>
|
210
|
+
<div class="WordSection2">
|
211
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
212
|
+
<div>
|
213
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
214
|
+
<div id="figureA-1" class="figure">
|
215
|
+
|
216
|
+
<img src="rice_images/rice_image1.png"/>
|
217
|
+
<a href="#_" class="TableFootnoteRef">a</a><aside><div id="ftn_"><a id="_" class="TableFootnoteRef">a<span style="mso-tab-count:1">  </span></a>
|
218
|
+
<p id="_">The time <span class="stem">(#(t_90)#)</span> was estimated to be 18,2 min for this example.</p>
|
219
|
+
</div></aside>
|
220
|
+
<p><b>Key</b></p><table class="dl"><tr><td valign="top" align="left"><p align="left" style="margin-left:0pt;text-align:left;">A</p></td><td valign="top"><p>B</p></td></tr></table>
|
221
|
+
<p class="FigureTitle" align="center">Figure 1 — Split-it-right sample divider</p></div>
|
222
|
+
</div>
|
223
|
+
<p> </p>
|
224
|
+
</div>
|
225
|
+
<br clear="all" class="section"/>
|
226
|
+
<div class="WordSection3">
|
227
|
+
<p class="zzSTDTitle1"/>
|
228
|
+
</div>
|
229
|
+
</body>
|
251
230
|
</html>
|
252
231
|
OUTPUT
|
253
232
|
end
|
@@ -262,15 +241,7 @@ INPUT
|
|
262
241
|
</foreword></preface>
|
263
242
|
</iso-standard>
|
264
243
|
INPUT
|
265
|
-
|
266
|
-
<head>
|
267
|
-
<title>test</title>
|
268
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
269
|
-
<div class="WordSection1">
|
270
|
-
<p> </p>
|
271
|
-
</div>
|
272
|
-
<br/>
|
273
|
-
<div class="WordSection2">
|
244
|
+
#{HTML_HDR}
|
274
245
|
<br/>
|
275
246
|
<div>
|
276
247
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -283,14 +254,9 @@ INPUT
|
|
283
254
|
</tr>
|
284
255
|
</table>
|
285
256
|
</div>
|
286
|
-
<p> </p>
|
287
|
-
</div>
|
288
|
-
<br/>
|
289
|
-
<div class="WordSection3">
|
290
257
|
<p class="zzSTDTitle1"/>
|
291
258
|
</div>
|
292
259
|
</body>
|
293
|
-
</head>
|
294
260
|
</html>
|
295
261
|
OUTPUT
|
296
262
|
end
|
@@ -309,15 +275,7 @@ INPUT
|
|
309
275
|
</foreword></preface>
|
310
276
|
</iso-standard>
|
311
277
|
INPUT
|
312
|
-
|
313
|
-
<head>
|
314
|
-
<title>test</title>
|
315
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
316
|
-
<div class="WordSection1">
|
317
|
-
<p> </p>
|
318
|
-
</div>
|
319
|
-
<br/>
|
320
|
-
<div class="WordSection2">
|
278
|
+
#{HTML_HDR}
|
321
279
|
<br/>
|
322
280
|
<div>
|
323
281
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -338,14 +296,9 @@ INPUT
|
|
338
296
|
</tr>
|
339
297
|
</table>
|
340
298
|
</div>
|
341
|
-
<p> </p>
|
342
|
-
</div>
|
343
|
-
<br/>
|
344
|
-
<div class="WordSection3">
|
345
299
|
<p class="zzSTDTitle1"/>
|
346
300
|
</div>
|
347
301
|
</body>
|
348
|
-
</head>
|
349
302
|
</html>
|
350
303
|
OUTPUT
|
351
304
|
end
|
@@ -361,28 +314,39 @@ INPUT
|
|
361
314
|
</foreword></preface>
|
362
315
|
</iso-standard>
|
363
316
|
INPUT
|
364
|
-
|
365
|
-
<head>
|
366
|
-
<title>test</title>
|
367
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
368
|
-
<div class="WordSection1">
|
369
|
-
<p> </p>
|
370
|
-
</div>
|
371
|
-
<br/>
|
372
|
-
<div class="WordSection2">
|
317
|
+
#{HTML_HDR}
|
373
318
|
<br/>
|
374
319
|
<div>
|
375
320
|
<h1 class="ForewordTitle">Foreword</h1>
|
376
321
|
<p id="samplecode" class="Sourcecode"><br/>    <br/>  puts x<br/><p class="FigureTitle" align="center">Ruby code</p></p>
|
377
322
|
</div>
|
378
|
-
<p
|
323
|
+
<p class="zzSTDTitle1"/>
|
379
324
|
</div>
|
380
|
-
|
381
|
-
|
325
|
+
</body>
|
326
|
+
</html>
|
327
|
+
OUTPUT
|
328
|
+
end
|
329
|
+
|
330
|
+
it "processes sourcecode with escapes preserved" do
|
331
|
+
expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
|
332
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
333
|
+
<preface><foreword>
|
334
|
+
<sourcecode id="samplecode">
|
335
|
+
<name>XML code</name>
|
336
|
+
<xml>
|
337
|
+
</sourcecode>
|
338
|
+
</foreword></preface>
|
339
|
+
</iso-standard>
|
340
|
+
INPUT
|
341
|
+
#{HTML_HDR}
|
342
|
+
<br/>
|
343
|
+
<div>
|
344
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
345
|
+
<p id="samplecode" class="Sourcecode"><br/>    <br/>  <xml><br/><p class="FigureTitle" align="center">XML code</p></p>
|
346
|
+
</div>
|
382
347
|
<p class="zzSTDTitle1"/>
|
383
348
|
</div>
|
384
349
|
</body>
|
385
|
-
</head>
|
386
350
|
</html>
|
387
351
|
OUTPUT
|
388
352
|
end
|
@@ -402,15 +366,7 @@ INPUT
|
|
402
366
|
</foreword></preface>
|
403
367
|
</iso-standard>
|
404
368
|
INPUT
|
405
|
-
|
406
|
-
<head>
|
407
|
-
<title>test</title>
|
408
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
409
|
-
<div class="WordSection1">
|
410
|
-
<p> </p>
|
411
|
-
</div>
|
412
|
-
<br/>
|
413
|
-
<div class="WordSection2">
|
369
|
+
#{HTML_HDR}
|
414
370
|
<br/>
|
415
371
|
<div>
|
416
372
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -420,14 +376,9 @@ INPUT
|
|
420
376
|
<p class="Sourcecode" id="_">This is another callout</p>
|
421
377
|
</p>
|
422
378
|
</div>
|
423
|
-
<p> </p>
|
424
|
-
</div>
|
425
|
-
<br/>
|
426
|
-
<div class="WordSection3">
|
427
379
|
<p class="zzSTDTitle1"/>
|
428
380
|
</div>
|
429
381
|
</body>
|
430
|
-
</head>
|
431
382
|
</html>
|
432
383
|
OUTPUT
|
433
384
|
end
|
@@ -442,15 +393,7 @@ INPUT
|
|
442
393
|
</foreword></preface>
|
443
394
|
</iso-standard>
|
444
395
|
INPUT
|
445
|
-
|
446
|
-
<head>
|
447
|
-
<title>test</title>
|
448
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
449
|
-
<div class="WordSection1">
|
450
|
-
<p> </p>
|
451
|
-
</div>
|
452
|
-
<br/>
|
453
|
-
<div class="WordSection2">
|
396
|
+
#{HTML_HDR}
|
454
397
|
<br/>
|
455
398
|
<div>
|
456
399
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -458,14 +401,9 @@ INPUT
|
|
458
401
|
<p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
|
459
402
|
</div>
|
460
403
|
</div>
|
461
|
-
<p> </p>
|
462
|
-
</div>
|
463
|
-
<br/>
|
464
|
-
<div class="WordSection3">
|
465
404
|
<p class="zzSTDTitle1"/>
|
466
405
|
</div>
|
467
406
|
</body>
|
468
|
-
</head>
|
469
407
|
</html>
|
470
408
|
OUTPUT
|
471
409
|
end
|
@@ -487,15 +425,7 @@ INPUT
|
|
487
425
|
</foreword></preface>
|
488
426
|
</iso-standard>
|
489
427
|
INPUT
|
490
|
-
|
491
|
-
<head>
|
492
|
-
<title>test</title>
|
493
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
494
|
-
<div class="WordSection1">
|
495
|
-
<p> </p>
|
496
|
-
</div>
|
497
|
-
<br/>
|
498
|
-
<div class="WordSection2">
|
428
|
+
#{HTML_HDR}
|
499
429
|
<br/>
|
500
430
|
<div>
|
501
431
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -510,14 +440,9 @@ INPUT
|
|
510
440
|
</dd>
|
511
441
|
</dl>
|
512
442
|
</div>
|
513
|
-
<p> </p>
|
514
|
-
</div>
|
515
|
-
<br/>
|
516
|
-
<div class="WordSection3">
|
517
443
|
<p class="zzSTDTitle1"/>
|
518
444
|
</div>
|
519
445
|
</body>
|
520
|
-
</head>
|
521
446
|
</html>
|
522
447
|
OUTPUT
|
523
448
|
end
|
@@ -533,15 +458,7 @@ World</p>
|
|
533
458
|
</foreword></preface>
|
534
459
|
</iso-standard>
|
535
460
|
INPUT
|
536
|
-
|
537
|
-
<head>
|
538
|
-
<title>test</title>
|
539
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
540
|
-
<div class="WordSection1">
|
541
|
-
<p> </p>
|
542
|
-
</div>
|
543
|
-
<br/>
|
544
|
-
<div class="WordSection2">
|
461
|
+
#{HTML_HDR}
|
545
462
|
<br/>
|
546
463
|
<div>
|
547
464
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -551,19 +468,14 @@ World</p>
|
|
551
468
|
</p>
|
552
469
|
<p style="text-align:justify">Justify</p>
|
553
470
|
</div>
|
554
|
-
<p> </p>
|
555
|
-
</div>
|
556
|
-
<br/>
|
557
|
-
<div class="WordSection3">
|
558
471
|
<p class="zzSTDTitle1"/>
|
559
472
|
</div>
|
560
473
|
</body>
|
561
|
-
</head>
|
562
474
|
</html>
|
563
475
|
OUTPUT
|
564
476
|
end
|
565
477
|
|
566
|
-
|
478
|
+
it "processes paragraph alignments (Word)" do
|
567
479
|
expect(IsoDoc::WordConvert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
|
568
480
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
569
481
|
<preface><foreword>
|
@@ -577,6 +489,7 @@ World</p>
|
|
577
489
|
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
578
490
|
<head>
|
579
491
|
<title>test</title>
|
492
|
+
</head>
|
580
493
|
<body lang="EN-US" link="blue" vlink="#954F72">
|
581
494
|
<div class="WordSection1">
|
582
495
|
<p> </p>
|
@@ -599,7 +512,6 @@ World</p>
|
|
599
512
|
<p class="zzSTDTitle1"/>
|
600
513
|
</div>
|
601
514
|
</body>
|
602
|
-
</head>
|
603
515
|
</html>
|
604
516
|
OUTPUT
|
605
517
|
end
|
@@ -619,15 +531,7 @@ World</p>
|
|
619
531
|
</foreword></preface>
|
620
532
|
</iso-standard>
|
621
533
|
INPUT
|
622
|
-
|
623
|
-
<head>
|
624
|
-
<title>test</title>
|
625
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
626
|
-
<div class="WordSection1">
|
627
|
-
<p> </p>
|
628
|
-
</div>
|
629
|
-
<br/>
|
630
|
-
<div class="WordSection2">
|
534
|
+
#{HTML_HDR}
|
631
535
|
<br/>
|
632
536
|
<div>
|
633
537
|
<h1 class="ForewordTitle">Foreword</h1>
|
@@ -637,14 +541,9 @@ World</p>
|
|
637
541
|
<p id="_d4fd0a61-f300-4285-abe6-602707590e53">This International Standard gives the minimum specifications for rice (<i>Oryza sativa</i> L.) which is subject to international trade. It is applicable to the following types: husked rice and milled rice, parboiled or not, intended for direct human consumption. It is neither applicable to other products derived from rice, nor to waxy rice (glutinous rice).</p>
|
638
542
|
<p class="QuoteAttribution">— ISO, <a href="#ISO7301">ISO 7301: 2011, Clause 1</a></p></div>
|
639
543
|
</div>
|
640
|
-
<p> </p>
|
641
|
-
</div>
|
642
|
-
<br/>
|
643
|
-
<div class="WordSection3">
|
644
544
|
<p class="zzSTDTitle1"/>
|
645
545
|
</div>
|
646
546
|
</body>
|
647
|
-
</head>
|
648
547
|
</html>
|
649
548
|
OUTPUT
|
650
549
|
end
|
@@ -662,19 +561,7 @@ World</p>
|
|
662
561
|
</sections>
|
663
562
|
</iso-standard>
|
664
563
|
INPUT
|
665
|
-
|
666
|
-
<head>
|
667
|
-
<title>test</title>
|
668
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
669
|
-
<div class="WordSection1">
|
670
|
-
<p> </p>
|
671
|
-
</div>
|
672
|
-
<br/>
|
673
|
-
<div class="WordSection2">
|
674
|
-
<p> </p>
|
675
|
-
</div>
|
676
|
-
<br/>
|
677
|
-
<div class="WordSection3">
|
564
|
+
#{HTML_HDR}
|
678
565
|
<p class="zzSTDTitle1"/>
|
679
566
|
<div><h1>1.  Terms and Definitions</h1><p>For the purposes of this document,
|
680
567
|
the following terms and definitions apply.</p>
|
@@ -693,7 +580,6 @@ World</p>
|
|
693
580
|
</div>
|
694
581
|
</div>
|
695
582
|
</body>
|
696
|
-
</head>
|
697
583
|
</html>
|
698
584
|
OUTPUT
|
699
585
|
end
|