metanorma-iho 1.4.10 → 1.4.11

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: 0f0eb6194ad58902b72b622a70c364a6c8b1f21aaadf4b49b72dc0443cd6a53a
4
- data.tar.gz: 2ce2393d5ccaa00cb3735a9ac2ab3637abb3081a1528e7e16e48ef47dea31aaf
3
+ metadata.gz: d34ec7bf757d609c47fcc4d8efa109030f1cf0c6b76272ab9b76e3e3b59a7256
4
+ data.tar.gz: a9f2b2e31759e5b49b413f4d9dba52ea12423f6747592b2c4582037d9b920803
5
5
  SHA512:
6
- metadata.gz: f24588b9fd29907800e9218e1e1792c173b79c1e6971acf49944e408bc7494afd724a943f5f6d6e9b763ee1f1f54353795795f1c66a1257bf12d9d93ac73e053
7
- data.tar.gz: 5ff763a111a676d0b9eb7dc9bc5b87b2ff43f250be839824c1162c6fe04d0db17c364848c3f51d18882eb7ca5880be88813cfa6dda768559423c4e605f1c9ba2
6
+ metadata.gz: 2986f821c2c9235ee2a0b950ade96b7607ff96bc55b86df89d19fabadd8eb9d7e2282df226be15beed3972bc604408a1c1d66eb328f239111c0b1ee987058a9c
7
+ data.tar.gz: bbd67b129db6381037c5e9f2961f565345ae568d421641a213966131b2952abccea489f5d1336327e83d164b50bd24d99f354cb9b4579344709586b3b430d4c4
@@ -2188,8 +2188,20 @@
2188
2188
  <xsl:if test="$docnum != '1'">_<xsl:value-of select="$docnum"/></xsl:if>
2189
2189
  </xsl:variable>
2190
2190
  <xsl:variable name="named_dest_doc" select="normalize-space($named_dest_doc_)"/>
2191
- <xsl:if test="not(key('kid', $named_dest_doc))"> <!-- if element with id '$named_dest_doc' doesn't exist in the document -->
2192
- <xsl:attribute name="named_dest"><xsl:value-of select="normalize-space($named_dest_doc)"/></xsl:attribute>
2191
+ <xsl:variable name="named_dest_unique_">
2192
+ <xsl:choose>
2193
+ <xsl:when test="normalize-space($caption_label) != '' and count(//mn:fmt-name[translate(normalize-space(.//mn:span[@class = 'fmt-caption-label']), ' ()', '') = $caption_label]) &gt; 1">
2194
+ <!-- duplicate caption numbers across clauses (e.g. two "Table 1" in front matter): qualify with the owner element id so fo ids stay unique -->
2195
+ <xsl:value-of select="concat(normalize-space($named_dest_doc), '_', ancestor::*[@id][1]/@id)"/>
2196
+ </xsl:when>
2197
+ <xsl:otherwise>
2198
+ <xsl:value-of select="normalize-space($named_dest_doc)"/>
2199
+ </xsl:otherwise>
2200
+ </xsl:choose>
2201
+ </xsl:variable>
2202
+ <xsl:variable name="named_dest_unique" select="normalize-space($named_dest_unique_)"/>
2203
+ <xsl:if test="$named_dest_unique != '' and not(key('kid', $named_dest_unique))"> <!-- if element with id '$named_dest_unique' doesn't exist in the document -->
2204
+ <xsl:attribute name="named_dest"><xsl:value-of select="$named_dest_unique"/></xsl:attribute>
2193
2205
  </xsl:if>
2194
2206
  </xsl:if>
2195
2207
  </xsl:template>
@@ -15927,13 +15939,23 @@
15927
15939
  <xsl:param name="letter-spacing" select="'0.15'"/>
15928
15940
  <xsl:if test="string-length($text) &gt; 0">
15929
15941
  <xsl:variable name="char" select="substring($text, 1, 1)"/>
15930
- <fo:inline padding-right="{$letter-spacing}mm">
15931
- <xsl:if test="$char = '®'">
15932
- <xsl:attribute name="font-size">58%</xsl:attribute>
15933
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
15934
- </xsl:if>
15935
- <xsl:value-of select="$char"/>
15936
- </fo:inline>
15942
+ <xsl:choose>
15943
+ <xsl:when test="contains($letter-spacing, 'em') or contains($letter-spacing, 'mm')">
15944
+ <!-- for negative letter spacing (in em) -->
15945
+ <fo:inline letter-spacing="{$letter-spacing}">
15946
+ <xsl:value-of select="$char"/>
15947
+ </fo:inline>
15948
+ </xsl:when>
15949
+ <xsl:otherwise>
15950
+ <fo:inline padding-right="{$letter-spacing}mm">
15951
+ <xsl:if test="$char = '®'">
15952
+ <xsl:attribute name="font-size">58%</xsl:attribute>
15953
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
15954
+ </xsl:if>
15955
+ <xsl:value-of select="$char"/>
15956
+ </fo:inline>
15957
+ </xsl:otherwise>
15958
+ </xsl:choose>
15937
15959
  <xsl:call-template name="add-letter-spacing">
15938
15960
  <xsl:with-param name="text" select="substring($text, 2)"/>
15939
15961
  <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
@@ -2188,8 +2188,20 @@
2188
2188
  <xsl:if test="$docnum != '1'">_<xsl:value-of select="$docnum"/></xsl:if>
2189
2189
  </xsl:variable>
2190
2190
  <xsl:variable name="named_dest_doc" select="normalize-space($named_dest_doc_)"/>
2191
- <xsl:if test="not(key('kid', $named_dest_doc))"> <!-- if element with id '$named_dest_doc' doesn't exist in the document -->
2192
- <xsl:attribute name="named_dest"><xsl:value-of select="normalize-space($named_dest_doc)"/></xsl:attribute>
2191
+ <xsl:variable name="named_dest_unique_">
2192
+ <xsl:choose>
2193
+ <xsl:when test="normalize-space($caption_label) != '' and count(//mn:fmt-name[translate(normalize-space(.//mn:span[@class = 'fmt-caption-label']), ' ()', '') = $caption_label]) &gt; 1">
2194
+ <!-- duplicate caption numbers across clauses (e.g. two "Table 1" in front matter): qualify with the owner element id so fo ids stay unique -->
2195
+ <xsl:value-of select="concat(normalize-space($named_dest_doc), '_', ancestor::*[@id][1]/@id)"/>
2196
+ </xsl:when>
2197
+ <xsl:otherwise>
2198
+ <xsl:value-of select="normalize-space($named_dest_doc)"/>
2199
+ </xsl:otherwise>
2200
+ </xsl:choose>
2201
+ </xsl:variable>
2202
+ <xsl:variable name="named_dest_unique" select="normalize-space($named_dest_unique_)"/>
2203
+ <xsl:if test="$named_dest_unique != '' and not(key('kid', $named_dest_unique))"> <!-- if element with id '$named_dest_unique' doesn't exist in the document -->
2204
+ <xsl:attribute name="named_dest"><xsl:value-of select="$named_dest_unique"/></xsl:attribute>
2193
2205
  </xsl:if>
2194
2206
  </xsl:if>
2195
2207
  </xsl:template>
@@ -15927,13 +15939,23 @@
15927
15939
  <xsl:param name="letter-spacing" select="'0.15'"/>
15928
15940
  <xsl:if test="string-length($text) &gt; 0">
15929
15941
  <xsl:variable name="char" select="substring($text, 1, 1)"/>
15930
- <fo:inline padding-right="{$letter-spacing}mm">
15931
- <xsl:if test="$char = '®'">
15932
- <xsl:attribute name="font-size">58%</xsl:attribute>
15933
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
15934
- </xsl:if>
15935
- <xsl:value-of select="$char"/>
15936
- </fo:inline>
15942
+ <xsl:choose>
15943
+ <xsl:when test="contains($letter-spacing, 'em') or contains($letter-spacing, 'mm')">
15944
+ <!-- for negative letter spacing (in em) -->
15945
+ <fo:inline letter-spacing="{$letter-spacing}">
15946
+ <xsl:value-of select="$char"/>
15947
+ </fo:inline>
15948
+ </xsl:when>
15949
+ <xsl:otherwise>
15950
+ <fo:inline padding-right="{$letter-spacing}mm">
15951
+ <xsl:if test="$char = '®'">
15952
+ <xsl:attribute name="font-size">58%</xsl:attribute>
15953
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
15954
+ </xsl:if>
15955
+ <xsl:value-of select="$char"/>
15956
+ </fo:inline>
15957
+ </xsl:otherwise>
15958
+ </xsl:choose>
15937
15959
  <xsl:call-template name="add-letter-spacing">
15938
15960
  <xsl:with-param name="text" select="substring($text, 2)"/>
15939
15961
  <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iho
3
- VERSION = "1.4.10".freeze
3
+ VERSION = "1.4.11".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.10
4
+ version: 1.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-25 00:00:00.000000000 Z
11
+ date: 2026-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pubid