metanorma-ieee 1.2.13 → 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: bc4895281aceec332b1a16b2d481ffcaf9e336ba9e2c49cfdc2d81015e85998c
4
- data.tar.gz: ca5a9aae41560f57de081927bc688a5151c9deee0c0c1a75511f87de8e088f9a
3
+ metadata.gz: 6900c230f21efe3f0d54dfc3c525347afacf77ae42786a72527cb2212e258846
4
+ data.tar.gz: 343dfc16bdfbaa33d9914f172cbc09dbfd6fc6dcd44fbc078fd4b1d602cd0fe8
5
5
  SHA512:
6
- metadata.gz: 42db1434c3b10a3d6389b5708f925a78fb5074aab2e2f9b29ec479e247733771f08fba5d0169ebb3e65f5a8fb7dcf1d9567728bdbc3fa65eb79d50c79eaaca80
7
- data.tar.gz: 6fc8000efd5d636ad4e9c4ed869627e4a47344c2055597d8392cd45cc1d1064370a7e1cf03e10c46e32ced8e2a7bad73f63b3bce1aea720653a386a893f6315e
6
+ metadata.gz: 8baa1c2a0dd41f4c26a91605d7d83045c4d5b4126850d1c9cec92b97f4636546a6d4982d6365bc6340522aaee722183109d32d4132b8651e9554e9d87f407ceb
7
+ data.tar.gz: 2a200c8132647f355df3b3725e5adc537462f56afd68e745ed7f9492db11c4a205e12393c548eeb32bdc52f8d6547ba58be99c56bd56a2d7bfcadb39ddf6a43a
@@ -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"/>
@@ -14562,10 +14584,12 @@
14562
14584
  <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
14563
14585
  <xsl:copy>
14564
14586
  <xsl:copy-of select="@*"/>
14565
- <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
14566
- <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
14567
- <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
14568
- <xsl:value-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>
14569
14593
  </xsl:if>
14570
14594
  </xsl:copy>
14571
14595
  </xsl:template>
@@ -15542,7 +15566,8 @@
15542
15566
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
15543
15567
  <xsl:choose>
15544
15568
  <xsl:when test="normalize-space() != ''">
15545
- <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}"/>
15546
15571
  </xsl:when>
15547
15572
  <xsl:otherwise>
15548
15573
  <!-- _{filename}_attachments -->
@@ -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"/>
@@ -14562,10 +14584,12 @@
14562
14584
  <xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
14563
14585
  <xsl:copy>
14564
14586
  <xsl:copy-of select="@*"/>
14565
- <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
14566
- <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
14567
- <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
14568
- <xsl:value-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>
14569
14593
  </xsl:if>
14570
14594
  </xsl:copy>
14571
14595
  </xsl:template>
@@ -15542,7 +15566,8 @@
15542
15566
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
15543
15567
  <xsl:choose>
15544
15568
  <xsl:when test="normalize-space() != ''">
15545
- <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}"/>
15546
15571
  </xsl:when>
15547
15572
  <xsl:otherwise>
15548
15573
  <!-- _{filename}_attachments -->
@@ -78,8 +78,12 @@ module IsoDoc
78
78
  def creatornames(bibitem)
79
79
  ::Relaton::Render::IEEE::General
80
80
  .new(language: @lang, i18nhash: @i18n.get,
81
- template: { (bibitem["type"] || "misc").to_sym =>
82
- "{{ 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
+ )
83
87
  .render1(RelatonBib::XMLParser.from_xml(bibitem.to_xml))
84
88
  end
85
89
 
@@ -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.13".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
 
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.13
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-08-05 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