metanorma-ieee 1.0.15 → 1.1.0
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/isodoc/ieee/base_convert.rb +11 -6
- data/lib/isodoc/ieee/html/htmlstyle.css +8 -8
- data/lib/isodoc/ieee/html/htmlstyle.scss +8 -8
- data/lib/isodoc/ieee/html/wordstyle.css +15 -15
- data/lib/isodoc/ieee/html/wordstyle.scss +15 -15
- data/lib/isodoc/ieee/ieee.amendment.xsl +76 -37
- data/lib/isodoc/ieee/ieee.standard.xsl +76 -37
- data/lib/isodoc/ieee/presentation_bibdata.rb +100 -0
- data/lib/isodoc/ieee/presentation_xml_convert.rb +21 -99
- data/lib/isodoc/ieee/word_convert.rb +14 -13
- data/lib/metanorma/ieee/isodoc.rng +26 -4
- data/lib/metanorma/ieee/version.rb +1 -1
- data/metanorma-ieee.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d2fbf6c197a2071d6e49bae6e0b6823b05beb5115c7d01b6e58a1c02c2ce07a
|
4
|
+
data.tar.gz: 4d350e96e0519df1173631de9360794fe339a13a6045467fa7438748d624e1c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b38d012b072d19846919c862a536a4c4e64449bb4c86d84d2f0c606a50425ab591690788cca61079cab673c64addc81605dfd5f704938833abf5206574f9711e
|
7
|
+
data.tar.gz: a0e2cd0841ab556a314b488bf2a85d52fa2738d5cac35ae13368640e2fd4702622cc211f2980080b6af4882a1ac76720fb1e424d8d913f9af58157419dfbb7fd
|
@@ -8,12 +8,17 @@ module IsoDoc
|
|
8
8
|
{ id: node["id"], type: node["type"] }
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
12
|
-
|
13
|
-
|
11
|
+
def top_element_render(elem, out)
|
12
|
+
elem.name == "clause" && elem["type"] == "overview" and
|
13
|
+
return scope(elem, out, 0)
|
14
|
+
super
|
15
|
+
end
|
16
|
+
|
17
|
+
def scope(node, out, num)
|
18
|
+
out.div **attr_code(id: node["id"]) do |div|
|
14
19
|
num = num + 1
|
15
|
-
clause_name(
|
16
|
-
|
20
|
+
clause_name(node, node&.at(ns("./title")), div, nil)
|
21
|
+
node.elements.each do |e|
|
17
22
|
parse(e, div) unless e.name == "title"
|
18
23
|
end
|
19
24
|
end
|
@@ -22,7 +27,7 @@ module IsoDoc
|
|
22
27
|
|
23
28
|
def middle_clause(_docxml = nil)
|
24
29
|
"//clause[parent::sections][not(@type = 'overview')]" \
|
25
|
-
"[not(descendant::terms)]"
|
30
|
+
"[not(descendant::terms)][not(descendant::references)]"
|
26
31
|
end
|
27
32
|
|
28
33
|
def para_attrs(node)
|
@@ -301,10 +301,10 @@ blockquote,
|
|
301
301
|
q {
|
302
302
|
quotes: none; }
|
303
303
|
|
304
|
-
blockquote
|
305
|
-
blockquote
|
306
|
-
q
|
307
|
-
q
|
304
|
+
blockquote::before,
|
305
|
+
blockquote::after,
|
306
|
+
q::before,
|
307
|
+
q::after {
|
308
308
|
content: '';
|
309
309
|
content: none; }
|
310
310
|
|
@@ -455,7 +455,7 @@ h2 p, .h2 p {
|
|
455
455
|
ul > li {
|
456
456
|
list-style: none; }
|
457
457
|
|
458
|
-
ul > li > p:first-child
|
458
|
+
ul > li > p:first-child::before {
|
459
459
|
content: "\2014";
|
460
460
|
display: inline-block;
|
461
461
|
width: 1em;
|
@@ -467,7 +467,7 @@ li p {
|
|
467
467
|
margin-bottom: 0.6em;
|
468
468
|
line-height: 1.2; }
|
469
469
|
|
470
|
-
#toc li
|
470
|
+
#toc li::before {
|
471
471
|
content: " ";
|
472
472
|
display: none; }
|
473
473
|
|
@@ -519,7 +519,7 @@ p.Terms {
|
|
519
519
|
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
520
520
|
padding: 0 1.5em;
|
521
521
|
overflow: visible; } }
|
522
|
-
#toc li
|
522
|
+
#toc li::before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li::before {
|
523
523
|
content: " ";
|
524
524
|
display: none; }
|
525
525
|
|
@@ -994,7 +994,7 @@ ol.footnotes-list p,
|
|
994
994
|
aside.footnote {
|
995
995
|
display: inline; }
|
996
996
|
|
997
|
-
ol > li > p
|
997
|
+
ol > li > p::before {
|
998
998
|
content: "";
|
999
999
|
display: none; }
|
1000
1000
|
|
@@ -38,10 +38,10 @@ q {
|
|
38
38
|
quotes: none;
|
39
39
|
}
|
40
40
|
|
41
|
-
blockquote
|
42
|
-
blockquote
|
43
|
-
q
|
44
|
-
q
|
41
|
+
blockquote::before,
|
42
|
+
blockquote::after,
|
43
|
+
q::before,
|
44
|
+
q::after {
|
45
45
|
content: '';
|
46
46
|
content: none;
|
47
47
|
}
|
@@ -228,7 +228,7 @@ ul>li {
|
|
228
228
|
list-style: none;
|
229
229
|
}
|
230
230
|
|
231
|
-
ul>li>p:first-child
|
231
|
+
ul>li>p:first-child::before {
|
232
232
|
content: "\2014";
|
233
233
|
display: inline-block;
|
234
234
|
width: 1em;
|
@@ -242,7 +242,7 @@ li p {
|
|
242
242
|
line-height: 1.2;
|
243
243
|
}
|
244
244
|
|
245
|
-
#toc li
|
245
|
+
#toc li::before {
|
246
246
|
content: " ";
|
247
247
|
display: none;
|
248
248
|
}
|
@@ -268,7 +268,7 @@ p.Terms {
|
|
268
268
|
// box-shadow: inset -5px 0px 10px -5px #1d1d1d !important;
|
269
269
|
// }
|
270
270
|
|
271
|
-
li
|
271
|
+
li::before {
|
272
272
|
content: " ";
|
273
273
|
display: none;
|
274
274
|
}
|
@@ -655,7 +655,7 @@ aside.footnote {
|
|
655
655
|
display: inline;
|
656
656
|
}
|
657
657
|
|
658
|
-
ol>li>p
|
658
|
+
ol>li>p::before {
|
659
659
|
content: "";
|
660
660
|
display: none;
|
661
661
|
}
|
@@ -5172,7 +5172,7 @@ span.SpellE {
|
|
5172
5172
|
@list l21:level1 {
|
5173
5173
|
mso-level-number-format: bullet;
|
5174
5174
|
mso-level-style-link: "IEEEStds Unordered List Level 2";
|
5175
|
-
mso-level-text:
|
5175
|
+
mso-level-text: ;
|
5176
5176
|
mso-level-tab-stop: none;
|
5177
5177
|
mso-level-number-position: left;
|
5178
5178
|
margin-left: 46.1pt;
|
@@ -5181,25 +5181,25 @@ span.SpellE {
|
|
5181
5181
|
|
5182
5182
|
@list l21:level2 {
|
5183
5183
|
mso-level-number-format: bullet;
|
5184
|
-
mso-level-text:
|
5184
|
+
mso-level-text: ;
|
5185
5185
|
mso-level-tab-stop: none;
|
5186
5186
|
mso-level-number-position: left;
|
5187
5187
|
margin-left: 82.1pt;
|
5188
5188
|
text-indent: -18.0pt;
|
5189
|
-
font-family:
|
5189
|
+
font-family: Symbol; }
|
5190
5190
|
|
5191
5191
|
@list l21:level3 {
|
5192
5192
|
mso-level-number-format: bullet;
|
5193
|
-
mso-level-text:
|
5193
|
+
mso-level-text: ;
|
5194
5194
|
mso-level-tab-stop: none;
|
5195
5195
|
mso-level-number-position: left;
|
5196
5196
|
margin-left: 118.1pt;
|
5197
5197
|
text-indent: -18.0pt;
|
5198
|
-
font-family:
|
5198
|
+
font-family: Symbol; }
|
5199
5199
|
|
5200
5200
|
@list l21:level4 {
|
5201
5201
|
mso-level-number-format: bullet;
|
5202
|
-
mso-level-text:
|
5202
|
+
mso-level-text: ;
|
5203
5203
|
mso-level-tab-stop: none;
|
5204
5204
|
mso-level-number-position: left;
|
5205
5205
|
margin-left: 154.1pt;
|
@@ -5208,25 +5208,25 @@ span.SpellE {
|
|
5208
5208
|
|
5209
5209
|
@list l21:level5 {
|
5210
5210
|
mso-level-number-format: bullet;
|
5211
|
-
mso-level-text:
|
5211
|
+
mso-level-text: ;
|
5212
5212
|
mso-level-tab-stop: none;
|
5213
5213
|
mso-level-number-position: left;
|
5214
5214
|
margin-left: 190.1pt;
|
5215
5215
|
text-indent: -18.0pt;
|
5216
|
-
font-family:
|
5216
|
+
font-family: Symbol; }
|
5217
5217
|
|
5218
5218
|
@list l21:level6 {
|
5219
5219
|
mso-level-number-format: bullet;
|
5220
|
-
mso-level-text:
|
5220
|
+
mso-level-text: ;
|
5221
5221
|
mso-level-tab-stop: none;
|
5222
5222
|
mso-level-number-position: left;
|
5223
5223
|
margin-left: 226.1pt;
|
5224
5224
|
text-indent: -18.0pt;
|
5225
|
-
font-family:
|
5225
|
+
font-family: Symbol; }
|
5226
5226
|
|
5227
5227
|
@list l21:level7 {
|
5228
5228
|
mso-level-number-format: bullet;
|
5229
|
-
mso-level-text:
|
5229
|
+
mso-level-text: ;
|
5230
5230
|
mso-level-tab-stop: none;
|
5231
5231
|
mso-level-number-position: left;
|
5232
5232
|
margin-left: 262.1pt;
|
@@ -5235,21 +5235,21 @@ span.SpellE {
|
|
5235
5235
|
|
5236
5236
|
@list l21:level8 {
|
5237
5237
|
mso-level-number-format: bullet;
|
5238
|
-
mso-level-text:
|
5238
|
+
mso-level-text: ;
|
5239
5239
|
mso-level-tab-stop: none;
|
5240
5240
|
mso-level-number-position: left;
|
5241
5241
|
margin-left: 298.1pt;
|
5242
5242
|
text-indent: -18.0pt;
|
5243
|
-
font-family:
|
5243
|
+
font-family: Symbol; }
|
5244
5244
|
|
5245
5245
|
@list l21:level9 {
|
5246
5246
|
mso-level-number-format: bullet;
|
5247
|
-
mso-level-text:
|
5247
|
+
mso-level-text: ;
|
5248
5248
|
mso-level-tab-stop: none;
|
5249
5249
|
mso-level-number-position: left;
|
5250
5250
|
margin-left: 334.1pt;
|
5251
5251
|
text-indent: -18.0pt;
|
5252
|
-
font-family:
|
5252
|
+
font-family: Symbol; }
|
5253
5253
|
|
5254
5254
|
@list l20:level1 lfo31 {
|
5255
5255
|
mso-level-start-at: 10; }
|
@@ -4912,7 +4912,7 @@ span.SpellE
|
|
4912
4912
|
@list l21:level1
|
4913
4913
|
{mso-level-number-format:bullet;
|
4914
4914
|
mso-level-style-link:"IEEEStds Unordered List Level 2";
|
4915
|
-
mso-level-text
|
4915
|
+
mso-level-text:;
|
4916
4916
|
mso-level-tab-stop:none;
|
4917
4917
|
mso-level-number-position:left;
|
4918
4918
|
margin-left:46.1pt;
|
@@ -4920,23 +4920,23 @@ span.SpellE
|
|
4920
4920
|
font-family:Symbol;}
|
4921
4921
|
@list l21:level2
|
4922
4922
|
{mso-level-number-format:bullet;
|
4923
|
-
mso-level-text
|
4923
|
+
mso-level-text:;
|
4924
4924
|
mso-level-tab-stop:none;
|
4925
4925
|
mso-level-number-position:left;
|
4926
4926
|
margin-left:82.1pt;
|
4927
4927
|
text-indent:-18.0pt;
|
4928
|
-
font-family:
|
4928
|
+
font-family:Symbol;}
|
4929
4929
|
@list l21:level3
|
4930
4930
|
{mso-level-number-format:bullet;
|
4931
|
-
mso-level-text
|
4931
|
+
mso-level-text:;
|
4932
4932
|
mso-level-tab-stop:none;
|
4933
4933
|
mso-level-number-position:left;
|
4934
4934
|
margin-left:118.1pt;
|
4935
4935
|
text-indent:-18.0pt;
|
4936
|
-
font-family:
|
4936
|
+
font-family:Symbol;}
|
4937
4937
|
@list l21:level4
|
4938
4938
|
{mso-level-number-format:bullet;
|
4939
|
-
mso-level-text
|
4939
|
+
mso-level-text:;
|
4940
4940
|
mso-level-tab-stop:none;
|
4941
4941
|
mso-level-number-position:left;
|
4942
4942
|
margin-left:154.1pt;
|
@@ -4944,23 +4944,23 @@ span.SpellE
|
|
4944
4944
|
font-family:Symbol;}
|
4945
4945
|
@list l21:level5
|
4946
4946
|
{mso-level-number-format:bullet;
|
4947
|
-
mso-level-text
|
4947
|
+
mso-level-text:;
|
4948
4948
|
mso-level-tab-stop:none;
|
4949
4949
|
mso-level-number-position:left;
|
4950
4950
|
margin-left:190.1pt;
|
4951
4951
|
text-indent:-18.0pt;
|
4952
|
-
font-family:
|
4952
|
+
font-family:Symbol;}
|
4953
4953
|
@list l21:level6
|
4954
4954
|
{mso-level-number-format:bullet;
|
4955
|
-
mso-level-text
|
4955
|
+
mso-level-text:;
|
4956
4956
|
mso-level-tab-stop:none;
|
4957
4957
|
mso-level-number-position:left;
|
4958
4958
|
margin-left:226.1pt;
|
4959
4959
|
text-indent:-18.0pt;
|
4960
|
-
font-family:
|
4960
|
+
font-family:Symbol;}
|
4961
4961
|
@list l21:level7
|
4962
4962
|
{mso-level-number-format:bullet;
|
4963
|
-
mso-level-text
|
4963
|
+
mso-level-text:;
|
4964
4964
|
mso-level-tab-stop:none;
|
4965
4965
|
mso-level-number-position:left;
|
4966
4966
|
margin-left:262.1pt;
|
@@ -4968,20 +4968,20 @@ span.SpellE
|
|
4968
4968
|
font-family:Symbol;}
|
4969
4969
|
@list l21:level8
|
4970
4970
|
{mso-level-number-format:bullet;
|
4971
|
-
mso-level-text
|
4971
|
+
mso-level-text:;
|
4972
4972
|
mso-level-tab-stop:none;
|
4973
4973
|
mso-level-number-position:left;
|
4974
4974
|
margin-left:298.1pt;
|
4975
4975
|
text-indent:-18.0pt;
|
4976
|
-
font-family:
|
4976
|
+
font-family:Symbol;}
|
4977
4977
|
@list l21:level9
|
4978
4978
|
{mso-level-number-format:bullet;
|
4979
|
-
mso-level-text
|
4979
|
+
mso-level-text:;
|
4980
4980
|
mso-level-tab-stop:none;
|
4981
4981
|
mso-level-number-position:left;
|
4982
4982
|
margin-left:334.1pt;
|
4983
4983
|
text-indent:-18.0pt;
|
4984
|
-
font-family:
|
4984
|
+
font-family:Symbol;}
|
4985
4985
|
@list l20:level1 lfo31
|
4986
4986
|
{mso-level-start-at:10;}
|
4987
4987
|
|
@@ -1061,23 +1061,22 @@
|
|
1061
1061
|
<fo:flow flow-name="xsl-region-body">
|
1062
1062
|
<!-- debugpage=<xsl:copy-of select="."/> -->
|
1063
1063
|
|
1064
|
-
<xsl:if test="position() = 1">
|
1065
|
-
|
1064
|
+
<!-- <xsl:if test="position() = 1">
|
1065
|
+
|
1066
1066
|
<xsl:choose>
|
1067
1067
|
<xsl:when test="$current_template = 'draft'">
|
1068
1068
|
<fo:block font-family="Arial" font-size="23pt" font-weight="bold" margin-top="70pt" margin-bottom="48pt">
|
1069
|
-
|
1069
|
+
|
1070
1070
|
<xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
|
1071
1071
|
<xsl:attribute name="font-size">24pt</xsl:attribute>
|
1072
1072
|
</xsl:if>
|
1073
|
-
|
1073
|
+
|
1074
1074
|
<xsl:copy-of select="$title_prefix"/>
|
1075
1075
|
<xsl:copy-of select="$title"/>
|
1076
|
-
|
1077
|
-
<!-- <xsl:copy-of select="$draft_title_part"/> -->
|
1076
|
+
|
1078
1077
|
</fo:block>
|
1079
1078
|
</xsl:when>
|
1080
|
-
|
1079
|
+
|
1081
1080
|
<xsl:when test="$current_template = 'standard'">
|
1082
1081
|
<fo:block font-family="Arial" font-weight="bold" margin-top="13mm" space-after="12pt">
|
1083
1082
|
<fo:block font-weight="bold" space-before="13mm">
|
@@ -1085,30 +1084,21 @@
|
|
1085
1084
|
</fo:block>
|
1086
1085
|
</fo:block>
|
1087
1086
|
</xsl:when>
|
1087
|
+
|
1088
|
+
<xsl:otherwise> --><!-- $current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report' -->
|
1088
1089
|
|
1089
|
-
|
1090
|
-
|
1091
|
-
<xsl:attribute name="font-family">Calibri Light</xsl:attribute>
|
1090
|
+
<!-- <xsl:attribute name="font-family">Calibri Light</xsl:attribute>
|
1092
1091
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1093
|
-
|
1092
|
+
|
1094
1093
|
<fo:block font-family="Arial Black" font-size="20pt" margin-top="18pt">
|
1095
1094
|
<xsl:copy-of select="$title"/>
|
1096
|
-
<!-- <xsl:copy-of select="$draft_title_part"/> -->
|
1097
1095
|
</fo:block>
|
1098
1096
|
<xsl:call-template name="addBlueBox"/>
|
1099
|
-
|
1100
|
-
<fo:instream-foreign-object content-width="57mm" content-height="3mm" scaling="non-uniform" fox:alt-text="Image Box">
|
1101
|
-
<xsl:call-template name="insertImageBoxSVG">
|
1102
|
-
<xsl:with-param name="color"><xsl:value-of select="$color_blue"/></xsl:with-param>
|
1103
|
-
</xsl:call-template>
|
1104
|
-
</fo:instream-foreign-object>
|
1105
|
-
</fo:block>
|
1106
|
-
<fo:block margin-top="12pt" margin-bottom="12pt"> </fo:block> -->
|
1107
|
-
<fo:block margin-bottom="12pt"> </fo:block>
|
1097
|
+
<fo:block margin-bottom="12pt"> </fo:block>
|
1108
1098
|
</xsl:otherwise>
|
1109
1099
|
</xsl:choose>
|
1110
|
-
|
1111
|
-
</xsl:if>
|
1100
|
+
|
1101
|
+
</xsl:if> -->
|
1112
1102
|
|
1113
1103
|
<xsl:apply-templates select="*" mode="page"/>
|
1114
1104
|
<xsl:if test="position() = last()"><fo:block id="lastBlockMain"/></xsl:if>
|
@@ -1736,6 +1726,32 @@
|
|
1736
1726
|
</xsl:choose>
|
1737
1727
|
</xsl:template>
|
1738
1728
|
|
1729
|
+
<xsl:template match="ieee:p[@class = 'zzSTDTitle1']" priority="4">
|
1730
|
+
<xsl:choose>
|
1731
|
+
<xsl:when test="$current_template = 'draft'">
|
1732
|
+
<fo:block font-family="Arial" font-size="23pt" font-weight="bold" margin-top="70pt" margin-bottom="48pt">
|
1733
|
+
<xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
|
1734
|
+
<xsl:attribute name="font-size">24pt</xsl:attribute>
|
1735
|
+
</xsl:if>
|
1736
|
+
<xsl:apply-templates/>
|
1737
|
+
</fo:block>
|
1738
|
+
</xsl:when>
|
1739
|
+
<xsl:when test="$current_template = 'standard'">
|
1740
|
+
<fo:block font-family="Arial" font-weight="bold" margin-top="13mm" space-after="12pt">
|
1741
|
+
<xsl:apply-templates/>
|
1742
|
+
</fo:block>
|
1743
|
+
</xsl:when>
|
1744
|
+
<xsl:otherwise> <!-- $current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report' -->
|
1745
|
+
|
1746
|
+
<fo:block font-family="Arial Black" font-size="20pt" margin-top="18pt">
|
1747
|
+
<xsl:apply-templates/>
|
1748
|
+
</fo:block>
|
1749
|
+
<xsl:call-template name="addBlueBox"/>
|
1750
|
+
<fo:block margin-bottom="12pt"> </fo:block>
|
1751
|
+
</xsl:otherwise>
|
1752
|
+
</xsl:choose>
|
1753
|
+
</xsl:template>
|
1754
|
+
|
1739
1755
|
<xsl:template match="node()">
|
1740
1756
|
<xsl:apply-templates/>
|
1741
1757
|
</xsl:template>
|
@@ -7747,6 +7763,9 @@
|
|
7747
7763
|
<!-- END Definition List -->
|
7748
7764
|
<!-- ===================== -->
|
7749
7765
|
|
7766
|
+
<!-- default: ignore title in sections/p -->
|
7767
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
|
7768
|
+
|
7750
7769
|
<!-- ========================= -->
|
7751
7770
|
<!-- Rich text formatting -->
|
7752
7771
|
<!-- ========================= -->
|
@@ -9831,25 +9850,45 @@
|
|
9831
9850
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
9832
9851
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
9833
9852
|
|
9834
|
-
<xsl:
|
9835
|
-
<xsl:
|
9836
|
-
<xsl:
|
9837
|
-
|
9838
|
-
|
9839
|
-
|
9853
|
+
<xsl:if test="@width != '' and @width != 'auto'">
|
9854
|
+
<xsl:attribute name="width">
|
9855
|
+
<xsl:value-of select="@width"/>
|
9856
|
+
</xsl:attribute>
|
9857
|
+
</xsl:if>
|
9858
|
+
|
9859
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
9860
|
+
<xsl:attribute name="height">
|
9861
|
+
<xsl:value-of select="@height"/>
|
9862
|
+
</xsl:attribute>
|
9863
|
+
</xsl:if>
|
9840
9864
|
|
9841
|
-
<xsl:
|
9865
|
+
<xsl:choose>
|
9866
|
+
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
9867
|
+
<xsl:attribute name="scaling">non-uniform</xsl:attribute>
|
9868
|
+
</xsl:when>
|
9869
|
+
<xsl:otherwise>
|
9842
9870
|
|
9843
|
-
|
9871
|
+
<xsl:variable name="img_src">
|
9872
|
+
<xsl:choose>
|
9873
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
9874
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
9875
|
+
</xsl:choose>
|
9876
|
+
</xsl:variable>
|
9844
9877
|
|
9845
|
-
|
9878
|
+
<xsl:variable name="image_width_effective">
|
9846
9879
|
|
9847
|
-
|
9848
|
-
<xsl:if test="number($scale) < 100">
|
9880
|
+
<xsl:value-of select="$width_effective"/>
|
9849
9881
|
|
9850
|
-
|
9882
|
+
</xsl:variable>
|
9851
9883
|
|
9852
|
-
|
9884
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
9885
|
+
<xsl:if test="number($scale) < 100">
|
9886
|
+
|
9887
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
9888
|
+
|
9889
|
+
</xsl:if>
|
9890
|
+
</xsl:otherwise>
|
9891
|
+
</xsl:choose>
|
9853
9892
|
|
9854
9893
|
</xsl:if>
|
9855
9894
|
|
@@ -13544,7 +13583,7 @@
|
|
13544
13583
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
13545
13584
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13546
13585
|
</xsl:template>
|
13547
|
-
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
13586
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]/*[local-name() = 'span'][@class] | *[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
13548
13587
|
<xsl:copy>
|
13549
13588
|
<xsl:copy-of select="@*"/>
|
13550
13589
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -1061,23 +1061,22 @@
|
|
1061
1061
|
<fo:flow flow-name="xsl-region-body">
|
1062
1062
|
<!-- debugpage=<xsl:copy-of select="."/> -->
|
1063
1063
|
|
1064
|
-
<xsl:if test="position() = 1">
|
1065
|
-
|
1064
|
+
<!-- <xsl:if test="position() = 1">
|
1065
|
+
|
1066
1066
|
<xsl:choose>
|
1067
1067
|
<xsl:when test="$current_template = 'draft'">
|
1068
1068
|
<fo:block font-family="Arial" font-size="23pt" font-weight="bold" margin-top="70pt" margin-bottom="48pt">
|
1069
|
-
|
1069
|
+
|
1070
1070
|
<xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
|
1071
1071
|
<xsl:attribute name="font-size">24pt</xsl:attribute>
|
1072
1072
|
</xsl:if>
|
1073
|
-
|
1073
|
+
|
1074
1074
|
<xsl:copy-of select="$title_prefix"/>
|
1075
1075
|
<xsl:copy-of select="$title"/>
|
1076
|
-
|
1077
|
-
<!-- <xsl:copy-of select="$draft_title_part"/> -->
|
1076
|
+
|
1078
1077
|
</fo:block>
|
1079
1078
|
</xsl:when>
|
1080
|
-
|
1079
|
+
|
1081
1080
|
<xsl:when test="$current_template = 'standard'">
|
1082
1081
|
<fo:block font-family="Arial" font-weight="bold" margin-top="13mm" space-after="12pt">
|
1083
1082
|
<fo:block font-weight="bold" space-before="13mm">
|
@@ -1085,30 +1084,21 @@
|
|
1085
1084
|
</fo:block>
|
1086
1085
|
</fo:block>
|
1087
1086
|
</xsl:when>
|
1087
|
+
|
1088
|
+
<xsl:otherwise> --><!-- $current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report' -->
|
1088
1089
|
|
1089
|
-
|
1090
|
-
|
1091
|
-
<xsl:attribute name="font-family">Calibri Light</xsl:attribute>
|
1090
|
+
<!-- <xsl:attribute name="font-family">Calibri Light</xsl:attribute>
|
1092
1091
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1093
|
-
|
1092
|
+
|
1094
1093
|
<fo:block font-family="Arial Black" font-size="20pt" margin-top="18pt">
|
1095
1094
|
<xsl:copy-of select="$title"/>
|
1096
|
-
<!-- <xsl:copy-of select="$draft_title_part"/> -->
|
1097
1095
|
</fo:block>
|
1098
1096
|
<xsl:call-template name="addBlueBox"/>
|
1099
|
-
|
1100
|
-
<fo:instream-foreign-object content-width="57mm" content-height="3mm" scaling="non-uniform" fox:alt-text="Image Box">
|
1101
|
-
<xsl:call-template name="insertImageBoxSVG">
|
1102
|
-
<xsl:with-param name="color"><xsl:value-of select="$color_blue"/></xsl:with-param>
|
1103
|
-
</xsl:call-template>
|
1104
|
-
</fo:instream-foreign-object>
|
1105
|
-
</fo:block>
|
1106
|
-
<fo:block margin-top="12pt" margin-bottom="12pt"> </fo:block> -->
|
1107
|
-
<fo:block margin-bottom="12pt"> </fo:block>
|
1097
|
+
<fo:block margin-bottom="12pt"> </fo:block>
|
1108
1098
|
</xsl:otherwise>
|
1109
1099
|
</xsl:choose>
|
1110
|
-
|
1111
|
-
</xsl:if>
|
1100
|
+
|
1101
|
+
</xsl:if> -->
|
1112
1102
|
|
1113
1103
|
<xsl:apply-templates select="*" mode="page"/>
|
1114
1104
|
<xsl:if test="position() = last()"><fo:block id="lastBlockMain"/></xsl:if>
|
@@ -1736,6 +1726,32 @@
|
|
1736
1726
|
</xsl:choose>
|
1737
1727
|
</xsl:template>
|
1738
1728
|
|
1729
|
+
<xsl:template match="ieee:p[@class = 'zzSTDTitle1']" priority="4">
|
1730
|
+
<xsl:choose>
|
1731
|
+
<xsl:when test="$current_template = 'draft'">
|
1732
|
+
<fo:block font-family="Arial" font-size="23pt" font-weight="bold" margin-top="70pt" margin-bottom="48pt">
|
1733
|
+
<xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
|
1734
|
+
<xsl:attribute name="font-size">24pt</xsl:attribute>
|
1735
|
+
</xsl:if>
|
1736
|
+
<xsl:apply-templates/>
|
1737
|
+
</fo:block>
|
1738
|
+
</xsl:when>
|
1739
|
+
<xsl:when test="$current_template = 'standard'">
|
1740
|
+
<fo:block font-family="Arial" font-weight="bold" margin-top="13mm" space-after="12pt">
|
1741
|
+
<xsl:apply-templates/>
|
1742
|
+
</fo:block>
|
1743
|
+
</xsl:when>
|
1744
|
+
<xsl:otherwise> <!-- $current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report' -->
|
1745
|
+
|
1746
|
+
<fo:block font-family="Arial Black" font-size="20pt" margin-top="18pt">
|
1747
|
+
<xsl:apply-templates/>
|
1748
|
+
</fo:block>
|
1749
|
+
<xsl:call-template name="addBlueBox"/>
|
1750
|
+
<fo:block margin-bottom="12pt"> </fo:block>
|
1751
|
+
</xsl:otherwise>
|
1752
|
+
</xsl:choose>
|
1753
|
+
</xsl:template>
|
1754
|
+
|
1739
1755
|
<xsl:template match="node()">
|
1740
1756
|
<xsl:apply-templates/>
|
1741
1757
|
</xsl:template>
|
@@ -7747,6 +7763,9 @@
|
|
7747
7763
|
<!-- END Definition List -->
|
7748
7764
|
<!-- ===================== -->
|
7749
7765
|
|
7766
|
+
<!-- default: ignore title in sections/p -->
|
7767
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
|
7768
|
+
|
7750
7769
|
<!-- ========================= -->
|
7751
7770
|
<!-- Rich text formatting -->
|
7752
7771
|
<!-- ========================= -->
|
@@ -9831,25 +9850,45 @@
|
|
9831
9850
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
9832
9851
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
9833
9852
|
|
9834
|
-
<xsl:
|
9835
|
-
<xsl:
|
9836
|
-
<xsl:
|
9837
|
-
|
9838
|
-
|
9839
|
-
|
9853
|
+
<xsl:if test="@width != '' and @width != 'auto'">
|
9854
|
+
<xsl:attribute name="width">
|
9855
|
+
<xsl:value-of select="@width"/>
|
9856
|
+
</xsl:attribute>
|
9857
|
+
</xsl:if>
|
9858
|
+
|
9859
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
9860
|
+
<xsl:attribute name="height">
|
9861
|
+
<xsl:value-of select="@height"/>
|
9862
|
+
</xsl:attribute>
|
9863
|
+
</xsl:if>
|
9840
9864
|
|
9841
|
-
<xsl:
|
9865
|
+
<xsl:choose>
|
9866
|
+
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
9867
|
+
<xsl:attribute name="scaling">non-uniform</xsl:attribute>
|
9868
|
+
</xsl:when>
|
9869
|
+
<xsl:otherwise>
|
9842
9870
|
|
9843
|
-
|
9871
|
+
<xsl:variable name="img_src">
|
9872
|
+
<xsl:choose>
|
9873
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
9874
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
9875
|
+
</xsl:choose>
|
9876
|
+
</xsl:variable>
|
9844
9877
|
|
9845
|
-
|
9878
|
+
<xsl:variable name="image_width_effective">
|
9846
9879
|
|
9847
|
-
|
9848
|
-
<xsl:if test="number($scale) < 100">
|
9880
|
+
<xsl:value-of select="$width_effective"/>
|
9849
9881
|
|
9850
|
-
|
9882
|
+
</xsl:variable>
|
9851
9883
|
|
9852
|
-
|
9884
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
9885
|
+
<xsl:if test="number($scale) < 100">
|
9886
|
+
|
9887
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
9888
|
+
|
9889
|
+
</xsl:if>
|
9890
|
+
</xsl:otherwise>
|
9891
|
+
</xsl:choose>
|
9853
9892
|
|
9854
9893
|
</xsl:if>
|
9855
9894
|
|
@@ -13544,7 +13583,7 @@
|
|
13544
13583
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
13545
13584
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13546
13585
|
</xsl:template>
|
13547
|
-
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
13586
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]/*[local-name() = 'span'][@class] | *[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
13548
13587
|
<xsl:copy>
|
13549
13588
|
<xsl:copy-of select="@*"/>
|
13550
13589
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -0,0 +1,100 @@
|
|
1
|
+
module IsoDoc
|
2
|
+
module IEEE
|
3
|
+
class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
|
4
|
+
def bibdata_i18n(bib)
|
5
|
+
super
|
6
|
+
bibdata_dates(bib)
|
7
|
+
end
|
8
|
+
|
9
|
+
def bibdata_dates(bib)
|
10
|
+
bib.xpath(ns("./date")).each do |d|
|
11
|
+
d.next = d.dup
|
12
|
+
d.next["format"] = "ddMMMyyyy"
|
13
|
+
d.next.xpath(ns("./from | ./to | ./on")).each do |x|
|
14
|
+
x.children = ddMMMyyyy(x.text)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def ddMMMyyyy(isodate)
|
20
|
+
return nil if isodate.nil?
|
21
|
+
|
22
|
+
arr = isodate.split("-")
|
23
|
+
if arr.size == 1 && (/^\d+$/.match isodate)
|
24
|
+
Date.new(*arr.map(&:to_i)).strftime("%Y")
|
25
|
+
elsif arr.size == 2
|
26
|
+
Date.new(*arr.map(&:to_i)).strftime("%b %Y")
|
27
|
+
else
|
28
|
+
Date.parse(isodate).strftime("%d %b %Y")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def boilerplate(docxml)
|
33
|
+
docxml.xpath(ns("//clause[@id = 'boilerplate-participants']/" \
|
34
|
+
"clause/title")).each(&:remove)
|
35
|
+
docxml.xpath(ns("//clause[@id = 'boilerplate-participants']/clause"))
|
36
|
+
.each do |clause|
|
37
|
+
participants(clause)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def participants(clause)
|
42
|
+
clause.xpath(ns(".//ul")).each_with_index do |ulist, idx|
|
43
|
+
ulist.xpath(ns("./li")).each { |list| participants1(list, idx) }
|
44
|
+
ulist.replace(ulist.children)
|
45
|
+
end
|
46
|
+
affiliation_header(clause)
|
47
|
+
end
|
48
|
+
|
49
|
+
def affiliation_header(clause)
|
50
|
+
clause.xpath(ns(".//p[@type = 'officeorgrepmember']")).each do |p|
|
51
|
+
prev = p.previous_element
|
52
|
+
prev && prev.name == "p" &&
|
53
|
+
prev["type"] == "officeorgrepmember" and next
|
54
|
+
p.previous = <<~HDR
|
55
|
+
<p type='officeorgrepmemberhdr'><em>Organization
|
56
|
+
Represented</em><tab/><em>Name of Representative</em></p>
|
57
|
+
HDR
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def participants1(list, idx)
|
62
|
+
key = ""
|
63
|
+
map = list.xpath(ns(".//dt | .//dd")).each_with_object({}) do |dtd, m|
|
64
|
+
(dtd.name == "dt" and key = dtd.text) or
|
65
|
+
m[key] = @c.encode(dtd.text.strip, :hexadecimal)
|
66
|
+
end
|
67
|
+
list.replace(participant_para(map, idx))
|
68
|
+
end
|
69
|
+
|
70
|
+
def participant_para(map, idx)
|
71
|
+
name = participant_name(map)
|
72
|
+
if map["role"]&.casecmp("member")&.zero?
|
73
|
+
participant_member_para(map, name, idx)
|
74
|
+
else
|
75
|
+
participant_officeholder_para(map, name, idx)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def participant_member_para(map, name, _idx)
|
80
|
+
if map["company"] && (map["name"] || map["surname"])
|
81
|
+
pers = map["name"] || "#{map['given']} #{map['surname']}"
|
82
|
+
"<p type='officeorgrepmember'>#{name}<tab/>#{pers}</p>"
|
83
|
+
elsif map["company"] then "<p type='officeorgmember'>#{name}</p>"
|
84
|
+
else "<p type='officemember'>#{name}</p>"
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def participant_officeholder_para(map, name, idx)
|
89
|
+
name = "<strong>#{name}</strong>" if idx.zero?
|
90
|
+
br = map["role"].size > 30 ? "<br/>" : ""
|
91
|
+
"<p type='officeholder' align='center'>#{name}, #{br}" \
|
92
|
+
"<em>#{map['role']}</em></p>"
|
93
|
+
end
|
94
|
+
|
95
|
+
def participant_name(map)
|
96
|
+
map["company"] || map["name"] || "#{map['given']} #{map['surname']}"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative "init"
|
2
|
+
require_relative "presentation_bibdata"
|
2
3
|
require_relative "presentation_terms"
|
3
4
|
require_relative "presentation_ref"
|
4
5
|
require "isodoc"
|
@@ -25,7 +26,6 @@ module IsoDoc
|
|
25
26
|
|
26
27
|
def prefix_clause(target, loc)
|
27
28
|
loc["type"] == "clause" or return loc["type"]
|
28
|
-
|
29
29
|
if subclause?(target, loc["type"],
|
30
30
|
loc&.at(ns("./referenceFrom"))&.text)
|
31
31
|
""
|
@@ -101,34 +101,6 @@ module IsoDoc
|
|
101
101
|
prefix_name(elem, "<br/>", lbl, "title")
|
102
102
|
end
|
103
103
|
|
104
|
-
def bibdata_i18n(bib)
|
105
|
-
super
|
106
|
-
bibdata_dates(bib)
|
107
|
-
end
|
108
|
-
|
109
|
-
def bibdata_dates(bib)
|
110
|
-
bib.xpath(ns("./date")).each do |d|
|
111
|
-
d.next = d.dup
|
112
|
-
d.next["format"] = "ddMMMyyyy"
|
113
|
-
d.next.xpath(ns("./from | ./to | ./on")).each do |x|
|
114
|
-
x.children = ddMMMyyyy(x.text)
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
def ddMMMyyyy(isodate)
|
120
|
-
return nil if isodate.nil?
|
121
|
-
|
122
|
-
arr = isodate.split("-")
|
123
|
-
if arr.size == 1 && (/^\d+$/.match isodate)
|
124
|
-
Date.new(*arr.map(&:to_i)).strftime("%Y")
|
125
|
-
elsif arr.size == 2
|
126
|
-
Date.new(*arr.map(&:to_i)).strftime("%b %Y")
|
127
|
-
else
|
128
|
-
Date.parse(isodate).strftime("%d %b %Y")
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
104
|
def amend1(elem)
|
133
105
|
elem.xpath(ns("./description/p")).each do |p|
|
134
106
|
p.children = to_xml(p.children).strip
|
@@ -151,73 +123,6 @@ module IsoDoc
|
|
151
123
|
super
|
152
124
|
end
|
153
125
|
|
154
|
-
def boilerplate(docxml)
|
155
|
-
docxml.xpath(ns("//clause[@id = 'boilerplate-participants']/" \
|
156
|
-
"clause/title")).each(&:remove)
|
157
|
-
docxml.xpath(ns("//clause[@id = 'boilerplate-participants']/clause"))
|
158
|
-
.each do |clause|
|
159
|
-
participants(clause)
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
def participants(clause)
|
164
|
-
clause.xpath(ns(".//ul")).each_with_index do |ulist, idx|
|
165
|
-
ulist.xpath(ns("./li")).each { |list| participants1(list, idx) }
|
166
|
-
ulist.replace(ulist.children)
|
167
|
-
end
|
168
|
-
affiliation_header(clause)
|
169
|
-
end
|
170
|
-
|
171
|
-
def affiliation_header(clause)
|
172
|
-
clause.xpath(ns(".//p[@type = 'officeorgrepmember']")).each do |p|
|
173
|
-
prev = p.previous_element
|
174
|
-
prev && prev.name == "p" &&
|
175
|
-
prev["type"] == "officeorgrepmember" and next
|
176
|
-
p.previous = <<~HDR
|
177
|
-
<p type='officeorgrepmemberhdr'><em>Organization
|
178
|
-
Represented</em><tab/><em>Name of Representative</em></p>
|
179
|
-
HDR
|
180
|
-
end
|
181
|
-
end
|
182
|
-
|
183
|
-
def participants1(list, idx)
|
184
|
-
key = ""
|
185
|
-
map = list.xpath(ns(".//dt | .//dd")).each_with_object({}) do |dtd, m|
|
186
|
-
(dtd.name == "dt" and key = dtd.text) or
|
187
|
-
m[key] = @c.encode(dtd.text.strip, :hexadecimal)
|
188
|
-
end
|
189
|
-
list.replace(participant_para(map, idx))
|
190
|
-
end
|
191
|
-
|
192
|
-
def participant_para(map, idx)
|
193
|
-
name = participant_name(map)
|
194
|
-
if map["role"]&.casecmp("member")&.zero?
|
195
|
-
participant_member_para(map, name, idx)
|
196
|
-
else
|
197
|
-
participant_officeholder_para(map, name, idx)
|
198
|
-
end
|
199
|
-
end
|
200
|
-
|
201
|
-
def participant_member_para(map, name, _idx)
|
202
|
-
if map["company"] && (map["name"] || map["surname"])
|
203
|
-
pers = map["name"] || "#{map['given']} #{map['surname']}"
|
204
|
-
"<p type='officeorgrepmember'>#{name}<tab/>#{pers}</p>"
|
205
|
-
elsif map["company"] then "<p type='officeorgmember'>#{name}</p>"
|
206
|
-
else "<p type='officemember'>#{name}</p>"
|
207
|
-
end
|
208
|
-
end
|
209
|
-
|
210
|
-
def participant_officeholder_para(map, name, idx)
|
211
|
-
name = "<strong>#{name}</strong>" if idx.zero?
|
212
|
-
br = map["role"].size > 30 ? "<br/>" : ""
|
213
|
-
"<p type='officeholder' align='center'>#{name}, #{br}" \
|
214
|
-
"<em>#{map['role']}</em></p>"
|
215
|
-
end
|
216
|
-
|
217
|
-
def participant_name(map)
|
218
|
-
map["company"] || map["name"] || "#{map['given']} #{map['surname']}"
|
219
|
-
end
|
220
|
-
|
221
126
|
def asciimath_dup(node)
|
222
127
|
@suppressasciimathdup and return
|
223
128
|
super
|
@@ -243,9 +148,15 @@ module IsoDoc
|
|
243
148
|
end
|
244
149
|
|
245
150
|
def ol_numbering(docxml)
|
246
|
-
|
247
|
-
|
248
|
-
|
151
|
+
p = "//clause | //annex | //foreword | //acknowledgements | " \
|
152
|
+
"//introduction | //preface/abstract | //appendix | //terms | " \
|
153
|
+
"//term | //definitions | //references | //colophon"
|
154
|
+
docxml.xpath(ns(p)).each do |c|
|
155
|
+
(c.xpath(ns(".//ol")) -
|
156
|
+
c.xpath(ns("./clause//ol | ./appendix//ol | ./term//ol | " \
|
157
|
+
"./terms//ol | ./definitions//ol | " \
|
158
|
+
"/references//ol | ./colophon//ol")))
|
159
|
+
.each_with_index do |o, i|
|
249
160
|
ol_numbering1(o, i)
|
250
161
|
end
|
251
162
|
end
|
@@ -266,6 +177,17 @@ module IsoDoc
|
|
266
177
|
type
|
267
178
|
end
|
268
179
|
|
180
|
+
def middle_title(docxml)
|
181
|
+
s = docxml.at(ns("//sections")) or return
|
182
|
+
ret = "<p class='zzSTDTitle1'>#{@meta.get[:full_doctitle]}"
|
183
|
+
@meta.get[:amd] || @meta.get[:corr] and ret += "<br/>"
|
184
|
+
@meta.get[:amd] and ret += "Amendment #{@meta.get[:amd]}"
|
185
|
+
@meta.get[:amd] && @meta.get[:corr] and ret += " "
|
186
|
+
@meta.get[:corr] and ret += "Corrigenda #{@meta.get[:corr]}"
|
187
|
+
ret += "</p>"
|
188
|
+
s.children.first.previous = ret
|
189
|
+
end
|
190
|
+
|
269
191
|
include Init
|
270
192
|
end
|
271
193
|
end
|
@@ -50,32 +50,34 @@ module IsoDoc
|
|
50
50
|
def abstract(clause, out)
|
51
51
|
page_break(out)
|
52
52
|
out.div **attr_code(id: clause["id"], class: "abstract") do |s|
|
53
|
-
clause_name(clause, clause.at(ns("./title")), s,
|
53
|
+
clause_name(clause, clause.at(ns("./title")), s,
|
54
|
+
{ class: "AbstractTitle" })
|
54
55
|
clause.elements.each { |e| parse(e, s) unless e.name == "title" }
|
55
56
|
end
|
56
57
|
end
|
57
58
|
|
59
|
+
MAIN_ELEMENTS =
|
60
|
+
"//sections/*[@displayorder][not(@class = 'zzSTDTitle1')] | " \
|
61
|
+
"//annex[@displayorder] | " \
|
62
|
+
"//bibliography/*[@displayorder] | //colophon/*[@displayorder] | " \
|
63
|
+
"//indexsect[@displayorder]".freeze
|
64
|
+
|
58
65
|
def make_body3(body, docxml)
|
59
|
-
body.div class: "WordSectionMiddleTitle" do |
|
60
|
-
middle_title_ieee(docxml,
|
66
|
+
body.div class: "WordSectionMiddleTitle" do |div3|
|
67
|
+
middle_title_ieee(docxml, div3)
|
61
68
|
end
|
62
69
|
section_break(body, continuous: true)
|
63
70
|
body.div class: "WordSectionMain" do |div3|
|
64
|
-
|
71
|
+
content(div3, docxml, ns(self.class::MAIN_ELEMENTS))
|
65
72
|
footnotes div3
|
66
73
|
comments div3
|
67
74
|
end
|
68
75
|
end
|
69
76
|
|
70
|
-
def
|
71
|
-
|
72
|
-
def middle_title_ieee(_docxml, out)
|
77
|
+
def middle_title_ieee(docxml, out)
|
78
|
+
title = docxml.at(ns("//p[@class = 'zzSTDTitle1']")) or return
|
73
79
|
out.p(class: "IEEEStdsTitle", style: "margin-top:70.0pt") do |p|
|
74
|
-
p
|
75
|
-
@meta.get[:amd] || @meta.get[:corr] and p << "<br/>"
|
76
|
-
@meta.get[:amd] and p << "Amendment #{@meta.get[:amd]}"
|
77
|
-
@meta.get[:amd] && @meta.get[:corr] and p << " "
|
78
|
-
@meta.get[:corr] and p << "Corrigenda #{@meta.get[:corr]}"
|
80
|
+
title.children.each { |n| parse(n, p) }
|
79
81
|
end
|
80
82
|
end
|
81
83
|
|
@@ -137,7 +139,6 @@ module IsoDoc
|
|
137
139
|
end
|
138
140
|
|
139
141
|
def annex_name(_annex, name, div)
|
140
|
-
preceding_floating_titles(name, div)
|
141
142
|
return if name.nil?
|
142
143
|
|
143
144
|
name&.at(ns("./strong"))&.remove # supplied by CSS list numbering
|
@@ -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 v1.2.
|
20
|
+
<!-- VERSION v1.2.3 -->
|
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">
|
@@ -192,9 +192,11 @@
|
|
192
192
|
</attribute>
|
193
193
|
</optional>
|
194
194
|
<attribute name="citeas"/>
|
195
|
-
<
|
196
|
-
<
|
197
|
-
|
195
|
+
<optional>
|
196
|
+
<attribute name="type">
|
197
|
+
<ref name="ReferenceFormat"/>
|
198
|
+
</attribute>
|
199
|
+
</optional>
|
198
200
|
<optional>
|
199
201
|
<attribute name="alt"/>
|
200
202
|
</optional>
|
@@ -836,6 +838,26 @@
|
|
836
838
|
<ref name="paragraph"/>
|
837
839
|
</element>
|
838
840
|
</define>
|
841
|
+
<define name="stem">
|
842
|
+
<element name="stem">
|
843
|
+
<attribute name="type">
|
844
|
+
<choice>
|
845
|
+
<value>MathML</value>
|
846
|
+
<value>AsciiMath</value>
|
847
|
+
<value>LatexMath</value>
|
848
|
+
</choice>
|
849
|
+
</attribute>
|
850
|
+
<attribute name="block">
|
851
|
+
<data type="boolean"/>
|
852
|
+
</attribute>
|
853
|
+
<oneOrMore>
|
854
|
+
<choice>
|
855
|
+
<text/>
|
856
|
+
<ref name="AnyElement"/>
|
857
|
+
</choice>
|
858
|
+
</oneOrMore>
|
859
|
+
</element>
|
860
|
+
</define>
|
839
861
|
<define name="em">
|
840
862
|
<element name="em">
|
841
863
|
<zeroOrMore>
|
data/metanorma-ieee.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
27
27
|
|
28
|
-
spec.add_dependency "metanorma-standoc", "~> 2.
|
28
|
+
spec.add_dependency "metanorma-standoc", "~> 2.5.0"
|
29
29
|
spec.add_dependency "mnconvert", "~> 1.20"
|
30
30
|
#spec.add_dependency "pubid-ieee", "~> 0.1.1"
|
31
31
|
#spec.add_dependency "pubid-iso", "~> 0.5.3"
|
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.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07
|
11
|
+
date: 2023-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mnconvert
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -249,6 +249,7 @@ files:
|
|
249
249
|
- lib/isodoc/ieee/init.rb
|
250
250
|
- lib/isodoc/ieee/metadata.rb
|
251
251
|
- lib/isodoc/ieee/pdf_convert.rb
|
252
|
+
- lib/isodoc/ieee/presentation_bibdata.rb
|
252
253
|
- lib/isodoc/ieee/presentation_ref.rb
|
253
254
|
- lib/isodoc/ieee/presentation_terms.rb
|
254
255
|
- lib/isodoc/ieee/presentation_xml_convert.rb
|