metanorma-ribose 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46ea5eea884d1f312eb1d61021968e5f52c9dfa73e2abce1bb18c08851484436
4
- data.tar.gz: c9b45439c5ab9fd0afe4cf7ad68585a7a6f05630841055f349c4a3e87d75a26d
3
+ metadata.gz: 2b0e21983161b3c3054a720ba0c6cec67e16f4019f105bf7a3bd744809decdcf
4
+ data.tar.gz: f068cf5635d32d5f810197a5ce89bef28cd90c00a0b6b92a77fff703d4919363
5
5
  SHA512:
6
- metadata.gz: 79d78a621f1a379df14692eaa491726c4ed4750d794fcb379c711b198c40599dab55a26e32e8cb545013211ab96fd796bc790fb2346dfddb42ff2a99519e3bac
7
- data.tar.gz: 54b348ae16bff0db1922456350040d073689be99619c4927bc364dd36918ec4a0e27b12f7215e4ac7abcbd885a0ee45f357bbb45df16cdec41248fcabad2a175
6
+ metadata.gz: f8c76b2af573a73fc7637d1d94a67733c17bdd8e2eb554c66764b4445edeedee61793b9f5dc02bfd15cd5625568c0d63032a2be066885b063c217f66ff984605
7
+ data.tar.gz: 0edf7d93d97578f10f34b2817873e27e8609e4dc5cb05e33ce93c8fcdaba39ae927979a3d4abeeba52c6abf8be9c2d4e943b06f8633fed671b74702c41b45747
@@ -1526,11 +1526,26 @@
1526
1526
  <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1527
1527
  </xsl:if>
1528
1528
 
1529
- <xsl:value-of select="."/>
1529
+ <xsl:variable name="font_family" select="."/>
1530
1530
 
1531
- <xsl:if test="$additional_fonts != ''">
1532
- <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1533
- </xsl:if>
1531
+ <xsl:choose>
1532
+ <xsl:when test="$additional_fonts = ''">
1533
+ <xsl:value-of select="$font_family"/>
1534
+ </xsl:when>
1535
+ <xsl:otherwise> <!-- $additional_fonts != '' -->
1536
+ <xsl:choose>
1537
+ <xsl:when test="contains($font_family, ',')">
1538
+ <xsl:value-of select="substring-before($font_family, ',')"/>
1539
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1540
+ <xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
1541
+ </xsl:when>
1542
+ <xsl:otherwise>
1543
+ <xsl:value-of select="$font_family"/>
1544
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1545
+ </xsl:otherwise>
1546
+ </xsl:choose>
1547
+ </xsl:otherwise>
1548
+ </xsl:choose>
1534
1549
  </xsl:attribute>
1535
1550
  </xsl:when>
1536
1551
  <xsl:otherwise>
@@ -4128,21 +4143,21 @@
4128
4143
 
4129
4144
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4130
4145
 
4131
- <fo:block xsl:use-attribute-sets="table-note-style">
4146
+ <fo:block xsl:use-attribute-sets="table-note-style">
4132
4147
 
4133
- <xsl:call-template name="refine_table-note-style"/>
4148
+ <xsl:call-template name="refine_table-note-style"/>
4134
4149
 
4135
- <!-- Table's note/example name (NOTE, for example) -->
4136
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
4150
+ <!-- Table's note/example name (NOTE, for example) -->
4151
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4137
4152
 
4138
- <xsl:call-template name="refine_table-note-name-style"/>
4153
+ <xsl:call-template name="refine_table-note-name-style"/>
4139
4154
 
4140
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4155
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4141
4156
 
4142
- </fo:inline>
4157
+ </fo:inline>
4143
4158
 
4144
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4145
- </fo:block>
4159
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4160
+ </fo:block>
4146
4161
 
4147
4162
  </xsl:template> <!-- table/note -->
4148
4163
 
@@ -7272,8 +7287,12 @@
7272
7287
  <xsl:variable name="isAdded" select="../@added"/>
7273
7288
  <xsl:variable name="isDeleted" select="../@deleted"/>
7274
7289
  <xsl:choose>
7275
- <xsl:when test="ancestor::*[local-name() = 'title']">
7290
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7276
7291
  <fo:inline padding-left="1mm" padding-right="1mm">
7292
+ <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7293
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
7294
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
7295
+ </xsl:if>
7277
7296
  <xsl:variable name="src">
7278
7297
  <xsl:call-template name="image_src"/>
7279
7298
  </xsl:variable>
@@ -7306,7 +7325,7 @@
7306
7325
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7307
7326
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7308
7327
 
7309
- <xsl:if test="@width != '' and @width != 'auto'">
7328
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7310
7329
  <xsl:attribute name="width">
7311
7330
  <xsl:value-of select="@width"/>
7312
7331
  </xsl:attribute>
@@ -14,9 +14,6 @@ module IsoDoc
14
14
  end
15
15
 
16
16
  def initial_anchor_names(doc)
17
- if blank?(@parse_settings) || @parse_settings[:clauses]
18
- preface_names(doc.at(ns("//executivesummary")))
19
- end
20
17
  super
21
18
  if blank?(@parse_settings) || @parse_settings[:clauses]
22
19
  introduction_names(doc.at(ns("//introduction")))
@@ -24,7 +21,7 @@ module IsoDoc
24
21
  if blank?(@parse_settings)
25
22
  sequential_asset_names(
26
23
  doc.xpath(
27
- ns("//preface/abstract | //foreword | //introduction | "\
24
+ ns("//preface/abstract | //foreword | //introduction | " \
28
25
  "//preface/clause | //acknowledgements | //executivesummary"),
29
26
  ),
30
27
  )
@@ -36,7 +33,7 @@ module IsoDoc
36
33
  { label: num, level: level, xref: num }
37
34
  # subclauses are not prefixed with "Clause"
38
35
  i = Counter.new
39
- clause.xpath(ns("./clause | ./terms | ./term | ./definitions | "\
36
+ clause.xpath(ns("./clause | ./terms | ./term | ./definitions | " \
40
37
  "./references")).each do |c|
41
38
  i.increment(c)
42
39
  section_names1(c, "#{num}.#{i.print}", level + 1)
@@ -45,15 +42,13 @@ module IsoDoc
45
42
 
46
43
  # we can reference 0-number clauses in introduction
47
44
  def introduction_names(clause)
48
- return if clause.nil?
49
-
45
+ clause.nil? and return
50
46
  clause.at(ns("./clause")) and
51
47
  @anchors[clause["id"]] = { label: "0", level: 1, type: "clause",
52
48
  xref: clause.at(ns("./title"))&.text }
53
49
  i = Counter.new
54
50
  clause.xpath(ns("./clause")).each do |c|
55
- i.increment(c)
56
- section_names1(c, "0.#{i.print}", 2)
51
+ section_names1(c, "0.#{i.increment(c).print}", 2)
57
52
  end
58
53
  end
59
54
  end
@@ -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.3 -->
20
+ <!-- VERSION v1.2.4 -->
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">
@@ -2068,6 +2068,9 @@
2068
2068
  </define>
2069
2069
  <define name="termdefinition">
2070
2070
  <element name="definition">
2071
+ <optional>
2072
+ <attribute name="type"/>
2073
+ </optional>
2071
2074
  <choice>
2072
2075
  <ref name="verbaldefinition"/>
2073
2076
  <ref name="nonverbalrep"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.3.0".freeze
3
+ VERSION = "2.3.1".freeze
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
31
31
 
32
- spec.add_dependency "metanorma-generic", "~> 2.5.0"
32
+ spec.add_dependency "metanorma-generic", "~> 2.5.1"
33
33
 
34
34
  spec.add_development_dependency "debug"
35
35
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
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-08-07 00:00:00.000000000 Z
11
+ date: 2023-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.5.0
19
+ version: 2.5.1
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.5.0
26
+ version: 2.5.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement