metanorma-iec 2.1.11 → 2.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/iec/html/htmlstyle.css +6 -0
  3. data/lib/isodoc/iec/iec.international-standard.xsl +460 -152
  4. data/lib/isodoc/iec/presentation_xml_convert.rb +8 -6
  5. data/lib/isodoc/iec/word_convert.rb +9 -35
  6. data/lib/metanorma/iec/biblio.rng +5 -0
  7. data/lib/metanorma/iec/iec_intro_en.xml +11 -12
  8. data/lib/metanorma/iec/iec_intro_fr.xml +11 -11
  9. data/lib/metanorma/iec/isodoc.rng +47 -13
  10. data/lib/metanorma/iec/version.rb +1 -1
  11. data/metanorma-iec.gemspec +5 -2
  12. metadata +4 -36
  13. data/.github/workflows/automerge.yml +0 -31
  14. data/.github/workflows/rake.yml +0 -15
  15. data/.github/workflows/release.yml +0 -24
  16. data/Rakefile +0 -8
  17. data/bin/rspec +0 -18
  18. data/spec/assets/header.html +0 -7
  19. data/spec/assets/html.css +0 -2
  20. data/spec/assets/iso.xml +0 -71
  21. data/spec/assets/rice_image1.png +0 -0
  22. data/spec/assets/word.css +0 -2
  23. data/spec/assets/wordintro.html +0 -4
  24. data/spec/assets/xref_error.adoc +0 -7
  25. data/spec/isodoc/blocks_spec.rb +0 -200
  26. data/spec/isodoc/i18n_spec.rb +0 -607
  27. data/spec/isodoc/iev_spec.rb +0 -888
  28. data/spec/isodoc/inline_spec.rb +0 -256
  29. data/spec/isodoc/iso_spec.rb +0 -211
  30. data/spec/isodoc/metadata_spec.rb +0 -251
  31. data/spec/isodoc/postproc_spec.rb +0 -303
  32. data/spec/isodoc/ref_spec.rb +0 -335
  33. data/spec/isodoc/section_spec.rb +0 -566
  34. data/spec/isodoc/terms_spec.rb +0 -192
  35. data/spec/metanorma/base_spec.rb +0 -1041
  36. data/spec/metanorma/blocks_spec.rb +0 -470
  37. data/spec/metanorma/cleanup_spec.rb +0 -372
  38. data/spec/metanorma/iev_spec.rb +0 -254
  39. data/spec/metanorma/inline_spec.rb +0 -145
  40. data/spec/metanorma/lists_spec.rb +0 -194
  41. data/spec/metanorma/processor_spec.rb +0 -171
  42. data/spec/metanorma/section_spec.rb +0 -348
  43. data/spec/metanorma/validate_spec.rb +0 -56
  44. data/spec/spec_helper.rb +0 -305
@@ -1,4 +0,0 @@
1
-
2
- An empty word intro page.
3
-
4
- WORDTOC
@@ -1,7 +0,0 @@
1
- = X
2
- A
3
-
4
- == Clause
5
-
6
- <<a,b>>
7
-
@@ -1,200 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe IsoDoc::Iec do
4
- it "processes formulae (Word)" do
5
- input = <<~INPUT
6
- <iso-standard xmlns="http://riboseinc.com/isoxml">
7
- <preface><foreword>
8
- <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
9
- <stem type="AsciiMath">r = 1 %</stem>
10
- <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
11
- <dt>
12
- <stem type="AsciiMath">r</stem>
13
- </dt>
14
- <dd>
15
- <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
16
- </dd>
17
- </dl>
18
- <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
19
- <name>NOTE</name>
20
- <p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p>
21
- </note>
22
- </formula>
23
- <formula id="_be9158af-7e93-4ee2-90c5-26d31c181935"><name>1</name>
24
- <stem type="AsciiMath">r = 1 %</stem>
25
- </formula>
26
- </foreword></preface>
27
- </iso-standard>
28
- INPUT
29
- output = <<~OUTPUT
30
- <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
31
- <head>
32
- <style>
33
- </style>
34
- <style>
35
- </style>
36
- </head>
37
- <body lang='EN-US' link='blue' vlink='#954F72'>
38
- <div class='WordSection2'>
39
- <p>
40
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
41
- </p>
42
- #{IEC_TITLE}
43
- <div>
44
- <h1 class='ForewordTitle'>FOREWORD</h1>
45
- <div class='boilerplate_legal'/>
46
- <div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
47
- <p class='formula'>
48
- <span style='mso-tab-count:1'>&#160; </span>
49
- <span class='stem'>(#(r = 1 %)#)</span>
50
- </p>
51
- </div>
52
- <span class='zzMoveToFollowing'>
53
- where#{' '}
54
- <span class='stem'>(#(r)#)</span>
55
- </span>
56
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
57
- <div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
58
- <p class='Note'>
59
- <span class='note_label'>NOTE</span>
60
- <span style='mso-tab-count:1'>&#160; </span>
61
- [durationUnits] is essentially a duration statement without the "P"
62
- prefix. "P" is unnecessary because between "G" and "U" duration is
63
- always expressed.
64
- </p>
65
- </div>
66
- </div>
67
- <div id='_be9158af-7e93-4ee2-90c5-26d31c181935'><div class='formula'>
68
- <p class='formula'>
69
- <span style='mso-tab-count:1'>&#160; </span>
70
- <span class='stem'>(#(r = 1 %)#)</span>
71
- <span style='mso-tab-count:1'>&#160; </span>
72
- (1)
73
- </p>
74
- </div>
75
- </div>
76
- </div>
77
- <p>&#160;</p>
78
- </div>
79
- <p>
80
- <br clear='all' class='section'/>
81
- </p>
82
- <div class='WordSection3'>
83
- #{IEC_TITLE1}
84
- </div>
85
- <br clear='all' style='page-break-before:left;mso-break-type:section-break'/>
86
- <div class='colophon'/>
87
- </body>
88
- </html>
89
- OUTPUT
90
- expect(xmlpp(IsoDoc::Iec::WordConvert.new({})
91
- .convert("test", input, true)))
92
- .to be_equivalent_to xmlpp(output)
93
- end
94
-
95
- it "cross-references formulae" do
96
- input = <<~INPUT
97
- <iso-standard xmlns="http://riboseinc.com/isoxml">
98
- <preface>
99
- <foreword>
100
- <p>
101
- <xref target="N1"/>
102
- <xref target="N2"/>
103
- </p>
104
- </foreword>
105
- </preface>
106
- <sections>
107
- <clause id="intro"><title>First</title>
108
- <formula id="N1">
109
- <stem type="AsciiMath">r = 1 %</stem>
110
- </formula>
111
- <clause id="xyz"><title>Preparatory</title>
112
- <formula id="N2" inequality="true">
113
- <stem type="AsciiMath">r = 1 %</stem>
114
- </formula>
115
- <xref target="N2"/>
116
- </clause>
117
- </sections>
118
- </iso-standard>
119
- INPUT
120
- output = <<~OUTPUT
121
- <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
122
- <preface>
123
- <foreword displayorder="1">
124
- <p>
125
- <xref target='N1'>Clause 1, Equation (1)</xref>
126
- <xref target='N2'>1.1, Inequality (2)</xref>
127
- </p>
128
- </foreword>
129
- </preface>
130
- <sections>
131
- <clause id='intro' displayorder="2">
132
- <title depth='1'>
133
- 1
134
- <tab/>
135
- First
136
- </title>
137
- <formula id='N1'>
138
- <name>1</name>
139
- <stem type='AsciiMath'>r = 1 %</stem>
140
- </formula>
141
- <clause id='xyz'>
142
- <title depth='2'>
143
- 1.1
144
- <tab/>
145
- Preparatory
146
- </title>
147
- <formula id='N2' inequality='true'>
148
- <name>2</name>
149
- <stem type='AsciiMath'>r = 1 %</stem>
150
- </formula>
151
- <xref target='N2'>Inequality (2)</xref>
152
- </clause>
153
- </clause>
154
- </sections>
155
- </iso-standard>
156
- OUTPUT
157
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
158
- .convert("test", input, true)
159
- .gsub(%r{^.*<body}m, "<body")
160
- .gsub(%r{</body>.*}m, "</body>")))
161
- .to be_equivalent_to xmlpp(output)
162
- end
163
-
164
- it "does not ignore intervening ul in numbering ol" do
165
- input = <<~INPUT
166
- <iso-standard xmlns="http://riboseinc.com/isoxml">
167
- <preface><foreword>
168
- <ul>
169
- <li>A</li>
170
- <li>
171
- <ol>
172
- <li>List</li>
173
- </ol>
174
- </li>
175
- </ul>
176
- </foreword></preface>
177
- </iso-standard>
178
- INPUT
179
- presxml = <<~INPUT
180
- <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
181
- <preface>
182
- <foreword displayorder='1'>
183
- <ul>
184
- <li>A</li>
185
- <li>
186
- <ol type='arabic'>
187
- <li>List</li>
188
- </ol>
189
- </li>
190
- </ul>
191
- </foreword>
192
- </preface>
193
- </iso-standard>
194
- INPUT
195
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
196
- .convert("test", input, true)))
197
- .to be_equivalent_to xmlpp(presxml)
198
-
199
- end
200
- end