isodoc 2.0.8.2 → 2.1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +1 -1
  3. data/isodoc.gemspec +5 -3
  4. data/lib/isodoc/convert.rb +1 -1
  5. data/lib/isodoc/function/blocks.rb +0 -39
  6. data/lib/isodoc/function/blocks_example_note.rb +36 -1
  7. data/lib/isodoc/function/inline.rb +4 -0
  8. data/lib/isodoc/function/references.rb +2 -15
  9. data/lib/isodoc/function/section.rb +5 -0
  10. data/lib/isodoc/function/to_word_html.rb +7 -11
  11. data/lib/isodoc/html_function/postprocess.rb +16 -2
  12. data/lib/isodoc/metadata.rb +2 -1
  13. data/lib/isodoc/presentation_function/bibdata.rb +30 -4
  14. data/lib/isodoc/presentation_function/block.rb +13 -1
  15. data/lib/isodoc/presentation_function/section.rb +36 -0
  16. data/lib/isodoc/presentation_xml_convert.rb +7 -2
  17. data/lib/isodoc/version.rb +1 -1
  18. data/lib/isodoc/word_function/postprocess.rb +3 -4
  19. data/lib/isodoc/word_function/postprocess_cover.rb +14 -0
  20. data/lib/isodoc/word_function/table.rb +12 -10
  21. data/lib/isodoc/xref/xref_anchor.rb +1 -1
  22. data/lib/isodoc/xref/xref_counter.rb +4 -1
  23. data/lib/isodoc/xref/xref_gen_seq.rb +3 -3
  24. data/lib/isodoc/xref/xref_sect_gen.rb +34 -36
  25. data/lib/isodoc/xref.rb +19 -8
  26. data/lib/isodoc-yaml/i18n-ar.yaml +9 -0
  27. data/lib/isodoc-yaml/i18n-de.yaml +13 -0
  28. data/lib/isodoc-yaml/i18n-en.yaml +5 -0
  29. data/lib/isodoc-yaml/i18n-es.yaml +11 -0
  30. data/lib/isodoc-yaml/i18n-fr.yaml +12 -1
  31. data/lib/isodoc-yaml/i18n-ru.yaml +13 -0
  32. data/lib/isodoc-yaml/i18n-zh-Hans.yaml +5 -0
  33. data/lib/relaton/render/config.yml +4 -0
  34. data/lib/relaton/render/general.rb +35 -0
  35. data/spec/assets/i18n.yaml +6 -0
  36. data/spec/isodoc/blocks_spec.rb +249 -61
  37. data/spec/isodoc/i18n_spec.rb +266 -197
  38. data/spec/isodoc/inline_spec.rb +80 -106
  39. data/spec/isodoc/metadata_spec.rb +5 -3
  40. data/spec/isodoc/postproc_spec.rb +539 -397
  41. data/spec/isodoc/ref_spec.rb +52 -98
  42. data/spec/isodoc/section_spec.rb +4 -4
  43. data/spec/isodoc/xref_numbering_spec.rb +31 -0
  44. metadata +30 -22
  45. data/lib/isodoc/base_style/all.css +0 -227
  46. data/lib/isodoc/base_style/blocks.css +0 -0
  47. data/lib/isodoc/base_style/coverpage.css +0 -0
  48. data/lib/isodoc/base_style/defaults.css +0 -0
  49. data/lib/isodoc/base_style/metanorma_word.css +0 -47
  50. data/lib/isodoc/base_style/nav.css +0 -0
  51. data/lib/isodoc/base_style/reset.css +0 -125
  52. data/lib/isodoc/base_style/typography.css +0 -0
@@ -68,7 +68,7 @@ RSpec.describe IsoDoc do
68
68
  <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
69
69
  </references><references id="_bibliography" obligation="informative" normative="false">
70
70
  <title>Bibliography</title>
71
- <bibitem id="ISBN" type="ISBN">
71
+ <bibitem id="ISBN" type="book">
72
72
  <title format="text/plain">Chemicals for analytical laboratory use</title>
73
73
  <docidentifier type="ISBN">ISBN</docidentifier>
74
74
  <contributor>
@@ -78,7 +78,7 @@ RSpec.describe IsoDoc do
78
78
  </organization>
79
79
  </contributor>
80
80
  </bibitem>
81
- <bibitem id="ISSN" type="ISSN">
81
+ <bibitem id="ISSN" type="journal">
82
82
  <title format="text/plain">Instruments for analytical laboratory use</title>
83
83
  <docidentifier type="ISSN">ISSN</docidentifier>
84
84
  <contributor>
@@ -159,51 +159,18 @@ RSpec.describe IsoDoc do
159
159
  amendments) applies.
160
160
  </p>
161
161
  <bibitem id='ISO712' type='standard'>
162
- <title format='text/plain'>Cereals or cereal products</title>
163
- <title type='main' format='text/plain'>Cereals and cereal products</title>
162
+ <formattedref>International Organization for Standardization. <em>Cereals and cereal products</em>.</formattedref>
164
163
  <docidentifier type='ISO'>ISO 712</docidentifier>
165
164
  <docidentifier type='metanorma'>[110]</docidentifier>
166
- <contributor>
167
- <role type='publisher'/>
168
- <organization>
169
- <name>International Organization for Standardization</name>
170
- </organization>
171
- </contributor>
172
165
  </bibitem>
173
166
  <bibitem id='ISO16634' type='standard'>
174
- <title language='x' format='text/plain'>
175
- Cereals, pulses, milled cereal products, xxxx, oilseeds and animal
176
- feeding stuffs
177
- </title>
178
- <title language='en' format='text/plain'>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
167
+ <formattedref><em>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</em>.</formattedref>
179
168
  <docidentifier type='ISO'>ISO 16634:-- (all parts)</docidentifier>
180
- <date type='published'>
181
- <on>--</on>
182
- </date>
183
- <contributor>
184
- <role type='publisher'/>
185
- <organization>
186
- <abbreviation>ISO</abbreviation>
187
- </organization>
188
- </contributor>
189
169
  <note format='text/plain' type='Unpublished-Status' reference='1'>Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
190
- <extent type='part'>
191
- <referenceFrom>all</referenceFrom>
192
- </extent>
193
170
  </bibitem>
194
171
  <bibitem id='ISO20483' type='standard'>
195
- <title format='text/plain'>Cereals and pulses</title>
172
+ <formattedref>International Organization for Standardization. <em>Cereals and pulses</em>. 2013&#x2013;2014.</formattedref>
196
173
  <docidentifier type='ISO'>ISO 20483:2013-2014</docidentifier>
197
- <date type='published'>
198
- <from>2013</from>
199
- <to>2014</to>
200
- </date>
201
- <contributor>
202
- <role type='publisher'/>
203
- <organization>
204
- <name>International Organization for Standardization</name>
205
- </organization>
206
- </contributor>
207
174
  </bibitem>
208
175
  <bibitem id='ref1'>
209
176
  <formattedref format='application/x-isodoc+xml'>
@@ -216,7 +183,7 @@ RSpec.describe IsoDoc do
216
183
  </em>
217
184
  (see
218
185
  <link target='http://www.icc.or.at'/>
219
- )
186
+ ) [ICC/167]
220
187
  </formattedref>
221
188
  <docidentifier type='ICC'>ICC/167</docidentifier>
222
189
  </bibitem>
@@ -231,27 +198,15 @@ RSpec.describe IsoDoc do
231
198
  </references>
232
199
  <references id='_bibliography' obligation='informative' normative='false' displayorder="3">
233
200
  <title depth="1">Bibliography</title>
234
- <bibitem id='ISBN' type='ISBN'>
235
- <title format='text/plain'>Chemicals for analytical laboratory use</title>
201
+ <bibitem id='ISBN' type='book'>
202
+ <formattedref><em>Chemicals for analytical laboratory use</em>. ISBN.</formattedref>
236
203
  <docidentifier type='metanorma-ordinal'>[1]</docidentifier>
237
204
  <docidentifier type='ISBN'>ISBN</docidentifier>
238
- <contributor>
239
- <role type='publisher'/>
240
- <organization>
241
- <abbreviation>ISBN</abbreviation>
242
- </organization>
243
- </contributor>
244
205
  </bibitem>
245
- <bibitem id='ISSN' type='ISSN'>
246
- <title format='text/plain'>Instruments for analytical laboratory use</title>
206
+ <bibitem id='ISSN' type='journal'>
207
+ <formattedref><em>Instruments for analytical laboratory use</em>. ISSN.</formattedref>
247
208
  <docidentifier type='metanorma-ordinal'>[2]</docidentifier>
248
209
  <docidentifier type='ISSN'>ISSN</docidentifier>
249
- <contributor>
250
- <role type='publisher'/>
251
- <organization>
252
- <abbreviation>ISSN</abbreviation>
253
- </organization>
254
- </contributor>
255
210
  </bibitem>
256
211
  <note>
257
212
  <name>NOTE</name>
@@ -262,15 +217,9 @@ RSpec.describe IsoDoc do
262
217
  <p>This is another annotation of document ISSN.</p>
263
218
  </note>
264
219
  <bibitem id='ISO3696' type='standard'>
265
- <title format='text/plain'>Water for analytical laboratory use</title>
220
+ <formattedref><em>Water for analytical laboratory use</em>.</formattedref>
266
221
  <docidentifier type='metanorma-ordinal'>[3]</docidentifier>
267
222
  <docidentifier type='ISO'>ISO 3696</docidentifier>
268
- <contributor>
269
- <role type='publisher'/>
270
- <organization>
271
- <abbreviation>ISO</abbreviation>
272
- </organization>
273
- </contributor>
274
223
  </bibitem>
275
224
  <bibitem id='ref10'>
276
225
  <formattedref format='application/x-isodoc+xml'>
@@ -288,11 +237,11 @@ RSpec.describe IsoDoc do
288
237
  <docidentifier type='metanorma'>[10]</docidentifier>
289
238
  </bibitem>
290
239
  <bibitem id="ref10a" hidden="true">
291
- <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
240
+ <formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em>.</formattedref>
292
241
  <docidentifier type="IETF">IETF RFC 20</docidentifier>
293
242
  </bibitem>
294
243
  <bibitem id='ref11'>
295
- <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
244
+ <formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em>.</formattedref>
296
245
  <docidentifier type='metanorma-ordinal'>[4]</docidentifier>
297
246
  <docidentifier type='IETF'>IETF RFC 10</docidentifier>
298
247
  </bibitem>
@@ -300,18 +249,18 @@ RSpec.describe IsoDoc do
300
249
  <formattedref format='application/x-isodoc+xml'>
301
250
  CitationWorks. 2019.
302
251
  <em>How to cite a reference</em>
303
- .
252
+ . [IETF RFC 20]
304
253
  </formattedref>
305
254
  <docidentifier type='metanorma'>[Citn]</docidentifier>
306
255
  <docidentifier type='IETF'>IETF RFC 20</docidentifier>
307
256
  </bibitem>
308
257
  <bibitem id="ref10b">
309
- <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
258
+ <formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em>.</formattedref>
310
259
  <docidentifier type='metanorma-ordinal'>[5]</docidentifier>
311
260
  <docidentifier type="IETF">IETF RFC 20</docidentifier>
312
261
  </bibitem>
313
262
  <bibitem id='ref10c'>
314
- <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
263
+ <formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em>.</formattedref>
315
264
  <docidentifier type='metanorma-ordinal'>[6]</docidentifier>
316
265
  <docidentifier type='DOI'>DOI ABC 20</docidentifier>
317
266
  </bibitem>
@@ -321,8 +270,8 @@ RSpec.describe IsoDoc do
321
270
  PRESXML
322
271
 
323
272
  html = <<~OUTPUT
324
- #{HTML_HDR}
325
- <br/>
273
+ #{HTML_HDR}
274
+ <br/>
326
275
  <div>
327
276
  <h1 class='ForewordTitle'>Foreword</h1>
328
277
  <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
@@ -340,15 +289,16 @@ RSpec.describe IsoDoc do
340
289
  <div>
341
290
  <h1>1.&#160; Normative References</h1>
342
291
  <p>
343
- The following documents are referred to in the text in such a way that
344
- some or all of their content constitutes requirements of this
292
+ The following documents are referred to in the text in such a way
293
+ that some or all of their content constitutes requirements of this
345
294
  document. For dated references, only the edition cited applies. For
346
295
  undated references, the latest edition of the referenced document
347
296
  (including any amendments) applies.
348
297
  </p>
349
298
  <p id='ISO712' class='NormRef'>
350
- [110], ISO 712,
299
+ [110], ISO 712, International Organization for Standardization.
351
300
  <i>Cereals and cereal products</i>
301
+ .
352
302
  </p>
353
303
  <p id='ISO16634' class='NormRef'>
354
304
  ISO 16634:-- (all parts)
@@ -357,23 +307,25 @@ RSpec.describe IsoDoc do
357
307
  </a>
358
308
  ,
359
309
  <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
310
+ .
360
311
  </p>
361
312
  <p id='ISO20483' class='NormRef'>
362
- ISO 20483:2013-2014,
313
+ ISO 20483:2013-2014, International Organization for Standardization.
363
314
  <i>Cereals and pulses</i>
315
+ . 2013&#8211;2014.
364
316
  </p>
365
317
  <p id='ref1' class='NormRef'>
366
318
  ICC/167,
367
319
  <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
368
- .
320
+ .
369
321
  <i>
370
- Determination of the protein content in cereal and cereal products
322
+ Determination of the protein content in cereal and cereal products
371
323
  for food and animal feeding stuffs according to the Dumas combustion
372
324
  method
373
325
  </i>
374
326
  (see
375
327
  <a href='http://www.icc.or.at'>http://www.icc.or.at</a>
376
- )
328
+ ) [ICC/167]
377
329
  </p>
378
330
  <div class='Note'>
379
331
  <p>
@@ -389,10 +341,12 @@ RSpec.describe IsoDoc do
389
341
  <p id='ISBN' class='Biblio'>
390
342
  [1]&#160;
391
343
  <i>Chemicals for analytical laboratory use</i>
344
+ . ISBN.
392
345
  </p>
393
346
  <p id='ISSN' class='Biblio'>
394
347
  [2]&#160;
395
348
  <i>Instruments for analytical laboratory use</i>
349
+ . ISSN.
396
350
  </p>
397
351
  <div class='Note'>
398
352
  <p>
@@ -409,37 +363,41 @@ RSpec.describe IsoDoc do
409
363
  <p id='ISO3696' class='Biblio'>
410
364
  [3]&#160; ISO 3696,
411
365
  <i>Water for analytical laboratory use</i>
366
+ .
412
367
  </p>
413
368
  <p id='ref10' class='Biblio'>
414
369
  [10]&#160;
415
370
  <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
416
- .
371
+ .
417
372
  <i>
418
- Determination of the protein content in cereal and cereal products
373
+ Determination of the protein content in cereal and cereal products
419
374
  for food and animal feeding stuffs according to the Dumas combustion
420
375
  method
421
376
  </i>
422
377
  (see
423
378
  <a href='http://www.icc.or.at'>http://www.icc.or.at</a>
424
- )
379
+ )
425
380
  </p>
426
381
  <p id='ref11' class='Biblio'>
427
382
  [4]&#160; IETF RFC 10,
428
383
  <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
384
+ .
429
385
  </p>
430
386
  <p id='ref12' class='Biblio'>
431
387
  Citn&#160; IETF RFC 20, CitationWorks. 2019.
432
388
  <i>How to cite a reference</i>
433
- .
389
+ . [IETF RFC 20]
434
390
  </p>
435
- <p id='ref10b' class='Biblio'>
391
+ <p id='ref10b' class='Biblio'>
436
392
  [5]&#160; IETF RFC 20,
437
393
  <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
394
+ .
438
395
  </p>
439
396
  <p id='ref10c' class='Biblio'>
440
- [6]&#160;
441
- <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
442
- </p>
397
+ [6]&#160;
398
+ <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
399
+ .
400
+ </p>
443
401
  </div>
444
402
  <aside id='fn:1' class='footnote'>
445
403
  <p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
@@ -702,11 +660,7 @@ RSpec.describe IsoDoc do
702
660
  </contributor>
703
661
  </bibitem>
704
662
  <bibitem id='ISO16634' type='standard'>
705
- <title language='x' format='text/plain'>
706
- Cereals, pulses, milled cereal products, xxxx, oilseeds and animal
707
- feeding stuffs
708
- </title>
709
- <title language='en' format='text/plain'>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
663
+ <formattedref language='en' format='text/plain'><em>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</em></formattedref>
710
664
  <docidentifier type='ISO'>ISO 16634:-- (all parts)</docidentifier>
711
665
  <date type='published'>
712
666
  <on>--</on>
@@ -880,16 +834,16 @@ RSpec.describe IsoDoc do
880
834
  <references id='_normative_references' obligation='informative' normative='false' displayorder='1'>
881
835
  <title depth='1'>Bibliography</title>
882
836
  <bibitem id='ref1' type='standard'>
883
- <title format='text/plain'>Cereals or cereal products</title>
837
+ <formattedref><em>Cereals or cereal products</em>.</formattedref>
884
838
  <docidentifier type='metanorma-ordinal'>[1]</docidentifier>
885
839
  <docidentifier type='IEC'>IEC 217</docidentifier>
886
840
  </bibitem>
887
841
  <bibitem id='ref2' type='standard'>
888
- <title format='text/plain'>Cereals or cereal products</title>
842
+ <formattedref><em>Cereals or cereal products</em>.</formattedref>
889
843
  <docidentifier type='metanorma'>[3]</docidentifier>
890
844
  </bibitem>
891
845
  <bibitem id='ref3' type='standard'>
892
- <title format='text/plain'>Cereals or cereal products</title>
846
+ <formattedref><em>Cereals or cereal products</em>.</formattedref>
893
847
  <docidentifier type='metanorma-ordinal'>[4]</docidentifier>
894
848
  <docidentifier>ABC</docidentifier>
895
849
  </bibitem>
@@ -929,15 +883,15 @@ RSpec.describe IsoDoc do
929
883
  <references id='_normative_references' obligation='informative' normative='false' displayorder='1'>
930
884
  <title depth='1'>Bibliography</title>
931
885
  <bibitem id='ref1' type='standard'>
932
- <title format='text/plain'>Cereals or cereal products</title>
886
+ <formattedref><em>Cereals or cereal products</em>.</formattedref>
933
887
  <docidentifier type='metanorma'>[1]</docidentifier>
934
888
  </bibitem>
935
889
  <bibitem id='ref2' type='standard' hidden='true'>
936
- <title format='text/plain'>Cereals or cereal products</title>
890
+ <formattedref><em>Cereals or cereal products</em>.</formattedref>
937
891
  <docidentifier type='metanorma'>[2]</docidentifier>
938
892
  </bibitem>
939
893
  <bibitem id='ref3' type='standard'>
940
- <title format='text/plain'>Cereals or cereal products</title>
894
+ <formattedref><em>Cereals or cereal products</em>.</formattedref>
941
895
  <docidentifier type='metanorma'>[3]</docidentifier>
942
896
  </bibitem>
943
897
  </references>
@@ -976,16 +930,16 @@ RSpec.describe IsoDoc do
976
930
  <references id='_normative_references' obligation='informative' normative='false' displayorder='1'>
977
931
  <title depth='1'>Bibliography</title>
978
932
  <bibitem id='ref1' type='standard'>
979
- <title format='text/plain'>Cereals or cereal products</title>
933
+ <formattedref><em>Cereals or cereal products</em>.</formattedref>
980
934
  <docidentifier type='metanorma-ordinal'>[1]</docidentifier>
981
935
  <docidentifier>ABC</docidentifier>
982
936
  </bibitem>
983
937
  <bibitem id='ref2' type='standard' hidden='true'>
984
- <title format='text/plain'>Cereals or cereal products</title>
938
+ <formattedref><em>Cereals or cereal products</em>.</formattedref>
985
939
  <docidentifier>ABD</docidentifier>
986
940
  </bibitem>
987
941
  <bibitem id='ref3' type='standard'>
988
- <title format='text/plain'>Cereals or cereal products</title>
942
+ <formattedref><em>Cereals or cereal products</em>.</formattedref>
989
943
  <docidentifier type='metanorma-ordinal'>[2]</docidentifier>
990
944
  <docidentifier>ABE</docidentifier>
991
945
  </bibitem>
@@ -45,7 +45,6 @@ RSpec.describe IsoDoc do
45
45
  </div>
46
46
  <p class='zzSTDTitle1'/>
47
47
  <div id='L' class='Admonition'>
48
- <p class='AdmonitionTitle' style='text-align:center;'>CAUTION</p>
49
48
  <p>admonition</p>
50
49
  </div>
51
50
  <div id='M'>
@@ -105,7 +104,6 @@ RSpec.describe IsoDoc do
105
104
  <div class='WordSection3'>
106
105
  <p class='zzSTDTitle1'/>
107
106
  <div id='L' class='Admonition'>
108
- <p class='AdmonitionTitle' style='text-align:center;'>CAUTION</p>
109
107
  <p>admonition</p>
110
108
  </div>
111
109
  <div id='M'>
@@ -201,7 +199,9 @@ RSpec.describe IsoDoc do
201
199
  </acknowledgements>
202
200
  </preface><sections>
203
201
  <note id="NN1"><p>Initial note</p></note>
204
- <admonition id="NN2" type="warning"><p>Initial admonition</p></admonition>
202
+ <admonition id="NN2" type="warning">
203
+ <name>WARNING</name>
204
+ <p>Initial admonition</p></admonition>
205
205
  <clause id="D" obligation="normative" type="scope">
206
206
  <title>Scope</title>
207
207
  <p id="E">Text</p>
@@ -316,6 +316,7 @@ RSpec.describe IsoDoc do
316
316
  <p>Initial note</p>
317
317
  </note>
318
318
  <admonition id='NN2' type='warning'>
319
+ <name>WARNING</name>
319
320
  <p>Initial admonition</p>
320
321
  </admonition>
321
322
  <clause id='D' obligation='normative' type='scope' displayorder='7'>
@@ -2048,7 +2049,6 @@ RSpec.describe IsoDoc do
2048
2049
  <strong>Glossary</strong>
2049
2050
  </title>
2050
2051
  <terms id='PP1' obligation='normative'>
2051
- <title>A.</title>
2052
2052
  <term id='term-glossary'>
2053
2053
  <name>A.1.</name>
2054
2054
  <preferred><strong>Glossary</strong></preferred>
@@ -344,4 +344,35 @@ RSpec.describe IsoDoc do
344
344
  a.increment({})
345
345
  expect(a.print).to eq "Bb"
346
346
  end
347
+
348
+ it "returns initial unincremented value" do
349
+ input = <<~INPUT
350
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
351
+ <preface>
352
+ <foreword id="fwd">
353
+ <note id="A" unnumbered="true"/>
354
+ <note id="B" unnumbered="false"/>
355
+ <note id="C" unnumbered="true"/>
356
+ </foreword>
357
+ </preface>
358
+ </iso-standard>
359
+ INPUT
360
+ output = <<~OUTPUT
361
+ <foreword id='fwd' displayorder='1'>
362
+ <note id='A' unnumbered='true'>
363
+ <name>NOTE </name>
364
+ </note>
365
+ <note id='B' unnumbered='false'>
366
+ <name>NOTE </name>
367
+ </note>
368
+ <note id='C' unnumbered='true'>
369
+ <name>NOTE </name>
370
+ </note>
371
+ </foreword>
372
+ OUTPUT
373
+ expect(xmlpp(Nokogiri::XML(IsoDoc::PresentationXMLConvert.new({})
374
+ .convert("test", input, true))
375
+ .at("//xmlns:foreword").to_xml))
376
+ .to be_equivalent_to xmlpp(output)
377
+ end
347
378
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8.2
4
+ version: 2.1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-20 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.3.0
33
+ version: 1.4.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.3.0
40
+ version: 1.4.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: htmlentities
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: emf2svg
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "<="
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '1.3'
89
+ version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "<="
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '1.3'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: mathml2asciimath
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.12.0
131
+ version: '1.12'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.12.0
138
+ version: '1.12'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: relaton-cli
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: relaton-render
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: 0.3.1
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: 0.3.1
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: roman-numerals
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -405,23 +419,15 @@ files:
405
419
  - lib/isodoc-yaml/i18n-ru.yaml
406
420
  - lib/isodoc-yaml/i18n-zh-Hans.yaml
407
421
  - lib/isodoc.rb
408
- - lib/isodoc/base_style/all.css
409
422
  - lib/isodoc/base_style/all.scss
410
423
  - lib/isodoc/base_style/bands.scss
411
- - lib/isodoc/base_style/blocks.css
412
424
  - lib/isodoc/base_style/blocks.scss
413
- - lib/isodoc/base_style/coverpage.css
414
425
  - lib/isodoc/base_style/coverpage.scss
415
- - lib/isodoc/base_style/defaults.css
416
426
  - lib/isodoc/base_style/defaults.scss
417
- - lib/isodoc/base_style/metanorma_word.css
418
427
  - lib/isodoc/base_style/metanorma_word.scss
419
- - lib/isodoc/base_style/nav.css
420
428
  - lib/isodoc/base_style/nav.scss
421
- - lib/isodoc/base_style/reset.css
422
429
  - lib/isodoc/base_style/reset.scss
423
430
  - lib/isodoc/base_style/scripts.html
424
- - lib/isodoc/base_style/typography.css
425
431
  - lib/isodoc/base_style/typography.scss
426
432
  - lib/isodoc/class_utils.rb
427
433
  - lib/isodoc/common.rb
@@ -490,6 +496,8 @@ files:
490
496
  - lib/metanorma/output/base.rb
491
497
  - lib/metanorma/output/utils.rb
492
498
  - lib/metanorma/output/xslfo.rb
499
+ - lib/relaton/render/config.yml
500
+ - lib/relaton/render/general.rb
493
501
  - spec/assets/header.html
494
502
  - spec/assets/html.scss
495
503
  - spec/assets/html_override.css
@@ -534,7 +542,7 @@ homepage: https://github.com/metanorma/isodoc
534
542
  licenses:
535
543
  - BSD-2-Clause
536
544
  metadata: {}
537
- post_install_message:
545
+ post_install_message:
538
546
  rdoc_options: []
539
547
  require_paths:
540
548
  - lib
@@ -549,8 +557,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
549
557
  - !ruby/object:Gem::Version
550
558
  version: '0'
551
559
  requirements: []
552
- rubygems_version: 3.3.9
553
- signing_key:
560
+ rubygems_version: 3.1.6
561
+ signing_key:
554
562
  specification_version: 4
555
563
  summary: Convert documents in IsoDoc into Word and HTML in AsciiDoc.
556
564
  test_files: []