metanorma-standoc 1.3.24 → 1.3.25
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 +2 -1
- data/.github/workflows/ubuntu.yml +5 -3
- data/.github/workflows/windows.yml +0 -1
- data/lib/asciidoctor/standoc/base.rb +22 -8
- data/lib/asciidoctor/standoc/biblio.rng +53 -26
- data/lib/asciidoctor/standoc/cleanup.rb +8 -7
- data/lib/asciidoctor/standoc/cleanup_inline.rb +3 -0
- data/lib/asciidoctor/standoc/cleanup_ref.rb +4 -0
- data/lib/asciidoctor/standoc/cleanup_section.rb +21 -6
- data/lib/asciidoctor/standoc/front.rb +5 -3
- data/lib/asciidoctor/standoc/inline.rb +42 -17
- data/lib/asciidoctor/standoc/isodoc.rng +28 -1
- data/lib/asciidoctor/standoc/macros.rb +2 -1
- data/lib/asciidoctor/standoc/macros_yaml2text.rb +142 -0
- data/lib/asciidoctor/standoc/ref.rb +5 -3
- data/lib/asciidoctor/standoc/section.rb +5 -0
- data/lib/asciidoctor/standoc/utils.rb +2 -11
- data/lib/metanorma/standoc/latexml_requirement.rb +14 -12
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +2 -2
- data/spec/asciidoctor-standoc/base_spec.rb +8 -0
- data/spec/asciidoctor-standoc/blocks_spec.rb +56 -1
- data/spec/asciidoctor-standoc/cleanup_spec.rb +26 -2
- data/spec/asciidoctor-standoc/inline_spec.rb +3 -2
- data/spec/asciidoctor-standoc/macros_spec.rb +4 -4
- data/spec/asciidoctor-standoc/macros_yaml2text_spec.rb +564 -0
- data/spec/asciidoctor-standoc/refs_spec.rb +234 -146
- data/spec/asciidoctor-standoc/section_spec.rb +58 -0
- data/spec/asciidoctor-standoc/validate_spec.rb +34 -0
- data/spec/assets/codes.yml +695 -0
- data/spec/examples/codes_table.html +3174 -0
- data/spec/metanorma/processor_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -0
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +71 -265
- data/spec/vcr_cassettes/isobib_get_123.yml +38 -84
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +20 -43
- data/spec/vcr_cassettes/isobib_get_124.yml +19 -101
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +8 -8
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +35 -35
- metadata +10 -6
@@ -20,6 +20,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
20
20
|
<bibitem id="iso123" type="standard">
|
21
21
|
<title format="text/plain">Standard</title>
|
22
22
|
<docidentifier>ISO 123</docidentifier>
|
23
|
+
<docnumber>123</docnumber>
|
23
24
|
<contributor>
|
24
25
|
<role type="publisher"/>
|
25
26
|
<organization>
|
@@ -31,6 +32,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
31
32
|
<title format='text/plain'>Standard</title>
|
32
33
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
33
34
|
<docidentifier>ISO 123</docidentifier>
|
35
|
+
<docnumber>123</docnumber>
|
34
36
|
<contributor>
|
35
37
|
<role type='publisher'/>
|
36
38
|
<organization>
|
@@ -61,6 +63,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
61
63
|
<bibitem id="iso123" type="standard">
|
62
64
|
<title format="text/plain">Standard</title>
|
63
65
|
<docidentifier>ISO 123:1066-1067</docidentifier>
|
66
|
+
<docnumber>123</docnumber>
|
64
67
|
<date type="published">
|
65
68
|
<from>1066</from>
|
66
69
|
<to>1067</to>
|
@@ -76,6 +79,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
76
79
|
<title format="text/plain">Standard</title>
|
77
80
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
78
81
|
<docidentifier>ISO 123:1066-1067</docidentifier>
|
82
|
+
<docnumber>123</docnumber>
|
79
83
|
<date type="published">
|
80
84
|
<from>1066</from>
|
81
85
|
<to>1067</to>
|
@@ -234,155 +238,223 @@ RSpec.describe Asciidoctor::Standoc do
|
|
234
238
|
|
235
239
|
</sections><bibliography><references id="_" obligation="informative"><title>Normative References</title>
|
236
240
|
#{NORM_REF_BOILERPLATE}
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
<organization>
|
256
|
-
<name>International Organization for Standardization</name>
|
257
|
-
<abbreviation>ISO</abbreviation>
|
258
|
-
<uri>www.iso.org</uri>
|
259
|
-
</organization>
|
260
|
-
</contributor>
|
261
|
-
<edition>3</edition>
|
262
|
-
<language>en</language>
|
263
|
-
<language>fr</language>
|
264
|
-
<script>Latn</script>
|
265
|
-
<status>
|
266
|
-
<stage>90</stage>
|
267
|
-
<substage>93</substage>
|
268
|
-
</status>
|
269
|
-
<copyright>
|
270
|
-
<from>2001</from>
|
271
|
-
<owner>
|
272
|
-
<organization>
|
273
|
-
<name>ISO</name>
|
274
|
-
</organization>
|
275
|
-
</owner>
|
276
|
-
</copyright>
|
277
|
-
<relation type="obsoletes">
|
278
|
-
<bibitem type="standard">
|
279
|
-
<formattedref format="text/plain">ISO 123:1985</formattedref>
|
280
|
-
</bibitem>
|
281
|
-
</relation>
|
282
|
-
<place>Geneva</place>
|
283
|
-
</bibitem>
|
284
|
-
<bibitem id="iso123" type="standard">
|
285
|
-
<fetched>#{Date.today}</fetched>
|
286
|
-
<title type="title-intro" format="text/plain" language="en" script="Latn">Rubber latex</title>
|
287
|
-
<title type="title-main" format="text/plain" language="en" script="Latn">Sampling</title>
|
288
|
-
<title type="main" format="text/plain" language="en" script="Latn">Rubber latex – Sampling</title>
|
289
|
-
<title type="title-intro" format="text/plain" language="fr" script="Latn">Latex de caoutchouc</title>
|
290
|
-
<title type="title-main" format="text/plain" language="fr" script="Latn">Échantillonnage</title>
|
291
|
-
<title type="main" format="text/plain" language="fr" script="Latn">Latex de caoutchouc – Échantillonnage</title>
|
292
|
-
<uri type="src">https://www.iso.org/standard/23281.html</uri>
|
293
|
-
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
294
|
-
<uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
295
|
-
<docidentifier type="ISO">ISO 123:2001</docidentifier>
|
296
|
-
<docidentifier type='metanorma'>[1]</docidentifier>
|
297
|
-
<docnumber>123</docnumber>
|
298
|
-
<date type="published">
|
299
|
-
<on>2001</on>
|
300
|
-
</date>
|
301
|
-
<contributor>
|
302
|
-
<role type="publisher"/>
|
303
|
-
<organization>
|
304
|
-
<name>International Organization for Standardization</name>
|
305
|
-
<abbreviation>ISO</abbreviation>
|
306
|
-
<uri>www.iso.org</uri>
|
307
|
-
</organization>
|
308
|
-
</contributor>
|
309
|
-
<edition>3</edition>
|
310
|
-
<language>en</language>
|
311
|
-
<language>fr</language>
|
312
|
-
<script>Latn</script>
|
313
|
-
<status>
|
314
|
-
<stage>90</stage>
|
315
|
-
<substage>93</substage>
|
316
|
-
</status>
|
317
|
-
<copyright>
|
318
|
-
<from>2001</from>
|
319
|
-
<owner>
|
320
|
-
<organization>
|
321
|
-
<name>ISO</name>
|
322
|
-
</organization>
|
323
|
-
</owner>
|
324
|
-
</copyright>
|
325
|
-
<relation type="obsoletes">
|
326
|
-
<bibitem type="standard">
|
327
|
-
<formattedref format="text/plain">ISO 123:1985</formattedref>
|
328
|
-
</bibitem>
|
329
|
-
</relation>
|
330
|
-
<place>Geneva</place>
|
331
|
-
</bibitem>
|
332
|
-
</references></bibliography>
|
333
|
-
</standard-document>
|
334
|
-
OUTPUT
|
335
|
-
=begin
|
336
|
-
<relation type="instance">
|
337
|
-
<bibitem type="standard">
|
338
|
-
<fetched>#{Date.today}</fetched>
|
339
|
-
<title type="title-main" format="text/plain" language="en" script="Latn">Rubber latex – Sampling</title>
|
340
|
-
<title type="main" format="text/plain" language="en" script="Latn">Rubber latex – Sampling</title>
|
341
|
-
<title type="title-main" format="text/plain" language="fr" script="Latn">Latex de caoutchouc – Échantillonnage</title>
|
342
|
-
<title type="main" format="text/plain" language="fr" script="Latn">Latex de caoutchouc – Échantillonnage</title>
|
343
|
-
<uri type="src">https://www.iso.org/standard/23281.html</uri>
|
344
|
-
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
345
|
-
<uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
346
|
-
<docidentifier type="ISO">ISO 123:2001</docidentifier>
|
347
|
-
<docnumber>123</docnumber>
|
348
|
-
<date type="published">
|
349
|
-
<on>2001</on>
|
350
|
-
</date>
|
351
|
-
<contributor>
|
352
|
-
<role type="publisher"/>
|
353
|
-
<organization>
|
354
|
-
<name>International Organization for Standardization</name>
|
355
|
-
<abbreviation>ISO</abbreviation>
|
356
|
-
<uri>www.iso.org</uri>
|
357
|
-
</organization>
|
358
|
-
</contributor>
|
359
|
-
<edition>3</edition>
|
360
|
-
<language>en</language>
|
361
|
-
<language>fr</language>
|
362
|
-
<script>Latn</script>
|
363
|
-
<status>
|
364
|
-
<stage>90</stage>
|
365
|
-
<substage>93</substage>
|
366
|
-
</status>
|
367
|
-
<copyright>
|
368
|
-
<from>2001</from>
|
369
|
-
<owner>
|
241
|
+
<bibitem id='iso123' type='standard'>
|
242
|
+
<fetched>#{Date.today}</fetched>
|
243
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
244
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
245
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
|
246
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
247
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
248
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc – Échantillonnage</title>
|
249
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
250
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
251
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
252
|
+
<docidentifier type='ISO'>ISO 123 (all parts)</docidentifier>
|
253
|
+
<docnumber>123</docnumber>
|
254
|
+
<date type='published'>
|
255
|
+
<on>2001</on>
|
256
|
+
</date>
|
257
|
+
<contributor>
|
258
|
+
<role type='publisher'/>
|
370
259
|
<organization>
|
371
|
-
<name>
|
260
|
+
<name>International Organization for Standardization</name>
|
261
|
+
<abbreviation>ISO</abbreviation>
|
262
|
+
<uri>www.iso.org</uri>
|
372
263
|
</organization>
|
373
|
-
</
|
374
|
-
|
375
|
-
|
376
|
-
<
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
264
|
+
</contributor>
|
265
|
+
<edition>3</edition>
|
266
|
+
<language>en</language>
|
267
|
+
<language>fr</language>
|
268
|
+
<script>Latn</script>
|
269
|
+
<status>
|
270
|
+
<stage>90</stage>
|
271
|
+
<substage>93</substage>
|
272
|
+
</status>
|
273
|
+
<copyright>
|
274
|
+
<from>2001</from>
|
275
|
+
<owner>
|
276
|
+
<organization>
|
277
|
+
<name>ISO</name>
|
278
|
+
</organization>
|
279
|
+
</owner>
|
280
|
+
</copyright>
|
281
|
+
<relation type='obsoletes'>
|
282
|
+
<bibitem type='standard'>
|
283
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
284
|
+
</bibitem>
|
285
|
+
</relation>
|
286
|
+
<relation type='instance'>
|
287
|
+
<bibitem type='standard'>
|
288
|
+
<fetched>#{Date.today}</fetched>
|
289
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
290
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
291
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
|
292
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
293
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
294
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc – Échantillonnage</title>
|
295
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
296
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
297
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
298
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
299
|
+
<docnumber>123</docnumber>
|
300
|
+
<date type='published'>
|
301
|
+
<on>2001</on>
|
302
|
+
</date>
|
303
|
+
<contributor>
|
304
|
+
<role type='publisher'/>
|
305
|
+
<organization>
|
306
|
+
<name>International Organization for Standardization</name>
|
307
|
+
<abbreviation>ISO</abbreviation>
|
308
|
+
<uri>www.iso.org</uri>
|
309
|
+
</organization>
|
310
|
+
</contributor>
|
311
|
+
<edition>3</edition>
|
312
|
+
<language>en</language>
|
313
|
+
<language>fr</language>
|
314
|
+
<script>Latn</script>
|
315
|
+
<status>
|
316
|
+
<stage>90</stage>
|
317
|
+
<substage>93</substage>
|
318
|
+
</status>
|
319
|
+
<copyright>
|
320
|
+
<from>2001</from>
|
321
|
+
<owner>
|
322
|
+
<organization>
|
323
|
+
<name>ISO</name>
|
324
|
+
</organization>
|
325
|
+
</owner>
|
326
|
+
</copyright>
|
327
|
+
<relation type='obsoletes'>
|
328
|
+
<bibitem type='standard'>
|
329
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
330
|
+
</bibitem>
|
331
|
+
</relation>
|
332
|
+
<place>Geneva</place>
|
333
|
+
</bibitem>
|
334
|
+
</relation>
|
335
|
+
<relation type='instance'>
|
336
|
+
<bibitem type='standard'>
|
337
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
338
|
+
</bibitem>
|
339
|
+
</relation>
|
340
|
+
<relation type='instance'>
|
341
|
+
<bibitem type='standard'>
|
342
|
+
<formattedref format='text/plain'>ISO 123:1974</formattedref>
|
343
|
+
</bibitem>
|
344
|
+
</relation>
|
345
|
+
<place>Geneva</place>
|
346
|
+
</bibitem>
|
347
|
+
<bibitem id='iso123' type='standard'>
|
348
|
+
<fetched>#{Date.today}</fetched>
|
349
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
350
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
351
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
|
352
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
353
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
354
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc – Échantillonnage</title>
|
355
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
356
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
357
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
358
|
+
<docidentifier type='ISO'>ISO 123 (all parts)</docidentifier>
|
359
|
+
<docidentifier type='metanorma'>[1]</docidentifier>
|
360
|
+
<docnumber>123</docnumber>
|
361
|
+
<date type='published'>
|
362
|
+
<on>2001</on>
|
363
|
+
</date>
|
364
|
+
<contributor>
|
365
|
+
<role type='publisher'/>
|
366
|
+
<organization>
|
367
|
+
<name>International Organization for Standardization</name>
|
368
|
+
<abbreviation>ISO</abbreviation>
|
369
|
+
<uri>www.iso.org</uri>
|
370
|
+
</organization>
|
371
|
+
</contributor>
|
372
|
+
<edition>3</edition>
|
373
|
+
<language>en</language>
|
374
|
+
<language>fr</language>
|
375
|
+
<script>Latn</script>
|
376
|
+
<status>
|
377
|
+
<stage>90</stage>
|
378
|
+
<substage>93</substage>
|
379
|
+
</status>
|
380
|
+
<copyright>
|
381
|
+
<from>2001</from>
|
382
|
+
<owner>
|
383
|
+
<organization>
|
384
|
+
<name>ISO</name>
|
385
|
+
</organization>
|
386
|
+
</owner>
|
387
|
+
</copyright>
|
388
|
+
<relation type='obsoletes'>
|
389
|
+
<bibitem type='standard'>
|
390
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
391
|
+
</bibitem>
|
392
|
+
</relation>
|
393
|
+
<relation type='instance'>
|
394
|
+
<bibitem type='standard'>
|
395
|
+
<fetched>#{Date.today}</fetched>
|
396
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
397
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
398
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
|
399
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
400
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
401
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc – Échantillonnage</title>
|
402
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
403
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
404
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
405
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
406
|
+
<docnumber>123</docnumber>
|
407
|
+
<date type='published'>
|
408
|
+
<on>2001</on>
|
409
|
+
</date>
|
410
|
+
<contributor>
|
411
|
+
<role type='publisher'/>
|
412
|
+
<organization>
|
413
|
+
<name>International Organization for Standardization</name>
|
414
|
+
<abbreviation>ISO</abbreviation>
|
415
|
+
<uri>www.iso.org</uri>
|
416
|
+
</organization>
|
417
|
+
</contributor>
|
418
|
+
<edition>3</edition>
|
419
|
+
<language>en</language>
|
420
|
+
<language>fr</language>
|
421
|
+
<script>Latn</script>
|
422
|
+
<status>
|
423
|
+
<stage>90</stage>
|
424
|
+
<substage>93</substage>
|
425
|
+
</status>
|
426
|
+
<copyright>
|
427
|
+
<from>2001</from>
|
428
|
+
<owner>
|
429
|
+
<organization>
|
430
|
+
<name>ISO</name>
|
431
|
+
</organization>
|
432
|
+
</owner>
|
433
|
+
</copyright>
|
434
|
+
<relation type='obsoletes'>
|
435
|
+
<bibitem type='standard'>
|
436
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
437
|
+
</bibitem>
|
438
|
+
</relation>
|
439
|
+
<place>Geneva</place>
|
440
|
+
</bibitem>
|
441
|
+
</relation>
|
442
|
+
<relation type='instance'>
|
443
|
+
<bibitem type='standard'>
|
444
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
445
|
+
</bibitem>
|
446
|
+
</relation>
|
447
|
+
<relation type='instance'>
|
448
|
+
<bibitem type='standard'>
|
449
|
+
<formattedref format='text/plain'>ISO 123:1974</formattedref>
|
450
|
+
</bibitem>
|
451
|
+
</relation>
|
452
|
+
<place>Geneva</place>
|
453
|
+
</bibitem>
|
454
|
+
</references>
|
455
|
+
</bibliography>
|
383
456
|
</standard-document>
|
384
|
-
|
385
|
-
=end
|
457
|
+
OUTPUT
|
386
458
|
end
|
387
459
|
end
|
388
460
|
|
@@ -403,6 +475,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
403
475
|
<bibitem id="iso123" type="standard">
|
404
476
|
<title format="text/plain">Standard</title>
|
405
477
|
<docidentifier>IEC 123</docidentifier>
|
478
|
+
<docnumber>123</docnumber>
|
406
479
|
<contributor>
|
407
480
|
<role type="publisher"/>
|
408
481
|
<organization>
|
@@ -414,6 +487,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
414
487
|
<title format='text/plain'>Standard</title>
|
415
488
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
416
489
|
<docidentifier>IEC 123</docidentifier>
|
490
|
+
<docnumber>123</docnumber>
|
417
491
|
<contributor>
|
418
492
|
<role type='publisher'/>
|
419
493
|
<organization>
|
@@ -482,6 +556,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
482
556
|
<language>fr</language>
|
483
557
|
<script>Latn</script>
|
484
558
|
<abstract format="text/plain" language="en" script="Latn">Contains a permuted index of all terms included in the parts 1 — 28 of ISO 2382. If any of these parts has been revised, the present TR refers to the revision.</abstract>
|
559
|
+
<abstract format="text/plain" language="fr" script="Latn">Contains a permuted index of all terms included in the parts 1 — 28 of ISO 2382. If any of these parts has been revised, the present TR refers to the revision.</abstract>
|
485
560
|
<status>
|
486
561
|
<stage>90</stage>
|
487
562
|
<substage>93</substage>
|
@@ -581,6 +656,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
581
656
|
<language>fr</language>
|
582
657
|
<script>Latn</script>
|
583
658
|
<abstract format="text/plain" language="en" script="Latn">Contains a permuted index of all terms included in the parts 1 — 28 of ISO 2382. If any of these parts has been revised, the present TR refers to the revision.</abstract>
|
659
|
+
<abstract format="text/plain" language="fr" script="Latn">Contains a permuted index of all terms included in the parts 1 — 28 of ISO 2382. If any of these parts has been revised, the present TR refers to the revision.</abstract>
|
584
660
|
<status>
|
585
661
|
<stage>90</stage>
|
586
662
|
<substage>93</substage>
|
@@ -673,6 +749,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
673
749
|
<em>Standard</em>
|
674
750
|
</formattedref>
|
675
751
|
<docidentifier>ISO/IEC TR 12382:1992</docidentifier>
|
752
|
+
<docnumber>12382:1992)</docnumber>
|
676
753
|
</bibitem>
|
677
754
|
<bibitem id='iso124' type='standard'>
|
678
755
|
<fetched>#{Date.today}</fetched>
|
@@ -749,6 +826,7 @@ OUTPUT
|
|
749
826
|
<bibitem id="iso123" type="standard">
|
750
827
|
<title format="text/plain">Standard</title>
|
751
828
|
<docidentifier>ISO 123:—</docidentifier>
|
829
|
+
<docnumber>123</docnumber>
|
752
830
|
<date type="published">
|
753
831
|
<on>–</on>
|
754
832
|
</date>
|
@@ -762,6 +840,7 @@ OUTPUT
|
|
762
840
|
<bibitem id="iso124" type="standard">
|
763
841
|
<title format="text/plain">Standard</title>
|
764
842
|
<docidentifier>ISO 124:—</docidentifier>
|
843
|
+
<docnumber>124</docnumber>
|
765
844
|
<date type="published">
|
766
845
|
<on>–</on>
|
767
846
|
</date>
|
@@ -776,6 +855,7 @@ OUTPUT
|
|
776
855
|
<bibitem id="iso125" type="standard">
|
777
856
|
<title format="text/plain">Standard</title>
|
778
857
|
<docidentifier>ISO 125:—</docidentifier>
|
858
|
+
<docnumber>125</docnumber>
|
779
859
|
<date type="published">
|
780
860
|
<on>–</on>
|
781
861
|
</date>
|
@@ -791,6 +871,7 @@ OUTPUT
|
|
791
871
|
<title format='text/plain'>Standard</title>
|
792
872
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
793
873
|
<docidentifier>ISO 123:—</docidentifier>
|
874
|
+
<docnumber>123</docnumber>
|
794
875
|
<date type='published'>
|
795
876
|
<on>–</on>
|
796
877
|
</date>
|
@@ -826,6 +907,7 @@ OUTPUT
|
|
826
907
|
<bibitem id="iso123" type="standard">
|
827
908
|
<title format="text/plain">Standard</title>
|
828
909
|
<docidentifier>ISO 123:1066 (all parts)</docidentifier>
|
910
|
+
<docnumber>123</docnumber>
|
829
911
|
<date type="published">
|
830
912
|
<on>1066</on>
|
831
913
|
</date>
|
@@ -843,6 +925,7 @@ OUTPUT
|
|
843
925
|
<title format='text/plain'>Standard</title>
|
844
926
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
845
927
|
<docidentifier>ISO 123:1066 (all parts)</docidentifier>
|
928
|
+
<docnumber>123</docnumber>
|
846
929
|
<date type='published'>
|
847
930
|
<on>1066</on>
|
848
931
|
</date>
|
@@ -1020,6 +1103,7 @@ OUTPUT
|
|
1020
1103
|
<em>Standard</em>
|
1021
1104
|
</formattedref>
|
1022
1105
|
<docidentifier>XYZ 123:1066 (all parts)</docidentifier>
|
1106
|
+
<docnumber>123:1066 (all parts)</docnumber>
|
1023
1107
|
</bibitem>
|
1024
1108
|
<bibitem id='iso124'>
|
1025
1109
|
<formattedref format='application/x-isodoc+xml'>
|
@@ -1027,6 +1111,7 @@ OUTPUT
|
|
1027
1111
|
</formattedref>
|
1028
1112
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
1029
1113
|
<docidentifier>XYZ 123:1066 (all parts)</docidentifier>
|
1114
|
+
<docnumber>123:1066 (all parts)</docnumber>
|
1030
1115
|
</bibitem>
|
1031
1116
|
</references>
|
1032
1117
|
</bibliography>
|
@@ -1078,6 +1163,7 @@ OUTPUT
|
|
1078
1163
|
</formattedref>
|
1079
1164
|
<docidentifier type='metanorma'>[5]</docidentifier>
|
1080
1165
|
<docidentifier>XYZ 123:1066 (all parts)</docidentifier>
|
1166
|
+
<docnumber>123:1066 (all parts)</docnumber>
|
1081
1167
|
</bibitem>
|
1082
1168
|
</references>
|
1083
1169
|
</bibliography>
|
@@ -1119,6 +1205,7 @@ OUTPUT
|
|
1119
1205
|
<bibitem id="iso123" type="standard">
|
1120
1206
|
<title format="text/plain">Standard</title>
|
1121
1207
|
<docidentifier type="ISO">ISO 123</docidentifier>
|
1208
|
+
<docnumber>123</docnumber>
|
1122
1209
|
<contributor>
|
1123
1210
|
<role type="publisher"/>
|
1124
1211
|
<organization>
|
@@ -1130,6 +1217,7 @@ OUTPUT
|
|
1130
1217
|
<title format='text/plain'>Standard</title>
|
1131
1218
|
<docidentifier type='metanorma'>[1]</docidentifier>
|
1132
1219
|
<docidentifier type='ISO'>ISO 123</docidentifier>
|
1220
|
+
<docnumber>123</docnumber>
|
1133
1221
|
<contributor>
|
1134
1222
|
<role type='publisher'/>
|
1135
1223
|
<organization>
|
@@ -517,6 +517,64 @@ RSpec.describe Asciidoctor::Standoc do
|
|
517
517
|
OUTPUT
|
518
518
|
end
|
519
519
|
|
520
|
+
|
521
|
+
it "varies terms & symbols title" do
|
522
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
523
|
+
#{ASCIIDOC_BLANK_HDR}
|
524
|
+
[heading="terms, definitions, symbols and abbreviated terms"]
|
525
|
+
== Terms, Definitions, Symbols Section
|
526
|
+
|
527
|
+
=== Term
|
528
|
+
|
529
|
+
=== Symbols
|
530
|
+
|
531
|
+
INPUT
|
532
|
+
#{BLANK_HDR}
|
533
|
+
<sections>
|
534
|
+
<terms id='_' obligation='normative'>
|
535
|
+
<title>Terms, definitions and symbols</title>
|
536
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
537
|
+
<term id='_'>
|
538
|
+
<preferred>Term</preferred>
|
539
|
+
</term>
|
540
|
+
<definitions id='_'>
|
541
|
+
<title>Symbols</title>
|
542
|
+
</definitions>
|
543
|
+
</terms>
|
544
|
+
</sections>
|
545
|
+
</standard-document>
|
546
|
+
OUTPUT
|
547
|
+
end
|
548
|
+
|
549
|
+
it "varies terms & abbreviated terms title" do
|
550
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
551
|
+
#{ASCIIDOC_BLANK_HDR}
|
552
|
+
[heading="terms, definitions, symbols and abbreviated terms"]
|
553
|
+
== Terms, Definitions, Abbreviated Terms Section
|
554
|
+
|
555
|
+
=== Term
|
556
|
+
|
557
|
+
=== Symbols
|
558
|
+
|
559
|
+
INPUT
|
560
|
+
#{BLANK_HDR}
|
561
|
+
<sections>
|
562
|
+
<terms id='_' obligation='normative'>
|
563
|
+
<title>Terms, definitions and abbreviated terms</title>
|
564
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
565
|
+
<term id='_'>
|
566
|
+
<preferred>Term</preferred>
|
567
|
+
</term>
|
568
|
+
<definitions id='_'>
|
569
|
+
<title>Symbols</title>
|
570
|
+
</definitions>
|
571
|
+
</terms>
|
572
|
+
</sections>
|
573
|
+
</standard-document>
|
574
|
+
OUTPUT
|
575
|
+
end
|
576
|
+
|
577
|
+
|
520
578
|
it "processes section obligations" do
|
521
579
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
522
580
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -3,6 +3,40 @@ require "relaton_iec"
|
|
3
3
|
require "fileutils"
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc do
|
6
|
+
it "warns about malformed LaTeX" do
|
7
|
+
FileUtils.rm_f "test.err"
|
8
|
+
Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)
|
9
|
+
#{VALIDATING_BLANK_HDR}
|
10
|
+
|
11
|
+
== Clause 1
|
12
|
+
|
13
|
+
latexmath:[\\begin{}]
|
14
|
+
|
15
|
+
=== Clause 1.1
|
16
|
+
|
17
|
+
Subclause
|
18
|
+
INPUT
|
19
|
+
expect(File.read("test.err")).to include "latexmlmath failed to process equation"
|
20
|
+
end
|
21
|
+
|
22
|
+
it "warns about reparsing LaTeX" do
|
23
|
+
FileUtils.rm_f "test.err"
|
24
|
+
expect { Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true) }.to output(/Retrying/).to_stderr
|
25
|
+
#{VALIDATING_BLANK_HDR}
|
26
|
+
|
27
|
+
== Clause 1
|
28
|
+
|
29
|
+
[latexmath]
|
30
|
+
++++
|
31
|
+
\\pmatrix{ \\hat{e}_{\\xi} \\cr \\hat{e}_{\\eta}
|
32
|
+
\\cr \\hat{e}_{\\zeta} } = {\\bf T} \\pmatrix{ \\hat{e}_x \\cr \\hat{e}_y \\cr \\hat{e}_z },
|
33
|
+
++++
|
34
|
+
|
35
|
+
=== Clause 1.1
|
36
|
+
|
37
|
+
Subclause
|
38
|
+
INPUT
|
39
|
+
end
|
6
40
|
|
7
41
|
it "warns about hanging paragraphs" do
|
8
42
|
FileUtils.rm_f "test.err"
|