metanorma-ieee 1.2.12 → 1.2.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c662d2e1d2098e3135362a0d30c7faa4f2bc09d7ff48ed141634d6387bd87f5
4
- data.tar.gz: 92a643d3c59276828c5d2176a05a16bcfdd5f70ee24d2425133356c04c183d72
3
+ metadata.gz: 6900c230f21efe3f0d54dfc3c525347afacf77ae42786a72527cb2212e258846
4
+ data.tar.gz: 343dfc16bdfbaa33d9914f172cbc09dbfd6fc6dcd44fbc078fd4b1d602cd0fe8
5
5
  SHA512:
6
- metadata.gz: 72e2433351b0e929361911adf0069f4426a8e50c10b1c503a22d5c18aa0a2c6fcf6c9df33c43c96d5a63cb8ed8a60b9422d55f0516ed7490f93a374c7470e6c1
7
- data.tar.gz: c7b1b210e0cf40b99750a71cb24459485c79fc0bed2859258d2506dfe4c6a091f86142ccf01bdfba954a7e778330e8a0e1f5b939d789a254ddf021e4575c3ecb
6
+ metadata.gz: 8baa1c2a0dd41f4c26a91605d7d83045c4d5b4126850d1c9cec92b97f4636546a6d4982d6365bc6340522aaee722183109d32d4132b8651e9554e9d87f407ceb
7
+ data.tar.gz: 2a200c8132647f355df3b3725e5adc537462f56afd68e745ed7f9492db11c4a205e12393c548eeb32bdc52f8d6547ba58be99c56bd56a2d7bfcadb39ddf6a43a
@@ -50,7 +50,8 @@ class Html2Doc
50
50
  l["class"] ||= list_style(type, level, "Middle")
51
51
  next unless l&.first_element_child&.name == "p"
52
52
 
53
- l["style"] += (l.first_element_child["style"]&.sub(/mso-list[^;]+;/, "") || "")
53
+ l["style"] +=
54
+ l.first_element_child["style"]&.sub(/mso-list[^;]+;/, "") || ""
54
55
  l.first_element_child.replace(l.first_element_child.children)
55
56
  end
56
57
  list.replace(list.children)
@@ -229,6 +229,46 @@ h6:hover > a.anchor,
229
229
  .inline-header:hover > a.anchor {
230
230
  visibility: visible; }
231
231
 
232
+ /* collapsible snippets: collapsible before hidable */
233
+ .hidable {
234
+ max-height: 0;
235
+ overflow: hidden;
236
+ transition: max-height 0.2s ease-out; }
237
+
238
+ .collapsible {
239
+ background-color: #777;
240
+ color: white;
241
+ cursor: pointer;
242
+ padding: 12px 0;
243
+ margin: 0;
244
+ width: 100%;
245
+ border: none;
246
+ text-align: left;
247
+ outline: none;
248
+ font-size: 15px; }
249
+
250
+ .active, .collapsible:hover {
251
+ background-color: #555; }
252
+
253
+ .collapsible:after {
254
+ content: '\25bc';
255
+ color: white;
256
+ font-weight: bold;
257
+ float: right;
258
+ margin-left: 12px;
259
+ margin-right: 12px; }
260
+
261
+ .active:after {
262
+ content: "\25b2"; }
263
+
264
+ /* collapsible: */
265
+ .collapsible + .hidable {
266
+ margin-top: 0; }
267
+
268
+ .collapsible:not(.active) + .hidable {
269
+ overflow: hidden;
270
+ padding: 0; }
271
+
232
272
  #standard-band {
233
273
  background-color: #0AC442; }
234
274
 
@@ -5676,13 +5676,35 @@
5676
5676
  </xsl:for-each>
5677
5677
  </xsl:element>
5678
5678
 
5679
- <xsl:call-template name="insertAnnexInSeparatePageSequences"/>
5679
+ <xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
5680
5680
 
5681
- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
5681
+ <!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
5682
5682
 
5683
5683
  <!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
5684
5684
  </xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
5685
5685
 
5686
+ <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexAndBibliographyInSeparatePageSequences">
5687
+ <xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
5688
+ <xsl:sort select="@displayorder" data-type="number"/>
5689
+ <xsl:choose>
5690
+ <xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
5691
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
5692
+ <xsl:attribute name="main_page_sequence"/>
5693
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
5694
+ </xsl:element>
5695
+ </xsl:when>
5696
+ <xsl:otherwise> <!-- bibliography -->
5697
+ <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
5698
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
5699
+ <xsl:attribute name="main_page_sequence"/>
5700
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
5701
+ </xsl:element>
5702
+ </xsl:element>
5703
+ </xsl:otherwise>
5704
+ </xsl:choose>
5705
+ </xsl:for-each>
5706
+ </xsl:template>
5707
+
5686
5708
  <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexInSeparatePageSequences">
5687
5709
  <xsl:for-each select="/*/*[local-name()='annex']">
5688
5710
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -9887,18 +9909,33 @@
9887
9909
 
9888
9910
  <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='localityStack']"/>
9889
9911
 
9912
+ <xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList_">
9913
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
9914
+ <attachment filename="{@name}"/>
9915
+ </xsl:for-each>
9916
+ </xsl:variable>
9917
+ <xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
9918
+
9890
9919
  <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='link']" name="link">
9920
+ <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
9921
+ <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
9891
9922
  <xsl:variable name="target">
9892
9923
  <xsl:choose>
9893
9924
  <xsl:when test="@updatetype = 'true'">
9894
9925
  <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
9895
9926
  </xsl:when>
9927
+ <!-- link to the PDF attachment -->
9928
+ <xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
9929
+ <xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
9930
+ </xsl:when>
9931
+ <!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
9932
+ <xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
9933
+ </xsl:when>
9896
9934
  <xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
9897
- <!-- link to the PDF attachment -->
9898
9935
  <xsl:variable name="target_" select="translate(@target, '\', '/')"/>
9899
9936
  <xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
9900
9937
  <xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
9901
- </xsl:when>
9938
+ </xsl:when> -->
9902
9939
  <xsl:otherwise>
9903
9940
  <xsl:value-of select="normalize-space(@target)"/>
9904
9941
  </xsl:otherwise>
@@ -14544,6 +14581,19 @@
14544
14581
  <xsl:copy-of select="."/>
14545
14582
  </xsl:template>
14546
14583
 
14584
+ <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
14585
+ <xsl:copy>
14586
+ <xsl:copy-of select="@*"/>
14587
+ <xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
14588
+ <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
14589
+ <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
14590
+ <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
14591
+ <xsl:value-of select="normalize-space(.)"/>
14592
+ </xsl:if>
14593
+ </xsl:if>
14594
+ </xsl:copy>
14595
+ </xsl:template>
14596
+
14547
14597
  <!-- add @id, mandatory for table auto-layout algorithm -->
14548
14598
  <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
14549
14599
  <xsl:copy>
@@ -15516,11 +15566,13 @@
15516
15566
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
15517
15567
  <xsl:choose>
15518
15568
  <xsl:when test="normalize-space() != ''">
15519
- <pdf:embedded-file src="{.}" filename="{@name}"/>
15569
+ <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
15570
+ <pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
15520
15571
  </xsl:when>
15521
15572
  <xsl:otherwise>
15522
15573
  <!-- _{filename}_attachments -->
15523
- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
15574
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
15575
+ <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
15524
15576
  <pdf:embedded-file src="{$url}" filename="{@name}"/>
15525
15577
  </xsl:otherwise>
15526
15578
  </xsl:choose>
@@ -5676,13 +5676,35 @@
5676
5676
  </xsl:for-each>
5677
5677
  </xsl:element>
5678
5678
 
5679
- <xsl:call-template name="insertAnnexInSeparatePageSequences"/>
5679
+ <xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
5680
5680
 
5681
- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
5681
+ <!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
5682
5682
 
5683
5683
  <!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
5684
5684
  </xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
5685
5685
 
5686
+ <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexAndBibliographyInSeparatePageSequences">
5687
+ <xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
5688
+ <xsl:sort select="@displayorder" data-type="number"/>
5689
+ <xsl:choose>
5690
+ <xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
5691
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
5692
+ <xsl:attribute name="main_page_sequence"/>
5693
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
5694
+ </xsl:element>
5695
+ </xsl:when>
5696
+ <xsl:otherwise> <!-- bibliography -->
5697
+ <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
5698
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
5699
+ <xsl:attribute name="main_page_sequence"/>
5700
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
5701
+ </xsl:element>
5702
+ </xsl:element>
5703
+ </xsl:otherwise>
5704
+ </xsl:choose>
5705
+ </xsl:for-each>
5706
+ </xsl:template>
5707
+
5686
5708
  <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexInSeparatePageSequences">
5687
5709
  <xsl:for-each select="/*/*[local-name()='annex']">
5688
5710
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -9887,18 +9909,33 @@
9887
9909
 
9888
9910
  <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='localityStack']"/>
9889
9911
 
9912
+ <xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList_">
9913
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
9914
+ <attachment filename="{@name}"/>
9915
+ </xsl:for-each>
9916
+ </xsl:variable>
9917
+ <xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
9918
+
9890
9919
  <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='link']" name="link">
9920
+ <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
9921
+ <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
9891
9922
  <xsl:variable name="target">
9892
9923
  <xsl:choose>
9893
9924
  <xsl:when test="@updatetype = 'true'">
9894
9925
  <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
9895
9926
  </xsl:when>
9927
+ <!-- link to the PDF attachment -->
9928
+ <xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
9929
+ <xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
9930
+ </xsl:when>
9931
+ <!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
9932
+ <xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
9933
+ </xsl:when>
9896
9934
  <xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
9897
- <!-- link to the PDF attachment -->
9898
9935
  <xsl:variable name="target_" select="translate(@target, '\', '/')"/>
9899
9936
  <xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
9900
9937
  <xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
9901
- </xsl:when>
9938
+ </xsl:when> -->
9902
9939
  <xsl:otherwise>
9903
9940
  <xsl:value-of select="normalize-space(@target)"/>
9904
9941
  </xsl:otherwise>
@@ -14544,6 +14581,19 @@
14544
14581
  <xsl:copy-of select="."/>
14545
14582
  </xsl:template>
14546
14583
 
14584
+ <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
14585
+ <xsl:copy>
14586
+ <xsl:copy-of select="@*"/>
14587
+ <xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
14588
+ <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
14589
+ <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
14590
+ <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
14591
+ <xsl:value-of select="normalize-space(.)"/>
14592
+ </xsl:if>
14593
+ </xsl:if>
14594
+ </xsl:copy>
14595
+ </xsl:template>
14596
+
14547
14597
  <!-- add @id, mandatory for table auto-layout algorithm -->
14548
14598
  <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
14549
14599
  <xsl:copy>
@@ -15516,11 +15566,13 @@
15516
15566
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
15517
15567
  <xsl:choose>
15518
15568
  <xsl:when test="normalize-space() != ''">
15519
- <pdf:embedded-file src="{.}" filename="{@name}"/>
15569
+ <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
15570
+ <pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
15520
15571
  </xsl:when>
15521
15572
  <xsl:otherwise>
15522
15573
  <!-- _{filename}_attachments -->
15523
- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
15574
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
15575
+ <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
15524
15576
  <pdf:embedded-file src="{$url}" filename="{@name}"/>
15525
15577
  </xsl:otherwise>
15526
15578
  </xsl:choose>
@@ -10,15 +10,6 @@ module IsoDoc
10
10
  logos
11
11
  end
12
12
 
13
- def logos
14
- here = File.join(File.dirname(__FILE__), "html")
15
- %i(wp_image001_emz wp_image003_emz wp_image008_emz)
16
- .each do |w|
17
- img = w.to_s.sub("_emz", ".emz")
18
- set(w, File.expand_path(File.join(here, img)))
19
- end
20
- end
21
-
22
13
  def logos
23
14
  here = File.join(File.dirname(__FILE__), "html")
24
15
  suffix = ".emz"
@@ -33,7 +24,7 @@ module IsoDoc
33
24
 
34
25
  def bibdate(isoxml, _out)
35
26
  isoxml.xpath(ns("//bibdata/date[@format = 'ddMMMyyyy']")).each do |d|
36
- set("#{d['type'].gsub('-', '_')}date".to_sym, Common::date_range(d))
27
+ set("#{d['type'].tr('-', '_')}date".to_sym, Common::date_range(d))
37
28
  end
38
29
  draft = isoxml.at(ns("//bibdata/date[@type = 'issued']")) ||
39
30
  isoxml.at(ns("//bibdata/date[@type = 'circulated']")) ||
@@ -45,20 +45,45 @@ module IsoDoc
45
45
  super
46
46
  end
47
47
 
48
+ KEEP_BIBRENDER_XPATH =
49
+ "./docidentifier | ./uri | ./note | ./title | ./biblio-tag".freeze
50
+
48
51
  def bibrender_relaton(xml, renderings)
49
52
  f = renderings[xml["id"]][:formattedref]
50
53
  fn = availability_note(xml)
51
54
  f &&= "<formattedref>#{f}#{fn}</formattedref>"
52
- keep = "./docidentifier | ./uri | ./note | ./title | ./biblio-tag"
53
- xml.children = "#{f}#{xml.xpath(ns(keep)).to_xml}"
55
+ xml.children = "#{f}#{xml.xpath(ns(KEEP_BIBRENDER_XPATH)).to_xml}"
56
+ author_date(xml, renderings)
54
57
  @author[xml["id"]] = renderings[xml["id"]][:author]
55
58
  end
56
59
 
60
+ def author_date(xml, renderings)
61
+ author_date?(xml) or return
62
+ cit = renderings[xml["id"]][:citation]
63
+ xml << "<docidentifier type='metanorma'>#{cit}</docidentifier>"
64
+ xml.at(ns("./biblio-tag"))&.remove
65
+ xml << "<biblio-tag>#{cit}, </biblio-tag>"
66
+ end
67
+
68
+ def author_date?(xml)
69
+ ret = !xml["type"]
70
+ ret ||= %w(standard techreport website webresource)
71
+ .include?(xml["type"])
72
+ ret ||= xml.at(".//ancestor::xmlns:references[@normative = 'false']")
73
+ ret ||= xml.at(ns("./docidentifier[@type = 'metanorma']"))
74
+ ret and return false
75
+ true
76
+ end
77
+
57
78
  def creatornames(bibitem)
58
79
  ::Relaton::Render::IEEE::General
59
80
  .new(language: @lang, i18nhash: @i18n.get,
60
- template: { (bibitem["type"] || "misc").to_sym =>
61
- "{{ creatornames }}" })
81
+ #template: { (bibitem["type"] || "misc").to_sym =>
82
+ #"{{ creatornames }}" },
83
+ template: "{{ creatornames }}" ,
84
+ extenttemplate: { (bibitem["type"] || "misc").to_sym => "{{page}}"} ,
85
+ sizetemplate: { (bibitem["type"] || "misc").to_sym => "{{data}}"} ,
86
+ )
62
87
  .render1(RelatonBib::XMLParser.from_xml(bibitem.to_xml))
63
88
  end
64
89
 
@@ -86,7 +86,7 @@ module IsoDoc
86
86
  ins = coll.first.previous_element
87
87
  ret = sort_related(coll)
88
88
  coll.each(&:remove)
89
- ret.reverse.each { |t| ins.next = t }
89
+ ret.reverse_each { |t| ins.next = t }
90
90
  ins.parent.xpath(ns("./related"))
91
91
  end
92
92
 
@@ -144,7 +144,7 @@ module IsoDoc
144
144
  coll = terms.xpath(ns("./term"))
145
145
  ret = sort_terms(coll)
146
146
  coll.each(&:remove)
147
- ret.reverse.each { |t| ins.next = t }
147
+ ret.reverse_each { |t| ins.next = t }
148
148
  end
149
149
 
150
150
  def sort_terms(terms)
@@ -63,13 +63,17 @@ module IsoDoc
63
63
  capitalise_xref(node, linkend, anchor_value(node["target"]))
64
64
  end
65
65
 
66
+ def eref_locality_populate(type, node, number)
67
+ type == "page" and return ""
68
+ super
69
+ end
70
+
66
71
  def block_delim
67
72
  "&#x2014;"
68
73
  end
69
74
 
70
75
  def note1(elem)
71
- return if elem.parent.name == "bibitem" || elem["notag"] == "true"
72
-
76
+ elem.parent.name == "bibitem" || elem["notag"] == "true" and return
73
77
  n = @xrefs.get[elem["id"]]
74
78
  lbl = if n.nil? || n[:label].nil? || n[:label].empty? then @i18n.note
75
79
  else l10n("#{@i18n.note} #{n[:label]}")
@@ -137,11 +137,11 @@ module IsoDoc
137
137
  end
138
138
 
139
139
  def table_toc_class
140
- [stylesmap[:TableTitle], "TableTitle", "tabletitle"]
140
+ ["IEEEStds Regular Table Caption", "TableTitle", "tabletitle"]
141
141
  end
142
142
 
143
143
  def figure_toc_class
144
- [stylesmap[:FigureTitle], "FigureTitle", "figuretitle"]
144
+ ["IEEEStds Regular Figure Caption", "FigureTitle", "figuretitle"]
145
145
  end
146
146
 
147
147
  def style_cleanup(docxml)
@@ -23,7 +23,10 @@ module Metanorma
23
23
  @i = IsoDoc::IEEE::PresentationXMLConvert
24
24
  .new({ lang: @lang, script: @script, locale: @locale })
25
25
  @i.i18n_init(@lang, @script, @locale)
26
- bib.sort { |a, b| sort_biblio_key(a) <=> sort_biblio_key(b) }
26
+ sort_keys = bib.each_with_object({}) do |b, m|
27
+ m[b["id"]] = sort_biblio_key(b)
28
+ end
29
+ bib.sort { |a, b| sort_keys[a["id"]] <=> sort_keys[b["id"]] }
27
30
  end
28
31
 
29
32
  # Alphabetic by rendering: author surname or designation, followed by title
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IEEE
3
- VERSION = "1.2.12".freeze
3
+ VERSION = "1.2.14".freeze
4
4
  end
5
5
  end
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ["lib"]
26
26
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
27
27
 
28
- spec.add_dependency "metanorma-standoc", "~> 2.9.0"
28
+ spec.add_dependency "metanorma-standoc", "~> 2.9.3"
29
29
  spec.add_dependency "mnconvert", "~> 1.20"
30
30
  spec.add_dependency "pubid"
31
31
 
@@ -41,4 +41,5 @@ Gem::Specification.new do |spec|
41
41
  spec.add_development_dependency "timecop", "~> 0.9"
42
42
  spec.add_development_dependency "vcr", "~> 6.1.0"
43
43
  spec.add_development_dependency "webmock"
44
+ spec.add_development_dependency "xml-c14n"
44
45
  end
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.2.12
4
+ version: 1.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-22 00:00:00.000000000 Z
11
+ date: 2024-08-19 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.9.0
19
+ version: 2.9.3
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.9.0
26
+ version: 2.9.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mnconvert
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -220,6 +220,20 @@ dependencies:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: xml-c14n
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
223
237
  description: 'Metanorma for the ITU.
224
238
 
225
239
  '