metanorma-iec 1.2.8 → 1.2.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.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +7 -5
- data/lib/asciidoctor/iec/basicdoc.rng +52 -3
- data/lib/asciidoctor/iec/converter.rb +25 -1
- data/lib/asciidoctor/iec/front.rb +35 -58
- data/lib/asciidoctor/iec/iec.rng +81 -1
- data/lib/asciidoctor/iec/iec_intro_en.xml +110 -56
- data/lib/asciidoctor/iec/iec_intro_fr.xml +78 -22
- data/lib/asciidoctor/iec/isodoc.rng +51 -3
- data/lib/asciidoctor/iec/isostandard.rng +27 -10
- data/lib/isodoc/iec/base_convert.rb +2 -2
- data/lib/isodoc/iec/html/html_iec_intro.html +1 -1
- data/lib/isodoc/iec/html/htmlstyle.css +5 -5
- data/lib/isodoc/iec/html/htmlstyle.scss +4 -4
- data/lib/isodoc/iec/html/isodoc.css +79 -79
- data/lib/isodoc/iec/html/isodoc.scss +79 -79
- data/lib/isodoc/iec/html/word_iec_intro.html +1 -1
- data/lib/isodoc/iec/html/wordstyle.css +120 -120
- data/lib/isodoc/iec/html/wordstyle.scss +120 -120
- data/lib/isodoc/iec/html_convert.rb +10 -2
- data/lib/isodoc/iec/i18n-en.yaml +17 -0
- data/lib/isodoc/iec/i18n-fr.yaml +18 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +914 -398
- data/lib/isodoc/iec/metadata.rb +33 -0
- data/lib/isodoc/iec/presentation_xml_convert.rb +12 -0
- data/lib/isodoc/iec/word_convert.rb +12 -2
- data/lib/metanorma/iec/processor.rb +11 -8
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +2 -3
- data/spec/asciidoctor-iec/base_spec.rb +444 -10
- data/spec/asciidoctor-iec/blocks_spec.rb +25 -21
- data/spec/asciidoctor-iec/cleanup_spec.rb +99 -14
- data/spec/asciidoctor-iec/iev_spec.rb +15 -6
- data/spec/asciidoctor-iec/inline_spec.rb +11 -7
- data/spec/asciidoctor-iec/lists_spec.rb +13 -9
- data/spec/asciidoctor-iec/section_spec.rb +9 -5
- data/spec/asciidoctor-iec/validate_spec.rb +16 -1
- data/spec/isodoc/i18n_spec.rb +30 -0
- data/spec/isodoc/iso_spec.rb +4 -4
- data/spec/isodoc/metadata_spec.rb +23 -1
- data/spec/metanorma/processor_spec.rb +1 -1
- data/spec/spec_helper.rb +20 -31
- metadata +5 -19
data/lib/isodoc/iec/metadata.rb
CHANGED
@@ -20,6 +20,39 @@ module IsoDoc
|
|
20
20
|
set(:revdate, revdate&.text)
|
21
21
|
end
|
22
22
|
|
23
|
+
def doctype(isoxml, _out)
|
24
|
+
super
|
25
|
+
b = isoxml&.at(ns("//bibdata/ext/doctype#{NOLANG}"))&.text
|
26
|
+
b1 = isoxml&.at(ns("//bibdata/ext/doctype[@language = 'en']"))&.text || b
|
27
|
+
b1 and set(:doctype_en, status_print(b1))
|
28
|
+
b1 = isoxml&.at(ns("//bibdata/ext/doctype[@language = 'fr']"))&.text || b
|
29
|
+
b1 and set(:doctype_fr, status_print(b1))
|
30
|
+
docfunction(isoxml)
|
31
|
+
dochorizontal(isoxml)
|
32
|
+
end
|
33
|
+
|
34
|
+
def docfunction(isoxml)
|
35
|
+
b = isoxml&.at(ns("//bibdata/ext/function#{NOLANG}"))&.text || return
|
36
|
+
b and set(:function, status_print(b))
|
37
|
+
b1 = isoxml&.at(ns("//bibdata/ext/function#{currlang}"))&.text || b
|
38
|
+
b1 and set(:function_display, status_print(b1))
|
39
|
+
b1 = isoxml&.at(ns("//bibdata/ext/function[@language = 'en']"))&.text || b
|
40
|
+
b1 and set(:function_en, status_print(b1))
|
41
|
+
b1 = isoxml&.at(ns("//bibdata/ext/function[@language = 'fr']"))&.text || b
|
42
|
+
b1 and set(:function_fr, status_print(b1))
|
43
|
+
end
|
44
|
+
|
45
|
+
def dochorizontal(isoxml)
|
46
|
+
b = isoxml&.at(ns("//bibdata/ext/horizontal#{NOLANG}"))&.text || return
|
47
|
+
b and set(:horizontal, status_print(b))
|
48
|
+
b1 = isoxml&.at(ns("//bibdata/ext/horizontal#{currlang}"))&.text
|
49
|
+
b1 and set(:horizontal_display, status_print(b1))
|
50
|
+
b1 = isoxml&.at(ns("//bibdata/ext/horizontal[@language = 'en']"))&.text
|
51
|
+
b1 and set(:horizontal_en, status_print(b1))
|
52
|
+
b1 = isoxml&.at(ns("//bibdata/ext/horizontal[@language = 'fr']"))&.text
|
53
|
+
b1 and set(:horizontal_fr, status_print(b1))
|
54
|
+
end
|
55
|
+
|
23
56
|
def unpublished(status)
|
24
57
|
status.to_i > 0 && status.to_i < 60
|
25
58
|
end
|
@@ -28,6 +28,18 @@ module IsoDoc
|
|
28
28
|
call(f)
|
29
29
|
end
|
30
30
|
|
31
|
+
def bibdata_i18n(b)
|
32
|
+
fr = IsoDoc::Iec::I18n.new("fr", "Latn")
|
33
|
+
en = IsoDoc::Iec::I18n.new("en", "Latn")
|
34
|
+
[{ lang: "en", i18n: en }, { lang: "fr", i18n: fr }].each do |v|
|
35
|
+
hash_translate(b, v[:i18n].get["doctype_dict"], "./ext/doctype", v[:lang])
|
36
|
+
hash_translate(b, v[:i18n].get["stage_dict"], "./status/stage", v[:lang])
|
37
|
+
hash_translate(b, v[:i18n].get["substage_dict"], "./status/substage", v[:lang])
|
38
|
+
hash_translate(b, v[:i18n].get["function_dict"], "./ext/function", v[:lang])
|
39
|
+
hash_translate(b, v[:i18n].get["horizontal_dict"], "./ext/horizontal", v[:lang])
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
31
43
|
include Init
|
32
44
|
end
|
33
45
|
end
|
@@ -13,9 +13,13 @@ module IsoDoc
|
|
13
13
|
|
14
14
|
def default_fonts(options)
|
15
15
|
{
|
16
|
-
bodyfont: (options[:script] == "Hans" ? '"
|
17
|
-
headerfont: (options[:script] == "Hans" ? '"
|
16
|
+
bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' : '"Arial",sans-serif'),
|
17
|
+
headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' : '"Arial",sans-serif'),
|
18
18
|
monospacefont: '"Courier New",monospace',
|
19
|
+
normalfontsize: "10.0pt",
|
20
|
+
footnotefontsize: "8.0pt",
|
21
|
+
smallerfontsize: "8.0pt",
|
22
|
+
monospacefontsize: "9.0pt",
|
19
23
|
}
|
20
24
|
end
|
21
25
|
|
@@ -161,6 +165,12 @@ module IsoDoc
|
|
161
165
|
b.replace(b.children)
|
162
166
|
end
|
163
167
|
|
168
|
+
def authority_cleanup(docxml)
|
169
|
+
auth = docxml.at("//div[@id = 'boilerplate-feedback' or @class = 'boilerplate-feedback']")
|
170
|
+
auth&.remove
|
171
|
+
super
|
172
|
+
end
|
173
|
+
|
164
174
|
def make_body1(body, _docxml)
|
165
175
|
end
|
166
176
|
|
@@ -2,14 +2,6 @@ require "metanorma/processor"
|
|
2
2
|
|
3
3
|
module Metanorma
|
4
4
|
module Iec
|
5
|
-
def self.fonts_used
|
6
|
-
{
|
7
|
-
html: ["Arial", "Times New Roman", "HanSans", "Courier New"],
|
8
|
-
doc: ["Arial", "Times New Roman", "HanSans", "Courier New"],
|
9
|
-
pdf: ["Arial", "Times New Roman", "HanSans", "Courier New"],
|
10
|
-
}
|
11
|
-
end
|
12
|
-
|
13
5
|
class Processor < Metanorma::Processor
|
14
6
|
|
15
7
|
def initialize
|
@@ -26,6 +18,17 @@ module Metanorma
|
|
26
18
|
)
|
27
19
|
end
|
28
20
|
|
21
|
+
def fonts_manifest
|
22
|
+
{
|
23
|
+
"Arial" => nil,
|
24
|
+
"Times New Roman" => nil,
|
25
|
+
"STIX Two Math" => nil,
|
26
|
+
"Source Han Sans" => nil,
|
27
|
+
"Courier" => nil,
|
28
|
+
"Courier New" => nil,
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
29
32
|
def version
|
30
33
|
"Metanorma::Iec #{Metanorma::Iec::VERSION}"
|
31
34
|
end
|
data/metanorma-iec.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.summary = "metanorma-iec lets you write IEC standards "\
|
14
14
|
"in AsciiDoc."
|
15
15
|
spec.description = <<~DESCRIPTION
|
16
|
-
metanorma-
|
16
|
+
metanorma-iec lets you write IEC standards in AsciiDoc syntax.
|
17
17
|
|
18
18
|
This gem is in active development.
|
19
19
|
DESCRIPTION
|
@@ -28,8 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
29
29
|
|
30
30
|
spec.add_dependency "ruby-jing"
|
31
|
-
spec.add_dependency "
|
32
|
-
spec.add_dependency "metanorma-iso", "~> 1.5.10"
|
31
|
+
spec.add_dependency "metanorma-iso", "~> 1.7.0"
|
33
32
|
|
34
33
|
spec.add_development_dependency "byebug"
|
35
34
|
spec.add_development_dependency "sassc", "2.4.0"
|
@@ -2,6 +2,11 @@ require "spec_helper"
|
|
2
2
|
require "fileutils"
|
3
3
|
|
4
4
|
RSpec.describe Asciidoctor::Iec do
|
5
|
+
before(:all) do
|
6
|
+
@blank_hdr = blank_hdr_gen
|
7
|
+
end
|
8
|
+
|
9
|
+
|
5
10
|
it "has a version number" do
|
6
11
|
expect(Metanorma::Iec::VERSION).not_to be nil
|
7
12
|
end
|
@@ -21,7 +26,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
21
26
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
22
27
|
#{ASCIIDOC_BLANK_HDR}
|
23
28
|
INPUT
|
24
|
-
#{
|
29
|
+
#{@blank_hdr}
|
25
30
|
<sections/>
|
26
31
|
</iec-standard>
|
27
32
|
OUTPUT
|
@@ -38,7 +43,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
38
43
|
:novalid:
|
39
44
|
:no-isobib:
|
40
45
|
INPUT
|
41
|
-
#{
|
46
|
+
#{@blank_hdr}
|
42
47
|
<sections/>
|
43
48
|
</iec-standard>
|
44
49
|
OUTPUT
|
@@ -91,6 +96,12 @@ RSpec.describe Asciidoctor::Iec do
|
|
91
96
|
:title-main-fr: Titre Principal
|
92
97
|
:title-part-fr: Part du Titre
|
93
98
|
:library-ics: 1,2,3
|
99
|
+
:accessibility-color-inside: true
|
100
|
+
:price-code: XC
|
101
|
+
:cen-processing: true
|
102
|
+
:secretary: Fred Nerk
|
103
|
+
:interest-to-committees: TC 6121, SC 12
|
104
|
+
:obsoletes: ABC; DEF
|
94
105
|
INPUT
|
95
106
|
<?xml version="1.0" encoding="UTF-8"?>
|
96
107
|
<iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
|
@@ -140,8 +151,21 @@ RSpec.describe Asciidoctor::Iec do
|
|
140
151
|
</organization>
|
141
152
|
</owner>
|
142
153
|
</copyright>
|
154
|
+
<relation type='obsoletes'>
|
155
|
+
<bibitem>
|
156
|
+
<title>--</title>
|
157
|
+
<docidentifier>ABC</docidentifier>
|
158
|
+
</bibitem>
|
159
|
+
</relation>
|
160
|
+
<relation type='obsoletes'>
|
161
|
+
<bibitem>
|
162
|
+
<title>--</title>
|
163
|
+
<docidentifier>DEF</docidentifier>
|
164
|
+
</bibitem>
|
165
|
+
</relation>
|
143
166
|
<ext>
|
144
167
|
<doctype>article</doctype>
|
168
|
+
<horizontal>false</horizontal>
|
145
169
|
<editorialgroup>
|
146
170
|
<technical-committee number="1" type="A">TC</technical-committee>
|
147
171
|
<technical-committee number="11" type="A1">TC1</technical-committee>
|
@@ -164,9 +188,144 @@ RSpec.describe Asciidoctor::Iec do
|
|
164
188
|
<project-number part="1">IEC 1000</project-number>
|
165
189
|
</structuredidentifier>
|
166
190
|
<stagename>New work item proposal</stagename>
|
191
|
+
<accessibility-color-inside>true</accessibility-color-inside>
|
192
|
+
<price-code>XC</price-code>
|
193
|
+
<cen-processing>true</cen-processing>
|
194
|
+
<secretary>Fred Nerk</secretary>
|
195
|
+
<interest-to-committees>TC 6121, SC 12</interest-to-committees>
|
167
196
|
</ext>
|
168
197
|
</bibdata>
|
169
|
-
|
198
|
+
<boilerplate>
|
199
|
+
<copyright-statement>
|
200
|
+
<clause>
|
201
|
+
<p id='_'>
|
202
|
+
<strong>Copyright © #{Time.now.year} International Electrotechnical Commission, IEC.</strong>
|
203
|
+
All rights reserved. It is permitted to download this electronic
|
204
|
+
file, to make a copy and to print out the content for the sole purpose
|
205
|
+
of preparing National Committee positions. You may not copy or
|
206
|
+
“mirror” the file or printed version of the document, or any part of
|
207
|
+
it, for any other purpose without permission in writing from IEC.
|
208
|
+
</p>
|
209
|
+
</clause>
|
210
|
+
</copyright-statement>
|
211
|
+
<legal-statement>
|
212
|
+
<clause>
|
213
|
+
<ol id='_'>
|
214
|
+
<li>
|
215
|
+
<p id='_'>
|
216
|
+
The International Electrotechnical Commission (IEC) is a worldwide
|
217
|
+
organization for standardization comprising all national
|
218
|
+
electrotechnical committees (IEC National Committees). The object
|
219
|
+
of IEC is to promote international co-operation on all questions
|
220
|
+
concerning standardization in the electrical and electronic
|
221
|
+
fields. To this end and in addition to other activities, IEC
|
222
|
+
publishes International Standards, Technical Specifications,
|
223
|
+
Technical Reports, Publicly Available Specifications (PAS) and
|
224
|
+
Guides (hereafter referred to as “IEC Publication(s)”). Their
|
225
|
+
preparation is entrusted to technical committees; any IEC National
|
226
|
+
Committee interested in the subject dealt with may participate in
|
227
|
+
this preparatory work. International, governmental and
|
228
|
+
non-governmental organizations liaising with the IEC also
|
229
|
+
participate in this preparation. IEC collaborates closely with the
|
230
|
+
International Organization for Standardization (ISO) in accordance
|
231
|
+
with conditions determined by agreement between the two
|
232
|
+
organizations.
|
233
|
+
</p>
|
234
|
+
</li>
|
235
|
+
<li>
|
236
|
+
<p id='_'>
|
237
|
+
The formal decisions or agreements of IEC on technical matters
|
238
|
+
express, as nearly as possible, an international consensus of
|
239
|
+
opinion on the relevant subjects since each technical committee
|
240
|
+
has representation from all interested IEC National Committees.
|
241
|
+
</p>
|
242
|
+
</li>
|
243
|
+
<li>
|
244
|
+
<p id='_'>
|
245
|
+
IEC Publications have the form of recommendations for
|
246
|
+
international use and are accepted by IEC National Committees in
|
247
|
+
that sense. While all reasonable efforts are made to ensure that
|
248
|
+
the technical content of IEC Publications is accurate, IEC cannot
|
249
|
+
be held responsible for the way in which they are used or for any
|
250
|
+
misinterpretation by any end user.
|
251
|
+
</p>
|
252
|
+
</li>
|
253
|
+
<li>
|
254
|
+
<p id='_'>
|
255
|
+
In order to promote international uniformity, IEC National
|
256
|
+
Committees undertake to apply IEC Publications transparently to
|
257
|
+
the maximum extent possible in their national and regional
|
258
|
+
publications. Any divergence between any IEC Publication and the
|
259
|
+
corresponding national or regional publication shall be clearly
|
260
|
+
indicated in the latter.
|
261
|
+
</p>
|
262
|
+
</li>
|
263
|
+
<li>
|
264
|
+
<p id='_'>
|
265
|
+
IEC itself does not provide any attestation of conformity.
|
266
|
+
Independent certification bodies provide conformity assessment
|
267
|
+
services and, in some areas, access to IEC marks of conformity.
|
268
|
+
IEC is not responsible for any services carried out by independent
|
269
|
+
certification bodies.
|
270
|
+
</p>
|
271
|
+
</li>
|
272
|
+
<li>
|
273
|
+
<p id='_'>All users should ensure that they have the latest edition of this publication.</p>
|
274
|
+
</li>
|
275
|
+
<li>
|
276
|
+
<p id='_'>
|
277
|
+
No liability shall attach to IEC or its directors, employees,
|
278
|
+
servants or agents including individual experts and members of its
|
279
|
+
technical committees and IEC National Committees for any personal
|
280
|
+
injury, property damage or other damage of any nature whatsoever,
|
281
|
+
whether direct or indirect, or for costs (including legal fees)
|
282
|
+
and expenses arising out of the publication, use of, or reliance
|
283
|
+
upon, this IEC Publication or any other IEC Publications.
|
284
|
+
</p>
|
285
|
+
</li>
|
286
|
+
<li>
|
287
|
+
<p id='_'>
|
288
|
+
Attention is drawn to the Normative references cited in this
|
289
|
+
publication. Use of the referenced publications is indispensable
|
290
|
+
for the correct application of this publication.
|
291
|
+
</p>
|
292
|
+
</li>
|
293
|
+
<li>
|
294
|
+
<p id='_'>
|
295
|
+
Attention is drawn to the possibility that some of the elements of
|
296
|
+
this IEC Publication may be the subject of patent rights. IEC
|
297
|
+
shall not be held responsible for identifying any or all such
|
298
|
+
patent rights.
|
299
|
+
</p>
|
300
|
+
</li>
|
301
|
+
</ol>
|
302
|
+
</clause>
|
303
|
+
</legal-statement>
|
304
|
+
<license-statement>
|
305
|
+
<clause>
|
306
|
+
<p id='_'>
|
307
|
+
This document is still under study and subject to change. It should
|
308
|
+
not be used for reference purposes.
|
309
|
+
</p>
|
310
|
+
until published as such.
|
311
|
+
<p id='_'>
|
312
|
+
Recipients of this document are invited to submit, with their
|
313
|
+
comments, notification of any relevant patent rights of which they are
|
314
|
+
aware and to provide supporting documentation.
|
315
|
+
</p>
|
316
|
+
</clause>
|
317
|
+
</license-statement>
|
318
|
+
<feedback-statement>
|
319
|
+
<clause id='boilerplate-cenelec-attention'>
|
320
|
+
<title>Attention IEC-CENELEC parallel voting</title>
|
321
|
+
<p id='_'>
|
322
|
+
The attention of IEC National Committees, members of CENELEC, is drawn
|
323
|
+
to the fact that this (NWIP) is submitted for parallel voting.
|
324
|
+
</p>
|
325
|
+
<p id='_'>The CENELEC members are invited to vote through the CENELEC voting system.</p>
|
326
|
+
</clause>
|
327
|
+
</feedback-statement>
|
328
|
+
</boilerplate>
|
170
329
|
<sections/>
|
171
330
|
</iec-standard>
|
172
331
|
OUTPUT
|
@@ -186,10 +345,12 @@ RSpec.describe Asciidoctor::Iec do
|
|
186
345
|
:tc-docnumber: 2000
|
187
346
|
:language: el
|
188
347
|
:script: Grek
|
189
|
-
:publisher: IEC
|
348
|
+
:publisher: IEC;IETF;ISO
|
190
349
|
:copyright-year: 2001
|
191
350
|
:docstage: A2CD
|
192
351
|
:doctype: technical-specification
|
352
|
+
:function: emc
|
353
|
+
:horizontal: true
|
193
354
|
INPUT
|
194
355
|
<?xml version="1.0" encoding="UTF-8"?>
|
195
356
|
<iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
|
@@ -272,6 +433,8 @@ RSpec.describe Asciidoctor::Iec do
|
|
272
433
|
</copyright>
|
273
434
|
<ext>
|
274
435
|
<doctype>technical-specification</doctype>
|
436
|
+
<horizontal>true</horizontal>
|
437
|
+
<function>emc</function>
|
275
438
|
<editorialgroup>
|
276
439
|
<technical-committee/>
|
277
440
|
<subcommittee/>
|
@@ -283,7 +446,138 @@ RSpec.describe Asciidoctor::Iec do
|
|
283
446
|
<stagename>Committee draft</stagename>
|
284
447
|
</ext>
|
285
448
|
</bibdata>
|
286
|
-
|
449
|
+
<boilerplate>
|
450
|
+
<copyright-statement>
|
451
|
+
<clause>
|
452
|
+
<p id='_'>
|
453
|
+
<strong>Copyright © 2001 International Electrotechnical Commission, IEC.</strong>
|
454
|
+
All rights reserved. It is permitted to download this electronic
|
455
|
+
file, to make a copy and to print out the content for the sole purpose
|
456
|
+
of preparing National Committee positions. You may not copy or
|
457
|
+
“mirror” the file or printed version of the document, or any part of
|
458
|
+
it, for any other purpose without permission in writing from IEC.
|
459
|
+
</p>
|
460
|
+
</clause>
|
461
|
+
</copyright-statement>
|
462
|
+
<legal-statement>
|
463
|
+
<clause>
|
464
|
+
<ol id='_'>
|
465
|
+
<li>
|
466
|
+
<p id='_'>
|
467
|
+
The International Electrotechnical Commission (IEC) is a worldwide
|
468
|
+
organization for standardization comprising all national
|
469
|
+
electrotechnical committees (IEC National Committees). The object
|
470
|
+
of IEC is to promote international co-operation on all questions
|
471
|
+
concerning standardization in the electrical and electronic
|
472
|
+
fields. To this end and in addition to other activities, IEC
|
473
|
+
publishes International Standards, Technical Specifications,
|
474
|
+
Technical Reports, Publicly Available Specifications (PAS) and
|
475
|
+
Guides (hereafter referred to as “IEC Publication(s)”). Their
|
476
|
+
preparation is entrusted to technical committees; any IEC National
|
477
|
+
Committee interested in the subject dealt with may participate in
|
478
|
+
this preparatory work. International, governmental and
|
479
|
+
non-governmental organizations liaising with the IEC also
|
480
|
+
participate in this preparation. IEC collaborates closely with the
|
481
|
+
International Organization for Standardization (ISO) in accordance
|
482
|
+
with conditions determined by agreement between the two
|
483
|
+
organizations.
|
484
|
+
</p>
|
485
|
+
</li>
|
486
|
+
<li>
|
487
|
+
<p id='_'>
|
488
|
+
The formal decisions or agreements of IEC on technical matters
|
489
|
+
express, as nearly as possible, an international consensus of
|
490
|
+
opinion on the relevant subjects since each technical committee
|
491
|
+
has representation from all interested IEC National Committees.
|
492
|
+
</p>
|
493
|
+
</li>
|
494
|
+
<li>
|
495
|
+
<p id='_'>
|
496
|
+
IEC Publications have the form of recommendations for
|
497
|
+
international use and are accepted by IEC National Committees in
|
498
|
+
that sense. While all reasonable efforts are made to ensure that
|
499
|
+
the technical content of IEC Publications is accurate, IEC cannot
|
500
|
+
be held responsible for the way in which they are used or for any
|
501
|
+
misinterpretation by any end user.
|
502
|
+
</p>
|
503
|
+
</li>
|
504
|
+
<li>
|
505
|
+
<p id='_'>
|
506
|
+
In order to promote international uniformity, IEC National
|
507
|
+
Committees undertake to apply IEC Publications transparently to
|
508
|
+
the maximum extent possible in their national and regional
|
509
|
+
publications. Any divergence between any IEC Publication and the
|
510
|
+
corresponding national or regional publication shall be clearly
|
511
|
+
indicated in the latter.
|
512
|
+
</p>
|
513
|
+
</li>
|
514
|
+
<li>
|
515
|
+
<p id='_'>
|
516
|
+
IEC itself does not provide any attestation of conformity.
|
517
|
+
Independent certification bodies provide conformity assessment
|
518
|
+
services and, in some areas, access to IEC marks of conformity.
|
519
|
+
IEC is not responsible for any services carried out by independent
|
520
|
+
certification bodies.
|
521
|
+
</p>
|
522
|
+
</li>
|
523
|
+
<li>
|
524
|
+
<p id='_'>All users should ensure that they have the latest edition of this publication.</p>
|
525
|
+
</li>
|
526
|
+
<li>
|
527
|
+
<p id='_'>
|
528
|
+
No liability shall attach to IEC or its directors, employees,
|
529
|
+
servants or agents including individual experts and members of its
|
530
|
+
technical committees and IEC National Committees for any personal
|
531
|
+
injury, property damage or other damage of any nature whatsoever,
|
532
|
+
whether direct or indirect, or for costs (including legal fees)
|
533
|
+
and expenses arising out of the publication, use of, or reliance
|
534
|
+
upon, this IEC Publication or any other IEC Publications.
|
535
|
+
</p>
|
536
|
+
</li>
|
537
|
+
<li>
|
538
|
+
<p id='_'>
|
539
|
+
Attention is drawn to the Normative references cited in this
|
540
|
+
publication. Use of the referenced publications is indispensable
|
541
|
+
for the correct application of this publication.
|
542
|
+
</p>
|
543
|
+
</li>
|
544
|
+
<li>
|
545
|
+
<p id='_'>
|
546
|
+
Attention is drawn to the possibility that some of the elements of
|
547
|
+
this IEC Publication may be the subject of patent rights. IEC
|
548
|
+
shall not be held responsible for identifying any or all such
|
549
|
+
patent rights.
|
550
|
+
</p>
|
551
|
+
</li>
|
552
|
+
</ol>
|
553
|
+
</clause>
|
554
|
+
</legal-statement>
|
555
|
+
<license-statement>
|
556
|
+
<clause>
|
557
|
+
<p id='_'>
|
558
|
+
This document is still under study and subject to change. It should
|
559
|
+
not be used for reference purposes.
|
560
|
+
</p>
|
561
|
+
until published as such.
|
562
|
+
<p id='_'>
|
563
|
+
Recipients of this document are invited to submit, with their
|
564
|
+
comments, notification of any relevant patent rights of which they are
|
565
|
+
aware and to provide supporting documentation.
|
566
|
+
</p>
|
567
|
+
</clause>
|
568
|
+
</license-statement>
|
569
|
+
<feedback-statement>
|
570
|
+
<clause id='boilerplate-cenelec-attention'>
|
571
|
+
<title>Attention IEC-CENELEC parallel voting</title>
|
572
|
+
<p id='_'>
|
573
|
+
The attention of IEC National Committees, members of CENELEC, is drawn
|
574
|
+
to the fact that this Committee Draft (CD) is submitted for parallel
|
575
|
+
voting.
|
576
|
+
</p>
|
577
|
+
<p id='_'>The CENELEC members are invited to vote through the CENELEC voting system.</p>
|
578
|
+
</clause>
|
579
|
+
</feedback-statement>
|
580
|
+
</boilerplate>
|
287
581
|
<sections/>
|
288
582
|
</iec-standard>
|
289
583
|
OUTPUT
|
@@ -376,6 +670,7 @@ RSpec.describe Asciidoctor::Iec do
|
|
376
670
|
</copyright>
|
377
671
|
<ext>
|
378
672
|
<doctype>article</doctype>
|
673
|
+
<horizontal>false</horizontal>
|
379
674
|
<editorialgroup>
|
380
675
|
<technical-committee/>
|
381
676
|
<subcommittee/>
|
@@ -387,7 +682,144 @@ RSpec.describe Asciidoctor::Iec do
|
|
387
682
|
<stagename>Final draft international standard</stagename>
|
388
683
|
</ext>
|
389
684
|
</bibdata>
|
390
|
-
|
685
|
+
<boilerplate>
|
686
|
+
<copyright-statement>
|
687
|
+
<clause>
|
688
|
+
<p id='_'>
|
689
|
+
<strong>Copyright © #{Time.now.year} International Electrotechnical Commission, IEC.</strong>
|
690
|
+
All rights reserved. It is permitted to download this electronic
|
691
|
+
file, to make a copy and to print out the content for the sole purpose
|
692
|
+
of preparing National Committee positions. You may not copy or
|
693
|
+
“mirror” the file or printed version of the document, or any part of
|
694
|
+
it, for any other purpose without permission in writing from IEC.
|
695
|
+
</p>
|
696
|
+
</clause>
|
697
|
+
</copyright-statement>
|
698
|
+
<legal-statement>
|
699
|
+
<clause>
|
700
|
+
<ol id='_'>
|
701
|
+
<li>
|
702
|
+
<p id='_'>
|
703
|
+
The International Electrotechnical Commission (IEC) is a worldwide
|
704
|
+
organization for standardization comprising all national
|
705
|
+
electrotechnical committees (IEC National Committees). The object
|
706
|
+
of IEC is to promote international co-operation on all questions
|
707
|
+
concerning standardization in the electrical and electronic
|
708
|
+
fields. To this end and in addition to other activities, IEC
|
709
|
+
publishes International Standards, Technical Specifications,
|
710
|
+
Technical Reports, Publicly Available Specifications (PAS) and
|
711
|
+
Guides (hereafter referred to as “IEC Publication(s)”). Their
|
712
|
+
preparation is entrusted to technical committees; any IEC National
|
713
|
+
Committee interested in the subject dealt with may participate in
|
714
|
+
this preparatory work. International, governmental and
|
715
|
+
non-governmental organizations liaising with the IEC also
|
716
|
+
participate in this preparation. IEC collaborates closely with the
|
717
|
+
International Organization for Standardization (ISO) in accordance
|
718
|
+
with conditions determined by agreement between the two
|
719
|
+
organizations.
|
720
|
+
</p>
|
721
|
+
</li>
|
722
|
+
<li>
|
723
|
+
<p id='_'>
|
724
|
+
The formal decisions or agreements of IEC on technical matters
|
725
|
+
express, as nearly as possible, an international consensus of
|
726
|
+
opinion on the relevant subjects since each technical committee
|
727
|
+
has representation from all interested IEC National Committees.
|
728
|
+
</p>
|
729
|
+
</li>
|
730
|
+
<li>
|
731
|
+
<p id='_'>
|
732
|
+
IEC Publications have the form of recommendations for
|
733
|
+
international use and are accepted by IEC National Committees in
|
734
|
+
that sense. While all reasonable efforts are made to ensure that
|
735
|
+
the technical content of IEC Publications is accurate, IEC cannot
|
736
|
+
be held responsible for the way in which they are used or for any
|
737
|
+
misinterpretation by any end user.
|
738
|
+
</p>
|
739
|
+
</li>
|
740
|
+
<li>
|
741
|
+
<p id='_'>
|
742
|
+
In order to promote international uniformity, IEC National
|
743
|
+
Committees undertake to apply IEC Publications transparently to
|
744
|
+
the maximum extent possible in their national and regional
|
745
|
+
publications. Any divergence between any IEC Publication and the
|
746
|
+
corresponding national or regional publication shall be clearly
|
747
|
+
indicated in the latter.
|
748
|
+
</p>
|
749
|
+
</li>
|
750
|
+
<li>
|
751
|
+
<p id='_'>
|
752
|
+
IEC itself does not provide any attestation of conformity.
|
753
|
+
Independent certification bodies provide conformity assessment
|
754
|
+
services and, in some areas, access to IEC marks of conformity.
|
755
|
+
IEC is not responsible for any services carried out by independent
|
756
|
+
certification bodies.
|
757
|
+
</p>
|
758
|
+
</li>
|
759
|
+
<li>
|
760
|
+
<p id='_'>All users should ensure that they have the latest edition of this publication.</p>
|
761
|
+
</li>
|
762
|
+
<li>
|
763
|
+
<p id='_'>
|
764
|
+
No liability shall attach to IEC or its directors, employees,
|
765
|
+
servants or agents including individual experts and members of its
|
766
|
+
technical committees and IEC National Committees for any personal
|
767
|
+
injury, property damage or other damage of any nature whatsoever,
|
768
|
+
whether direct or indirect, or for costs (including legal fees)
|
769
|
+
and expenses arising out of the publication, use of, or reliance
|
770
|
+
upon, this IEC Publication or any other IEC Publications.
|
771
|
+
</p>
|
772
|
+
</li>
|
773
|
+
<li>
|
774
|
+
<p id='_'>
|
775
|
+
Attention is drawn to the Normative references cited in this
|
776
|
+
publication. Use of the referenced publications is indispensable
|
777
|
+
for the correct application of this publication.
|
778
|
+
</p>
|
779
|
+
</li>
|
780
|
+
<li>
|
781
|
+
<p id='_'>
|
782
|
+
Attention is drawn to the possibility that some of the elements of
|
783
|
+
this IEC Publication may be the subject of patent rights. IEC
|
784
|
+
shall not be held responsible for identifying any or all such
|
785
|
+
patent rights.
|
786
|
+
</p>
|
787
|
+
</li>
|
788
|
+
</ol>
|
789
|
+
</clause>
|
790
|
+
</legal-statement>
|
791
|
+
<license-statement>
|
792
|
+
<clause>
|
793
|
+
<p id='_'>
|
794
|
+
This document is a draft distributed for approval. It may not be
|
795
|
+
referred to as an International Standard until published as such.
|
796
|
+
</p>
|
797
|
+
<p id='_'>
|
798
|
+
In addition to their evaluation as being acceptable for industrial,
|
799
|
+
technological, commercial and user purposes, Final Draft International
|
800
|
+
Standards may on occasion have to be considered in the light of their
|
801
|
+
potential to become standards to which reference may be made in
|
802
|
+
national regulations.
|
803
|
+
</p>
|
804
|
+
<p id='_'>
|
805
|
+
Recipients of this document are invited to submit, with their
|
806
|
+
comments, notification of any relevant patent rights of which they are
|
807
|
+
aware and to provide supporting documentation.
|
808
|
+
</p>
|
809
|
+
</clause>
|
810
|
+
</license-statement>
|
811
|
+
<feedback-statement>
|
812
|
+
<clause id='boilerplate-cenelec-attention'>
|
813
|
+
<title>Attention IEC-CENELEC parallel voting</title>
|
814
|
+
<p id='_'>
|
815
|
+
The attention of IEC National Committees, members of CENELEC, is drawn
|
816
|
+
to the fact that this Final Draft International Standard (FDIS) is
|
817
|
+
submitted for parallel voting.
|
818
|
+
</p>
|
819
|
+
<p id='_'>The CENELEC members are invited to vote through the CENELEC voting system.</p>
|
820
|
+
</clause>
|
821
|
+
</feedback-statement>
|
822
|
+
</boilerplate>
|
391
823
|
<sections/>
|
392
824
|
</iec-standard>
|
393
825
|
OUTPUT
|
@@ -440,6 +872,7 @@ OUTPUT
|
|
440
872
|
</copyright>
|
441
873
|
<ext>
|
442
874
|
<doctype>article</doctype>
|
875
|
+
<horizontal>false</horizontal>
|
443
876
|
<editorialgroup>
|
444
877
|
<technical-committee/>
|
445
878
|
<subcommittee/>
|
@@ -451,7 +884,7 @@ OUTPUT
|
|
451
884
|
<stagename>International standard</stagename>
|
452
885
|
</ext>
|
453
886
|
</bibdata>
|
454
|
-
#{
|
887
|
+
#{boilerplate(Nokogiri::XML(BLANK_HDR + "</iec-standard>"))}
|
455
888
|
<sections/>
|
456
889
|
</iec-standard>
|
457
890
|
OUTPUT
|
@@ -505,6 +938,7 @@ OUTPUT
|
|
505
938
|
</copyright>
|
506
939
|
<ext>
|
507
940
|
<doctype>article</doctype>
|
941
|
+
<horizontal>false</horizontal>
|
508
942
|
<editorialgroup>
|
509
943
|
<technical-committee/>
|
510
944
|
<subcommittee/>
|
@@ -516,7 +950,7 @@ OUTPUT
|
|
516
950
|
<stagename>International standard</stagename>
|
517
951
|
</ext>
|
518
952
|
</bibdata>
|
519
|
-
#{
|
953
|
+
#{boilerplate(Nokogiri::XML(BLANK_HDR + "</iec-standard>"))}
|
520
954
|
<sections/>
|
521
955
|
</iec-standard>
|
522
956
|
OUTPUT
|
@@ -566,8 +1000,8 @@ OUTPUT
|
|
566
1000
|
INPUT
|
567
1001
|
html = File.read("test.html", encoding: "utf-8")
|
568
1002
|
expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
|
569
|
-
expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "
|
570
|
-
expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "
|
1003
|
+
expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Source Han Sans", serif;]m)
|
1004
|
+
expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Source Han Sans", sans-serif;]m)
|
571
1005
|
end
|
572
1006
|
|
573
1007
|
it "uses specified fonts" do
|