metanorma-iso 2.1.7 → 2.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +3 -1
  3. data/.github/workflows/release.yml +24 -0
  4. data/lib/isodoc/iso/html/html_iso_titlepage.html +2 -2
  5. data/lib/isodoc/iso/html/style-human.scss +35 -1
  6. data/lib/isodoc/iso/html/style-iso.scss +36 -1
  7. data/lib/isodoc/iso/i18n-en.yaml +4 -0
  8. data/lib/isodoc/iso/i18n-fr.yaml +5 -0
  9. data/lib/isodoc/iso/i18n-ru.yaml +4 -0
  10. data/lib/isodoc/iso/i18n-zh-Hans.yaml +5 -0
  11. data/lib/isodoc/iso/init.rb +4 -0
  12. data/lib/isodoc/iso/iso.amendment.xsl +126 -162
  13. data/lib/isodoc/iso/iso.international-standard.xsl +126 -162
  14. data/lib/isodoc/iso/presentation_xml_convert.rb +18 -0
  15. data/lib/isodoc/iso/xref.rb +35 -4
  16. data/lib/metanorma/iso/base.rb +4 -0
  17. data/lib/metanorma/iso/biblio.rng +8 -5
  18. data/lib/metanorma/iso/cleanup.rb +5 -0
  19. data/lib/metanorma/iso/front_id.rb +59 -25
  20. data/lib/metanorma/iso/section.rb +5 -0
  21. data/lib/metanorma/iso/validate.rb +3 -2
  22. data/lib/metanorma/iso/version.rb +1 -1
  23. data/lib/metanorma/requirements/modspec.rb +60 -0
  24. data/lib/metanorma/requirements/requirements.rb +16 -0
  25. data/lib/metanorma-iso.rb +2 -1
  26. data/metanorma-iso.gemspec +1 -1
  27. data/spec/assets/iso.adoc +10 -0
  28. data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
  29. data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
  30. data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
  31. data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
  32. data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
  33. data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
  34. data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
  35. data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
  36. data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
  37. data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
  38. data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
  39. data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
  40. data/spec/examples/rice_img/ISO_1213_1.png +0 -0
  41. data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
  42. data/spec/isodoc/ref_spec.rb +9 -9
  43. data/spec/metanorma/amd_spec.rb +0 -10
  44. data/spec/metanorma/base_spec.rb +0 -10
  45. data/spec/metanorma/cleanup_spec.rb +136 -0
  46. data/spec/metanorma/macros_spec.rb +99 -0
  47. data/spec/metanorma/processor_spec.rb +86 -86
  48. data/spec/metanorma/validate_spec.rb +41 -40
  49. data/spec/requirements/requirements_spec.rb +1299 -0
  50. data/spec/requirements/xref_spec.rb +1205 -0
  51. data/spec/vcr_cassettes/docrels.yml +385 -0
  52. metadata +40 -25
  53. data/lib/isodoc/iso/html/htmlstyle.css +0 -47
  54. data/lib/isodoc/iso/html/isodoc-dis.css +0 -4493
  55. data/lib/isodoc/iso/html/isodoc.css +0 -1346
  56. data/lib/isodoc/iso/html/style-human.css +0 -1030
  57. data/lib/isodoc/iso/html/style-iso.css +0 -1056
  58. data/lib/isodoc/iso/html/wordstyle-dis.css +0 -2280
  59. data/lib/isodoc/iso/html/wordstyle.css +0 -1728
@@ -1505,5 +1505,141 @@ RSpec.describe Metanorma::ISO do
1505
1505
  expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
1506
1506
  .to be_equivalent_to xmlpp(output)
1507
1507
  end
1508
+
1509
+ it "does not allows subterms outside of vocabulary document" do
1510
+ input = <<~INPUT
1511
+ = Document title
1512
+ Author
1513
+ :docfile: test.adoc
1514
+ :nodoc:
1515
+ :novalid:
1516
+ :no-isobib:
1517
+
1518
+ == Terms and definitions
1519
+
1520
+ === Term1
1521
+
1522
+ === Term2
1523
+
1524
+ ==== Term2a
1525
+ INPUT
1526
+ output = <<~OUTPUT
1527
+ #{BLANK_HDR}
1528
+ <sections>
1529
+ <clause id='_' obligation='normative'>
1530
+ <title>Terms and definitions</title>
1531
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
1532
+ <p id='_'>
1533
+ ISO and IEC maintain terminology databases for use in standardization at
1534
+ the following addresses:
1535
+ </p>
1536
+ <ul id='_'>
1537
+ <li>
1538
+ <p id='_'>
1539
+ ISO Online browsing platform: available at
1540
+ <link target='https://www.iso.org/obp'/>
1541
+ </p>
1542
+ </li>
1543
+ <li>
1544
+ <p id='_'>
1545
+ IEC Electropedia: available at
1546
+ <link target='https://www.electropedia.org'/>
1547
+ </p>
1548
+ </li>
1549
+ </ul>
1550
+ <term id='term-Term1'>
1551
+ <preferred>
1552
+ <expression>
1553
+ <name>Term1</name>
1554
+ </expression>
1555
+ </preferred>
1556
+ </term>
1557
+ <terms id='_' obligation='normative'>
1558
+ <title>Term2</title>
1559
+ <term id='term-Term2a'>
1560
+ <preferred>
1561
+ <expression>
1562
+ <name>Term2a</name>
1563
+ </expression>
1564
+ </preferred>
1565
+ </term>
1566
+ </terms>
1567
+ </clause>
1568
+ </sections>
1569
+ </iso-standard>
1570
+ OUTPUT
1571
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
1572
+ .to be_equivalent_to xmlpp(output)
1573
+ end
1574
+
1575
+ it "allows subterms in vocabulary document" do
1576
+ input = <<~INPUT
1577
+ = Document title
1578
+ Author
1579
+ :docfile: test.adoc
1580
+ :nodoc:
1581
+ :novalid:
1582
+ :no-isobib:
1583
+ :docsubtype: vocabulary
1584
+
1585
+ == Terms and definitions
1586
+
1587
+ === Term1
1588
+
1589
+ === Term2
1590
+
1591
+ ==== Term2a
1592
+ INPUT
1593
+ output = <<~OUTPUT
1594
+ #{BLANK_HDR.sub(%r{</doctype>}, '</doctype><subdoctype>vocabulary</subdoctype>')}
1595
+ <sections>
1596
+ <terms id='_' obligation='normative'>
1597
+ <title>Terms and definitions</title>
1598
+ <p id='_'>
1599
+ ISO and IEC maintain terminology databases for use in standardization at
1600
+ the following addresses:
1601
+ </p>
1602
+ <ul id='_'>
1603
+ <li>
1604
+ <p id='_'>
1605
+ ISO Online browsing platform: available at
1606
+ <link target='https://www.iso.org/obp'/>
1607
+ </p>
1608
+ </li>
1609
+ <li>
1610
+ <p id='_'>
1611
+ IEC Electropedia: available at
1612
+ <link target='https://www.electropedia.org'/>
1613
+ </p>
1614
+ </li>
1615
+ </ul>
1616
+ <term id='term-Term1'>
1617
+ <preferred>
1618
+ <expression>
1619
+ <name>Term1</name>
1620
+ </expression>
1621
+ </preferred>
1622
+ </term>
1623
+ <term id='term-Term2'>
1624
+ <preferred>
1625
+ <expression>
1626
+ <name>Term2</name>
1627
+ </expression>
1628
+ </preferred>
1629
+ <term id='term-Term2a'>
1630
+ <preferred>
1631
+ <expression>
1632
+ <name>Term2a</name>
1633
+ </expression>
1634
+ </preferred>
1635
+ </term>
1636
+ </term>
1637
+ </terms>
1638
+ </sections>
1639
+ </iso-standard>
1640
+ OUTPUT
1641
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
1642
+ .to be_equivalent_to xmlpp(output)
1643
+ end
1508
1644
  end
1509
1645
  end
@@ -0,0 +1,99 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Metanorma::Standoc do
4
+ it "processes embed macro with document in a different flavour" do
5
+ input = <<~INPUT
6
+ #{ASCIIDOC_BLANK_HDR}
7
+
8
+ [[clause1]]
9
+ == Clause 1
10
+
11
+ embed::spec/assets/iso.adoc[]
12
+ INPUT
13
+ output = <<~OUTPUT
14
+ <standard-document xmlns='https://www.metanorma.org/ns/standoc' type='semantic' version='#{Metanorma::Standoc::VERSION}'>
15
+ <bibdata type='standard'>
16
+ <title language='en' format='text/plain'>Document title</title>
17
+ <language>en</language>
18
+ <script>Latn</script>
19
+ <status>
20
+ <stage>published</stage>
21
+ </status>
22
+ <copyright>
23
+ <from>2022</from>
24
+ </copyright>
25
+ <ext>
26
+ <doctype>standard</doctype>
27
+ </ext>
28
+ <relation type='derivedFrom'>
29
+ <bibitem>
30
+ <title language='en' format='text/plain' type='main'>
31
+ Medical devices — Quality management systems — Requirements for
32
+ regulatory purposes
33
+ </title>
34
+ <title language='en' format='text/plain' type='title-main'>
35
+ Medical devices — Quality management systems — Requirements for
36
+ regulatory purposes
37
+ </title>
38
+ <title language='fr' format='text/plain' type='main'>
39
+ Dispositifs médicaux — Systèmes de management de la qualité —
40
+ Exigences à des fins réglementaires
41
+ </title>
42
+ <title language='fr' format='text/plain' type='title-main'>
43
+ Dispositifs médicaux — Systèmes de management de la qualité —
44
+ Exigences à des fins réglementaires
45
+ </title>
46
+ <contributor>
47
+ <role type='author'/>
48
+ <organization>
49
+ <name>International Organization for Standardization</name>
50
+ <abbreviation>ISO</abbreviation>
51
+ </organization>
52
+ </contributor>
53
+ <contributor>
54
+ <role type='publisher'/>
55
+ <organization>
56
+ <name>International Organization for Standardization</name>
57
+ <abbreviation>ISO</abbreviation>
58
+ </organization>
59
+ </contributor>
60
+ <language>en</language>
61
+ <script>Latn</script>
62
+ <status>
63
+ <stage abbreviation='IS'>60</stage>
64
+ <substage>60</substage>
65
+ </status>
66
+ <copyright>
67
+ <from>2022</from>
68
+ <owner>
69
+ <organization>
70
+ <name>International Organization for Standardization</name>
71
+ <abbreviation>ISO</abbreviation>
72
+ </organization>
73
+ </owner>
74
+ </copyright>
75
+ <ext>
76
+ <doctype>standard</doctype>
77
+ <editorialgroup>
78
+ <agency>ISO</agency>
79
+ </editorialgroup>
80
+ <approvalgroup>
81
+ <agency>ISO</agency>
82
+ </approvalgroup>
83
+ <stagename>International standard</stagename>
84
+ </ext>
85
+ </bibitem>
86
+ </relation>
87
+ </bibdata>
88
+ <sections>
89
+ <clause id='clause1' inline-header='false' obligation='normative'>
90
+ <title>Clause 1</title>
91
+ </clause>
92
+ </sections>
93
+ </standard-document>
94
+ OUTPUT
95
+ expect(xmlpp(strip_guid(Asciidoctor
96
+ .convert(input, backend: :standoc, header_footer: true))))
97
+ .to be_equivalent_to xmlpp(output)
98
+ end
99
+ end
@@ -9,95 +9,95 @@ RSpec.describe Metanorma::Iso::Processor do
9
9
  processor = registry.find_processor(:iso)
10
10
 
11
11
  inputxml = <<~INPUT
12
- <iso-standard xmlns="http://riboseinc.com/isoxml">
13
- <bibdata type="standard">
14
- <title language="en" format="text/plain" type="main">English</title>
15
- <title language="en" format="text/plain" type="title-main">English</title>
16
- <title language="fr" format="text/plain" type="main">French</title>
17
- <title language="fr" format="text/plain" type="title-main">French</title>
18
- <docidentifier type="ISO">ISO DIR 1</docidentifier><docidentifier type="iso-with-lang">ISO DIR 1(F)</docidentifier><docidentifier type="iso-reference">ISO DIR 1(F)</docidentifier>
19
- <docnumber>1</docnumber>
20
- <contributor>
21
- <role type="author"/>
22
- <organization>
23
- <name>International Organization for Standardization</name>
24
- <abbreviation>ISO</abbreviation>
25
- </organization>
26
- </contributor>
27
- <contributor>
28
- <role type="publisher"/>
29
- <organization>
30
- <name>International Organization for Standardization</name>
31
- <abbreviation>ISO</abbreviation>
32
- </organization>
33
- </contributor>
34
- <language>fr</language>
35
- <script>Latn</script>
36
- <status>
37
- <stage abbreviation="IS">60</stage>
38
- <substage>60</substage>
39
- </status>
40
- <copyright>
41
- <from>#{Time.new.year}</from>
42
- <owner>
43
- <organization>
44
- <name>International Organization for Standardization</name>
45
- <abbreviation>ISO</abbreviation>
46
- </organization>
47
- </owner>
48
- </copyright>
49
- <ext>
50
- <doctype>directive</doctype>
51
- <subdoctype>vocabulary</subdoctype>
52
- <editorialgroup>
53
- <technical-committee/>
54
- <subcommittee/>
55
- <workgroup/>
56
- </editorialgroup>
57
- <structuredidentifier>
58
- <project-number>ISO 1</project-number>
59
- </structuredidentifier>
60
- <stagename>International standard</stagename>
61
- </ext>
62
- </bibdata>
63
- <boilerplate>
64
- <copyright-statement>
65
- <clause>
66
- <title>DOCUMENT PROT&#201;G&#201; PAR COPYRIGHT</title>
67
- <p id="boilerplate-year">&#169; ISO 2021</p>
12
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
13
+ <bibdata type="standard">
14
+ <title language="en" format="text/plain" type="main">English</title>
15
+ <title language="en" format="text/plain" type="title-main">English</title>
16
+ <title language="fr" format="text/plain" type="main">French</title>
17
+ <title language="fr" format="text/plain" type="title-main">French</title>
18
+ <docidentifier type="ISO">ISO DIR 1</docidentifier><docidentifier type="iso-with-lang">ISO DIR 1(F)</docidentifier><docidentifier type="iso-reference">ISO DIR 1(F)</docidentifier>
19
+ <docnumber>1</docnumber>
20
+ <contributor>
21
+ <role type="author"/>
22
+ <organization>
23
+ <name>International Organization for Standardization</name>
24
+ <abbreviation>ISO</abbreviation>
25
+ </organization>
26
+ </contributor>
27
+ <contributor>
28
+ <role type="publisher"/>
29
+ <organization>
30
+ <name>International Organization for Standardization</name>
31
+ <abbreviation>ISO</abbreviation>
32
+ </organization>
33
+ </contributor>
34
+ <language>fr</language>
35
+ <script>Latn</script>
36
+ <status>
37
+ <stage abbreviation="IS">60</stage>
38
+ <substage>60</substage>
39
+ </status>
40
+ <copyright>
41
+ <from>#{Time.new.year}</from>
42
+ <owner>
43
+ <organization>
44
+ <name>International Organization for Standardization</name>
45
+ <abbreviation>ISO</abbreviation>
46
+ </organization>
47
+ </owner>
48
+ </copyright>
49
+ <ext>
50
+ <doctype>directive</doctype>
51
+ <subdoctype>vocabulary</subdoctype>
52
+ <editorialgroup>
53
+ <technical-committee/>
54
+ <subcommittee/>
55
+ <workgroup/>
56
+ </editorialgroup>
57
+ <structuredidentifier>
58
+ <project-number>ISO 1</project-number>
59
+ </structuredidentifier>
60
+ <stagename>International standard</stagename>
61
+ </ext>
62
+ </bibdata>
63
+ <boilerplate>
64
+ <copyright-statement>
65
+ <clause>
66
+ <title>DOCUMENT PROT&#201;G&#201; PAR COPYRIGHT</title>
67
+ <p id="boilerplate-year">&#169; ISO 2021</p>
68
68
 
69
- <p id="boilerplate-message">
70
- Droits de reproduction r&#233;serv&#233;s. Sauf indication contraire, aucune partie de cette publication ne
71
- peut &#234;tre reproduite ni utilis&#233;e sous quelque forme que ce soit et par aucun proc&#233;d&#233;, &#233;lectronique
72
- ou m&#233;canique, y compris la photocopie, l&#8217;affichage sur l&#8217;internet ou sur un Intranet, sans
73
- autorisation &#233;crite pr&#233;alable. Les demandes d&#8217;autorisation peuvent &#234;tre adress&#233;es &#224; l&#8217;ISO &#224;
74
- l&#8217;adresse ci-apr&#232;s ou au comit&#233; membre de l&#8217;ISO dans le pays du demandeur.
75
- </p>
69
+ <p id="boilerplate-message">
70
+ Droits de reproduction r&#233;serv&#233;s. Sauf indication contraire, aucune partie de cette publication ne
71
+ peut &#234;tre reproduite ni utilis&#233;e sous quelque forme que ce soit et par aucun proc&#233;d&#233;, &#233;lectronique
72
+ ou m&#233;canique, y compris la photocopie, l&#8217;affichage sur l&#8217;internet ou sur un Intranet, sans
73
+ autorisation &#233;crite pr&#233;alable. Les demandes d&#8217;autorisation peuvent &#234;tre adress&#233;es &#224; l&#8217;ISO &#224;
74
+ l&#8217;adresse ci-apr&#232;s ou au comit&#233; membre de l&#8217;ISO dans le pays du demandeur.
75
+ </p>
76
76
 
77
- <p id="boilerplate-address" align="left">
78
- ISO copyright office<br/>
79
- Ch. de Blandonnet 8 &#8226; CP 401<br/>
80
- CH-1214 Vernier, Geneva, Switzerland<br/>
81
- Phone: +41 22 749 01 11<br/>
82
- Email: copyright@iso.org<br/>
83
- Website: www.iso.org
84
- </p>
85
- <p id="boilerplate-place">
86
- Publi&#233; en Suisse
87
- </p>
88
- </clause>
89
- </copyright-statement>
77
+ <p id="boilerplate-address" align="left">
78
+ ISO copyright office<br/>
79
+ Ch. de Blandonnet 8 &#8226; CP 401<br/>
80
+ CH-1214 Vernier, Geneva, Switzerland<br/>
81
+ Phone: +41 22 749 01 11<br/>
82
+ Email: copyright@iso.org<br/>
83
+ Website: www.iso.org
84
+ </p>
85
+ <p id="boilerplate-place">
86
+ Publi&#233; en Suisse
87
+ </p>
88
+ </clause>
89
+ </copyright-statement>
90
90
 
91
91
 
92
- </boilerplate>
93
- <sections>
94
- <terms id="H" obligation="normative"><title>1&#xA0; Terms, Definitions, Symbols and Abbreviated Terms</title>
95
- <term id="J">
96
- <name>1.1</name>
97
- <preferred>Term2</preferred>
98
- </term>
99
- </terms>
100
- </sections>
92
+ </boilerplate>
93
+ <sections>
94
+ <terms id="H" obligation="normative"><title>1&#xA0; Terms, Definitions, Symbols and Abbreviated Terms</title>
95
+ <term id="J">
96
+ <name>1.1</name>
97
+ <preferred>Term2</preferred>
98
+ </term>
99
+ </terms>
100
+ </sections>
101
101
  </iso-standard>
102
102
  INPUT
103
103
 
@@ -152,7 +152,7 @@ l&#8217;adresse ci-apr&#232;s ou au comit&#233; membre de l&#8217;ISO dans le pa
152
152
  FileUtils.rm_f "test.xml"
153
153
  FileUtils.rm_f "test.sts.xml"
154
154
  FileUtils.rm_f "test.iso.sts.xml"
155
- File.open("test.xml", "w") { |f| f.write inputxml }
155
+ File.write("test.xml", inputxml)
156
156
  processor.output(inputxml, "test.xml", "test.sts.xml", :sts)
157
157
  processor.output(inputxml, "test.xml", "test.iso.sts.xml", :isosts)
158
158
  expect(File.exist?("test.sts.xml")).to be true
@@ -35,102 +35,103 @@ RSpec.describe Metanorma::ISO do
35
35
  :partnumber: 1
36
36
  :edition: 2
37
37
  :amendment-number: 3
38
+ :data-uri-image: false
38
39
 
39
40
  .Split-it-right sample divider
40
- image::spec/examples/rice_images/rice_image1.png[]
41
- image::spec/examples/rice_images/SL1000-1_ed2amd3fig1.png[]
42
- image::spec/examples/rice_images/1001_ed2amd3fig1.png[]
43
- image::spec/examples/rice_images/ISO_1213_1.png[]
44
- image::spec/examples/rice_images/1000-1_ed2amd3figA.png[]
41
+ image::spec/examples/rice_img/rice_image1.png[]
42
+ image::spec/examples/rice_img/SL1000-1_ed2amd3fig1.png[]
43
+ image::spec/examples/rice_img/1001_ed2amd3fig1.png[]
44
+ image::spec/examples/rice_img/ISO_1213_1.png[]
45
+ image::spec/examples/rice_img/1000-1_ed2amd3figA.png[]
45
46
 
46
47
  |===
47
48
  |a |b
48
49
 
49
- a|image::spec/examples/rice_images/1000-1_ed2amd3figTab1.png[]#{' '}
50
- a|image::spec/examples/rice_images/1000-1_ed2amd3fig2.png[]
50
+ a|image::spec/examples/rice_img/1000-1_ed2amd3figTab1.png[]
51
+ a|image::spec/examples/rice_img/1000-1_ed2amd3fig2.png[]
51
52
  |===
52
53
 
53
- image::spec/examples/rice_images/1000-1_ed2amd3figTab2.png[]
54
+ image::spec/examples/rice_img/1000-1_ed2amd3figTab2.png[]
54
55
 
55
- image::spec/examples/rice_images/1000-1_ed2amd3figA1.png[]
56
- image::spec/examples/rice_images/1000-1_ed2amd3fig1a.png[]
56
+ image::spec/examples/rice_img/1000-1_ed2amd3figA1.png[]
57
+ image::spec/examples/rice_img/1000-1_ed2amd3fig1a.png[]
57
58
 
58
59
  .Stages of gelatinization
59
60
  ====
60
- image::spec/examples/rice_images/1000-1_ed2amd3fig1b.png[]
61
+ image::spec/examples/rice_img/1000-1_ed2amd3fig1b.png[]
61
62
 
62
- image::spec/examples/rice_images/1000-1_ed2amd3fig4.png[]
63
+ image::spec/examples/rice_img/1000-1_ed2amd3fig4.png[]
63
64
  ====
64
65
 
65
- image::spec/examples/rice_images/1000-1_ed2amd3fig5_f.png[]
66
+ image::spec/examples/rice_img/1000-1_ed2amd3fig5_f.png[]
66
67
 
67
68
  [appendix]
68
69
  == Annex
69
- image::spec/examples/rice_images/1000-1_ed2amd3figA2.png[]
70
- image::spec/examples/rice_images/1000-1_ed2amd3fig3.png[]
70
+ image::spec/examples/rice_img/1000-1_ed2amd3figA2.png[]
71
+ image::spec/examples/rice_img/1000-1_ed2amd3fig3.png[]
71
72
 
72
73
  INPUT
73
74
  expect(File.read("test.err")).to include \
74
- "image name spec/examples/rice_images/rice_image1.png does not match "\
75
+ "image name spec/examples/rice_img/rice_image1.png does not match "\
75
76
  "DRG requirements: expect 1000-1_ed2amd3fig"
76
77
  expect(File.read("test.err")).to include \
77
- "image name spec/examples/rice_images/1001_ed2amd3fig1.png does not "\
78
+ "image name spec/examples/rice_img/1001_ed2amd3fig1.png does not "\
78
79
  "match DRG requirements: " \
79
80
  "expect 1000-1_ed2amd3fig"
80
81
  expect(File.read("test.err")).not_to include \
81
- "image name spec/examples/rice_images/SL1000-1_ed2amd3fig1.png does not "\
82
+ "image name spec/examples/rice_img/SL1000-1_ed2amd3fig1.png does not "\
82
83
  "match DRG requirements: " \
83
84
  "expect 1000-1_ed2amd3fig"
84
85
  expect(File.read("test.err")).not_to include \
85
- "image name spec/examples/rice_images/ISO_1213_1.png does not match DRG "\
86
+ "image name spec/examples/rice_img/ISO_1213_1.png does not match DRG "\
86
87
  "requirements: expect 1000-1_ed2amd3fig"
87
88
  expect(File.read("test.err")).to include \
88
- "image name spec/examples/rice_images/1000-1_ed2amd3figA.png does not "\
89
+ "image name spec/examples/rice_img/1000-1_ed2amd3figA.png does not "\
89
90
  "match DRG requirements"
90
91
  expect(File.read("test.err")).not_to include \
91
- "image name spec/examples/rice_images/1000-1_ed2amd3figTab1.png does "\
92
+ "image name spec/examples/rice_img/1000-1_ed2amd3figTab1.png does "\
92
93
  "not match DRG requirements"
93
94
  expect(File.read("test.err")).not_to include \
94
- "image name spec/examples/rice_images/1000-1_ed2amd3figTab1.png is "\
95
+ "image name spec/examples/rice_img/1000-1_ed2amd3figTab1.png is "\
95
96
  "under a table but is not so labelled"
96
97
  expect(File.read("test.err")).to include \
97
- "image name spec/examples/rice_images/1000-1_ed2amd3fig2.png is under "\
98
+ "image name spec/examples/rice_img/1000-1_ed2amd3fig2.png is under "\
98
99
  "a table but is not so labelled"
99
100
  expect(File.read("test.err")).to include \
100
- "image name spec/examples/rice_images/1000-1_ed2amd3figTab2.png is "\
101
+ "image name spec/examples/rice_img/1000-1_ed2amd3figTab2.png is "\
101
102
  "labelled as under a table but is not"
102
103
  expect(File.read("test.err")).not_to include \
103
- "image name spec/examples/rice_images/1000-1_ed2amd3fig1.png is "\
104
+ "image name spec/examples/rice_img/1000-1_ed2amd3fig1.png is "\
104
105
  "labelled as under a table but is not"
105
106
  expect(File.read("test.err")).not_to include \
106
- "image name spec/examples/rice_images/1000-1_ed2amd3figA2.png is "\
107
+ "image name spec/examples/rice_img/1000-1_ed2amd3figA2.png is "\
107
108
  "under an annex but is not so labelled"
108
109
  expect(File.read("test.err")).to include \
109
- "image name spec/examples/rice_images/1000-1_ed2amd3fig3.png is "\
110
+ "image name spec/examples/rice_img/1000-1_ed2amd3fig3.png is "\
110
111
  "under an annex but is not so labelled"
111
112
  expect(File.read("test.err")).to include \
112
- "image name spec/examples/rice_images/1000-1_ed2amd3figA1.png is "\
113
+ "image name spec/examples/rice_img/1000-1_ed2amd3figA1.png is "\
113
114
  "labelled as under an annex but is not"
114
115
  expect(File.read("test.err")).not_to include \
115
- "image name spec/examples/rice_images/1000-1_ed2amd3fig1.png is "\
116
+ "image name spec/examples/rice_img/1000-1_ed2amd3fig1.png is "\
116
117
  "labelled as under an annex but is not"
117
118
  expect(File.read("test.err")).not_to include \
118
- "image name spec/examples/rice_images/1000-1_ed2amd3fig1b.png has a "\
119
+ "image name spec/examples/rice_img/1000-1_ed2amd3fig1b.png has a "\
119
120
  "subfigure letter but is not a subfigure"
120
121
  expect(File.read("test.err")).to include \
121
- "image name spec/examples/rice_images/1000-1_ed2amd3fig4.png does not "\
122
+ "image name spec/examples/rice_img/1000-1_ed2amd3fig4.png does not "\
122
123
  "have a subfigure letter but is a subfigure"
123
124
  expect(File.read("test.err")).to include \
124
- "image name spec/examples/rice_images/1000-1_ed2amd3fig1a.png has a "\
125
+ "image name spec/examples/rice_img/1000-1_ed2amd3fig1a.png has a "\
125
126
  "subfigure letter but is not a subfigure"
126
127
  expect(File.read("test.err")).not_to include \
127
- "image name spec/examples/rice_images/1000-1_ed2amd3fig1.png has a "\
128
+ "image name spec/examples/rice_img/1000-1_ed2amd3fig1.png has a "\
128
129
  "subfigure letter but is not a subfigure"
129
130
  expect(File.read("test.err")).to include \
130
- "image name spec/examples/rice_images/1000-1_ed2amd3fig5_f.png expected "\
131
+ "image name spec/examples/rice_img/1000-1_ed2amd3fig5_f.png expected "\
131
132
  "to have suffix _e"
132
133
  expect(File.read("test.err")).not_to include \
133
- "image name spec/examples/rice_images/1000-1_ed2amd3fig1.png expected "\
134
+ "image name spec/examples/rice_img/1000-1_ed2amd3fig1.png expected "\
134
135
  "to have suffix _e"
135
136
  end
136
137
 
@@ -487,7 +488,7 @@ RSpec.describe Metanorma::ISO do
487
488
  Asciidoctor.convert(<<~"INPUT", *OPTIONS)
488
489
  #{VALIDATING_BLANK_HDR}
489
490
 
490
- image::spec/examples/rice_images/rice_image1.png[]
491
+ image::spec/examples/rice_img/rice_image1.png[]
491
492
  INPUT
492
493
  expect(File.read("test.err")).to include "Figure should have title"
493
494
  end
@@ -2136,12 +2137,12 @@ RSpec.describe Metanorma::ISO do
2136
2137
 
2137
2138
  [[b]]
2138
2139
  === Term 1
2139
- <<b>>
2140
- <<c>>
2140
+ _<<b>>_
2141
+ _<<c>>_
2141
2142
 
2142
2143
  == Clause
2143
- <<b>>
2144
- <<c>>
2144
+ _<<b>>_
2145
+ _<<c>>_
2145
2146
 
2146
2147
  INPUT
2147
2148
  expect(File.read("test.err"))