metanorma-ieee 1.4.1 → 1.4.3
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/lib/html2doc/ieee/notes.rb +5 -4
- data/lib/isodoc/ieee/html/htmlstyle.css +7 -0
- data/lib/isodoc/ieee/ieee.amendment.xsl +622 -255
- data/lib/isodoc/ieee/ieee.standard.xsl +622 -255
- data/lib/isodoc/ieee/presentation_ref.rb +14 -7
- data/lib/isodoc/ieee/word_convert.rb +21 -15
- data/lib/isodoc/ieee/word_wp_convert.rb +2 -2
- data/lib/metanorma/ieee/basicdoc.rng +71 -59
- data/lib/metanorma/ieee/converter.rb +3 -2
- data/lib/metanorma/ieee/isodoc.rng +60 -18
- data/lib/metanorma/ieee/version.rb +1 -1
- metadata +2 -2
@@ -45,18 +45,25 @@ module IsoDoc
|
|
45
45
|
super
|
46
46
|
end
|
47
47
|
|
48
|
-
KEEP_BIBRENDER_XPATH =
|
49
|
-
"./docidentifier | ./uri | ./note | ./title | ./biblio-tag".freeze
|
50
|
-
|
51
48
|
def bibrender_relaton(xml, renderings)
|
52
|
-
|
53
|
-
fn = availability_note(xml)
|
54
|
-
f &&= "<formattedref>#{f}#{fn}</formattedref>"
|
55
|
-
xml.children = "#{f}#{xml.xpath(ns(KEEP_BIBRENDER_XPATH)).to_xml}"
|
49
|
+
bibrender_relaton1(xml, renderings)
|
56
50
|
author_date(xml, renderings)
|
57
51
|
@author[xml["id"]] = renderings[xml["id"]][:author]
|
58
52
|
end
|
59
53
|
|
54
|
+
def bibrender_relaton1(xml, renderings)
|
55
|
+
f = renderings[xml["id"]][:formattedref] or return
|
56
|
+
fn = availability_note(xml)
|
57
|
+
f = "<formattedref>#{f}#{fn}</formattedref>"
|
58
|
+
if x = xml.at(ns("./formattedref"))
|
59
|
+
x.replace(f)
|
60
|
+
elsif xml.children.empty?
|
61
|
+
xml << f
|
62
|
+
else
|
63
|
+
xml.children.first.previous = f
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
60
67
|
def author_date(xml, renderings)
|
61
68
|
author_date?(xml) or return
|
62
69
|
cit = renderings[xml["id"]][:citation]
|
@@ -86,8 +86,8 @@ module IsoDoc
|
|
86
86
|
section_break(body, continuous: true)
|
87
87
|
body.div class: "WordSectionMain" do |div3|
|
88
88
|
content(div3, docxml, ns(self.class::MAIN_ELEMENTS))
|
89
|
-
footnotes div3
|
90
|
-
comments div3
|
89
|
+
footnotes docxml, div3
|
90
|
+
comments docxml, div3
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
@@ -202,29 +202,35 @@ module IsoDoc
|
|
202
202
|
end
|
203
203
|
end
|
204
204
|
|
205
|
-
# Figure 1— remove each of these
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
205
|
+
# "Figure 1—" remove each of these: strip elements in caption associated
|
206
|
+
# with autonumbering -- # but not in footnotes. The autonumber captions
|
207
|
+
# are provided by Word styles instead
|
208
|
+
def strip_caption_semx(name)
|
209
|
+
name.xpath(".//xmlns:semx[@element = 'autonum']/"\
|
210
|
+
"preceding-sibling::*[normalize-space() = '']").each do |s|
|
211
|
+
s.ancestors("fn").empty? and s.remove
|
212
|
+
end
|
210
213
|
name.xpath(ns(".//span[@class = 'fmt-element-name'] | "\
|
211
214
|
".//span[@class = 'fmt-caption-delim'] | "\
|
212
|
-
".//semx[@element = 'autonum']")).each
|
215
|
+
".//semx[@element = 'autonum']")).each do |s|
|
216
|
+
s.ancestors("fn").empty? and s.remove
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
def figure_name_parse(_node, div, name)
|
221
|
+
name.nil? and return
|
222
|
+
strip_caption_semx(name)
|
213
223
|
super
|
214
224
|
end
|
215
225
|
|
216
226
|
def table_title_parse(node, out)
|
217
227
|
name = node.at(ns("./fmt-name")) or return
|
218
|
-
name
|
219
|
-
"preceding-sibling::*[normalize-space() = '']")&.remove
|
220
|
-
name.xpath(ns(".//span[@class = 'fmt-element-name'] | "\
|
221
|
-
".//span[@class = 'fmt-caption-delim'] | "\
|
222
|
-
".//semx[@element = 'autonum']")).each(&:remove)
|
228
|
+
strip_caption_semx(name)
|
223
229
|
super
|
224
230
|
end
|
225
231
|
|
226
232
|
include BaseConvert
|
227
233
|
include Init
|
228
|
-
|
229
|
-
|
234
|
+
end
|
235
|
+
end
|
230
236
|
end
|
@@ -382,33 +382,7 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
382
382
|
<a:documentation>Block intended to capture reviewer comments about some text in the document</a:documentation>
|
383
383
|
<element name="review">
|
384
384
|
<ref name="RequiredId"/>
|
385
|
-
<
|
386
|
-
<a:documentation>The party who has offered the comment</a:documentation>
|
387
|
-
</attribute>
|
388
|
-
<optional>
|
389
|
-
<attribute name="type">
|
390
|
-
<a:documentation>The type of reviewer comment</a:documentation>
|
391
|
-
</attribute>
|
392
|
-
</optional>
|
393
|
-
<optional>
|
394
|
-
<attribute name="date">
|
395
|
-
<a:documentation>The date when the comment was made</a:documentation>
|
396
|
-
<data type="dateTime"/>
|
397
|
-
</attribute>
|
398
|
-
</optional>
|
399
|
-
<optional>
|
400
|
-
<attribute name="from">
|
401
|
-
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
402
|
-
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
403
|
-
<data type="IDREF"/>
|
404
|
-
</attribute>
|
405
|
-
</optional>
|
406
|
-
<optional>
|
407
|
-
<attribute name="to">
|
408
|
-
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
409
|
-
<data type="IDREF"/>
|
410
|
-
</attribute>
|
411
|
-
</optional>
|
385
|
+
<ref name="ReviewAttributes"/>
|
412
386
|
<oneOrMore>
|
413
387
|
<ref name="paragraph">
|
414
388
|
<a:documentation>Reviewer comments content</a:documentation>
|
@@ -416,6 +390,35 @@ If not provided, the comment applies in the vicinity of the place it has been in
|
|
416
390
|
</oneOrMore>
|
417
391
|
</element>
|
418
392
|
</define>
|
393
|
+
<define name="ReviewAttributes">
|
394
|
+
<attribute name="reviewer">
|
395
|
+
<a:documentation>The party who has offered the comment</a:documentation>
|
396
|
+
</attribute>
|
397
|
+
<optional>
|
398
|
+
<attribute name="type">
|
399
|
+
<a:documentation>The type of reviewer comment</a:documentation>
|
400
|
+
</attribute>
|
401
|
+
</optional>
|
402
|
+
<optional>
|
403
|
+
<attribute name="date">
|
404
|
+
<a:documentation>The date when the comment was made</a:documentation>
|
405
|
+
<data type="dateTime"/>
|
406
|
+
</attribute>
|
407
|
+
</optional>
|
408
|
+
<optional>
|
409
|
+
<attribute name="from">
|
410
|
+
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
411
|
+
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
412
|
+
<data type="IDREF"/>
|
413
|
+
</attribute>
|
414
|
+
</optional>
|
415
|
+
<optional>
|
416
|
+
<attribute name="to">
|
417
|
+
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
418
|
+
<data type="IDREF"/>
|
419
|
+
</attribute>
|
420
|
+
</optional>
|
421
|
+
</define>
|
419
422
|
<define name="NumberingAttributes">
|
420
423
|
<optional>
|
421
424
|
<attribute name="unnumbered">
|
@@ -599,17 +602,9 @@ It is included for convenience, in case processing the citation to extract the a
|
|
599
602
|
<a:documentation>The caption of the block</a:documentation>
|
600
603
|
</ref>
|
601
604
|
</optional>
|
602
|
-
<
|
603
|
-
<
|
604
|
-
|
605
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
606
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
607
|
-
</text>
|
608
|
-
<ref name="callout">
|
609
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
610
|
-
</ref>
|
611
|
-
</choice>
|
612
|
-
</oneOrMore>
|
605
|
+
<ref name="sourcecodebody">
|
606
|
+
<a:documentation>The sourcecode content</a:documentation>
|
607
|
+
</ref>
|
613
608
|
<zeroOrMore>
|
614
609
|
<ref name="annotation">
|
615
610
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -628,17 +623,9 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
628
623
|
<a:documentation>The caption of the block</a:documentation>
|
629
624
|
</ref>
|
630
625
|
</optional>
|
631
|
-
<
|
632
|
-
<
|
633
|
-
|
634
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
635
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
636
|
-
</text>
|
637
|
-
<ref name="callout">
|
638
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
639
|
-
</ref>
|
640
|
-
</choice>
|
641
|
-
</oneOrMore>
|
626
|
+
<ref name="sourcecodebody">
|
627
|
+
<a:documentation>The sourcecode content</a:documentation>
|
628
|
+
</ref>
|
642
629
|
<zeroOrMore>
|
643
630
|
<ref name="annotation">
|
644
631
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -651,6 +638,20 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
651
638
|
</ref>
|
652
639
|
</zeroOrMore>
|
653
640
|
</define>
|
641
|
+
<define name="sourcecodebody">
|
642
|
+
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
643
|
+
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
644
|
+
<element name="body">
|
645
|
+
<oneOrMore>
|
646
|
+
<choice>
|
647
|
+
<text/>
|
648
|
+
<ref name="callout">
|
649
|
+
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
650
|
+
</ref>
|
651
|
+
</choice>
|
652
|
+
</oneOrMore>
|
653
|
+
</element>
|
654
|
+
</define>
|
654
655
|
<define name="pre">
|
655
656
|
<a:documentation>Pre-formatted block. Wrapper for text to be rendered with fixed-width typeface, and preserving spaces including line breaks.
|
656
657
|
They are intended for a restricted number of functions, most typically ASCII Art (which is still in prominent use in some
|
@@ -859,6 +860,7 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
859
860
|
<define name="tr">
|
860
861
|
<a:documentation>Sequence of cells to be displayed as a row in a table</a:documentation>
|
861
862
|
<element name="tr">
|
863
|
+
<ref name="TrAttributes"/>
|
862
864
|
<oneOrMore>
|
863
865
|
<choice>
|
864
866
|
<ref name="td">
|
@@ -871,6 +873,9 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
871
873
|
</oneOrMore>
|
872
874
|
</element>
|
873
875
|
</define>
|
876
|
+
<define name="TrAttributes">
|
877
|
+
<empty/>
|
878
|
+
</define>
|
874
879
|
<define name="tr-no-id">
|
875
880
|
<a:documentation>Sequence of cells to be displayed as a row in a table: optional ID attributes recursively (for use in Relaton, metadata)</a:documentation>
|
876
881
|
<element name="tr">
|
@@ -1672,18 +1677,25 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
1672
1677
|
</optional>
|
1673
1678
|
</define>
|
1674
1679
|
<define name="XrefBody">
|
1675
|
-
<
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
+
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
1681
|
+
<optional>
|
1682
|
+
<element name="display-text">
|
1683
|
+
<oneOrMore>
|
1684
|
+
<ref name="PureTextElement"/>
|
1685
|
+
</oneOrMore>
|
1686
|
+
</element>
|
1687
|
+
</optional>
|
1680
1688
|
</define>
|
1681
1689
|
<define name="ErefBody">
|
1682
|
-
<
|
1683
|
-
<
|
1684
|
-
<
|
1685
|
-
|
1686
|
-
|
1690
|
+
<optional>
|
1691
|
+
<element name="display-text">
|
1692
|
+
<oneOrMore>
|
1693
|
+
<ref name="PureTextElement">
|
1694
|
+
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
1695
|
+
</ref>
|
1696
|
+
</oneOrMore>
|
1697
|
+
</element>
|
1698
|
+
</optional>
|
1687
1699
|
</define>
|
1688
1700
|
<define name="fn">
|
1689
1701
|
<a:documentation>Inline reference to a paragraph or paragraphs, appearing as a footnote.
|
@@ -20,8 +20,9 @@ module Metanorma
|
|
20
20
|
@hierarchical_assets = node.attr("hierarchical-object-numbering")
|
21
21
|
end
|
22
22
|
|
23
|
-
PREFACE_CLAUSE_NAMES =
|
24
|
-
|
23
|
+
PREFACE_CLAUSE_NAMES =
|
24
|
+
%w(abstract foreword introduction acknowledgements participants
|
25
|
+
metanorma-extension misc-container).freeze
|
25
26
|
|
26
27
|
def sectiontype_streamline(ret)
|
27
28
|
case ret
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v2.0.
|
20
|
+
<!-- VERSION v2.0.2 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -33,6 +33,15 @@
|
|
33
33
|
</zeroOrMore>
|
34
34
|
</element>
|
35
35
|
</define>
|
36
|
+
<define name="fn" combine="interleave">
|
37
|
+
<optional>
|
38
|
+
<attribute name="hiddenref">
|
39
|
+
<a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
|
40
|
+
This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
|
41
|
+
<data type="boolean"/>
|
42
|
+
</attribute>
|
43
|
+
</optional>
|
44
|
+
</define>
|
36
45
|
<define name="index-primary">
|
37
46
|
<element name="primary">
|
38
47
|
<oneOrMore>
|
@@ -245,23 +254,9 @@
|
|
245
254
|
<a:documentation>The caption of the block</a:documentation>
|
246
255
|
</ref>
|
247
256
|
</optional>
|
248
|
-
<
|
249
|
-
<
|
250
|
-
|
251
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
252
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
253
|
-
</text>
|
254
|
-
<ref name="callout">
|
255
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
256
|
-
</ref>
|
257
|
-
<ref name="xref">
|
258
|
-
<a:documentation>Hyperlink of code segment to another part of the document</a:documentation>
|
259
|
-
</ref>
|
260
|
-
<ref name="eref">
|
261
|
-
<a:documentation>Hyperlink of code segment to external bibliographic resource</a:documentation>
|
262
|
-
</ref>
|
263
|
-
</choice>
|
264
|
-
</oneOrMore>
|
257
|
+
<ref name="sourcecodebody">
|
258
|
+
<a:documentation>The sourcecode content</a:documentation>
|
259
|
+
</ref>
|
265
260
|
<zeroOrMore>
|
266
261
|
<ref name="annotation">
|
267
262
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -277,6 +272,26 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
277
272
|
<a:documentation>A source for the block</a:documentation>
|
278
273
|
</ref>
|
279
274
|
</define>
|
275
|
+
<define name="sourcecodebody">
|
276
|
+
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
277
|
+
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
278
|
+
<element name="body">
|
279
|
+
<oneOrMore>
|
280
|
+
<choice>
|
281
|
+
<text/>
|
282
|
+
<ref name="callout">
|
283
|
+
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
284
|
+
</ref>
|
285
|
+
<ref name="xref">
|
286
|
+
<a:documentation>Hyperlink of code segment to another part of the document</a:documentation>
|
287
|
+
</ref>
|
288
|
+
<ref name="eref">
|
289
|
+
<a:documentation>Hyperlink of code segment to external bibliographic resource</a:documentation>
|
290
|
+
</ref>
|
291
|
+
</choice>
|
292
|
+
</oneOrMore>
|
293
|
+
</element>
|
294
|
+
</define>
|
280
295
|
<define name="sections">
|
281
296
|
<element name="sections">
|
282
297
|
<oneOrMore>
|
@@ -408,6 +423,21 @@ normative or informative references, some split references into sections organiz
|
|
408
423
|
</oneOrMore>
|
409
424
|
</choice>
|
410
425
|
</define>
|
426
|
+
<define name="TdAttributes" combine="interleave">
|
427
|
+
<attribute name="style">
|
428
|
+
<a:documentation>CSS style: only background-color supported</a:documentation>
|
429
|
+
</attribute>
|
430
|
+
</define>
|
431
|
+
<define name="ThAttributes" combine="interleave">
|
432
|
+
<attribute name="style">
|
433
|
+
<a:documentation>CSS style: only background-color supported</a:documentation>
|
434
|
+
</attribute>
|
435
|
+
</define>
|
436
|
+
<define name="TrAttributes">
|
437
|
+
<attribute name="style">
|
438
|
+
<a:documentation>CSS style: only background-color supported</a:documentation>
|
439
|
+
</attribute>
|
440
|
+
</define>
|
411
441
|
<define name="table-note">
|
412
442
|
<element name="note">
|
413
443
|
<ref name="OptionalId"/>
|
@@ -1257,6 +1287,11 @@ numbers</a:documentation>
|
|
1257
1287
|
<a:documentation>Colophon or postface material</a:documentation>
|
1258
1288
|
</ref>
|
1259
1289
|
</optional>
|
1290
|
+
<optional>
|
1291
|
+
<ref name="review-container">
|
1292
|
+
<a:documentation>Annotations to the document</a:documentation>
|
1293
|
+
</ref>
|
1294
|
+
</optional>
|
1260
1295
|
</element>
|
1261
1296
|
</define>
|
1262
1297
|
<define name="misccontainer">
|
@@ -1267,6 +1302,13 @@ numbers</a:documentation>
|
|
1267
1302
|
</oneOrMore>
|
1268
1303
|
</element>
|
1269
1304
|
</define>
|
1305
|
+
<define name="review-container">
|
1306
|
+
<element name="review-container">
|
1307
|
+
<oneOrMore>
|
1308
|
+
<ref name="review"/>
|
1309
|
+
</oneOrMore>
|
1310
|
+
</element>
|
1311
|
+
</define>
|
1270
1312
|
<define name="preface">
|
1271
1313
|
<element name="preface">
|
1272
1314
|
<oneOrMore>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ieee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|