metanorma-csa 2.2.13 → 2.3.1

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: e185c17483eec127fe20cfd1b0ea0e4c9af95e42cd8da478c52a8c1852c486ce
4
- data.tar.gz: 2336dd2fef9192488767b301b5a5a02b7808adfa51cf044bc8993d27476fc0ed
3
+ metadata.gz: 661139013d4b25cf8fa87695220331515caa028fb0a98b625cdf1782dd03fc2e
4
+ data.tar.gz: 7ecf7a7d7f34c2d3a36ff2ad171225349ae600263e8b897c5bca97254a9fd775
5
5
  SHA512:
6
- metadata.gz: 10eb7a7144c6321fb40a157fb867d9d2e8c637ae7bc06b13cf04425b024caca863562055235c7a310cd921bebe43e833fc081b09dbf4b1bc428b5927a9c4a93f
7
- data.tar.gz: 64f0601f7e26dfb7fd6e4825c0a8ad9bf40b27997720442c3876225219c00c457c301d8745879d7e920eaf3966af76fbcfda93e71d1966a275b8da99f39e7f72
6
+ metadata.gz: c877ccf93488311ce8030977543667f7a9bf26116aa5ca01b786d7c9cfe3d950a151624c3b713db9558be187ec829c2f7dd7e6dd940f30e4abf54885df454c31
7
+ data.tar.gz: 194b74741b17490735ebafb3addfaec4acf7cc3ce3f7387c3ecc224ac0523ee92ee56aa6b36095d92ade4a6f304050571bd0b76431345397f59959fbae006275
@@ -891,11 +891,26 @@
891
891
  <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
892
892
  </xsl:if>
893
893
 
894
- <xsl:value-of select="."/>
894
+ <xsl:variable name="font_family" select="."/>
895
895
 
896
- <xsl:if test="$additional_fonts != ''">
897
- <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
898
- </xsl:if>
896
+ <xsl:choose>
897
+ <xsl:when test="$additional_fonts = ''">
898
+ <xsl:value-of select="$font_family"/>
899
+ </xsl:when>
900
+ <xsl:otherwise> <!-- $additional_fonts != '' -->
901
+ <xsl:choose>
902
+ <xsl:when test="contains($font_family, ',')">
903
+ <xsl:value-of select="substring-before($font_family, ',')"/>
904
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
905
+ <xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
906
+ </xsl:when>
907
+ <xsl:otherwise>
908
+ <xsl:value-of select="$font_family"/>
909
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
910
+ </xsl:otherwise>
911
+ </xsl:choose>
912
+ </xsl:otherwise>
913
+ </xsl:choose>
899
914
  </xsl:attribute>
900
915
  </xsl:when>
901
916
  <xsl:otherwise>
@@ -3380,21 +3395,21 @@
3380
3395
 
3381
3396
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
3382
3397
 
3383
- <fo:block xsl:use-attribute-sets="table-note-style">
3398
+ <fo:block xsl:use-attribute-sets="table-note-style">
3384
3399
 
3385
- <xsl:call-template name="refine_table-note-style"/>
3400
+ <xsl:call-template name="refine_table-note-style"/>
3386
3401
 
3387
- <!-- Table's note/example name (NOTE, for example) -->
3388
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
3402
+ <!-- Table's note/example name (NOTE, for example) -->
3403
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
3389
3404
 
3390
- <xsl:call-template name="refine_table-note-name-style"/>
3405
+ <xsl:call-template name="refine_table-note-name-style"/>
3391
3406
 
3392
- <xsl:apply-templates select="*[local-name() = 'name']"/>
3407
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3393
3408
 
3394
- </fo:inline>
3409
+ </fo:inline>
3395
3410
 
3396
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3397
- </fo:block>
3411
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3412
+ </fo:block>
3398
3413
 
3399
3414
  </xsl:template> <!-- table/note -->
3400
3415
 
@@ -4459,6 +4474,9 @@
4459
4474
  <!-- END Definition List -->
4460
4475
  <!-- ===================== -->
4461
4476
 
4477
+ <!-- default: ignore title in sections/p -->
4478
+ <xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
4479
+
4462
4480
  <!-- ========================= -->
4463
4481
  <!-- Rich text formatting -->
4464
4482
  <!-- ========================= -->
@@ -6509,8 +6527,12 @@
6509
6527
  <xsl:variable name="isAdded" select="../@added"/>
6510
6528
  <xsl:variable name="isDeleted" select="../@deleted"/>
6511
6529
  <xsl:choose>
6512
- <xsl:when test="ancestor::*[local-name() = 'title']">
6530
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
6513
6531
  <fo:inline padding-left="1mm" padding-right="1mm">
6532
+ <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
6533
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
6534
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
6535
+ </xsl:if>
6514
6536
  <xsl:variable name="src">
6515
6537
  <xsl:call-template name="image_src"/>
6516
6538
  </xsl:variable>
@@ -6543,25 +6565,45 @@
6543
6565
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
6544
6566
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
6545
6567
 
6546
- <xsl:variable name="img_src">
6547
- <xsl:choose>
6548
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
6549
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
6550
- </xsl:choose>
6551
- </xsl:variable>
6568
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
6569
+ <xsl:attribute name="width">
6570
+ <xsl:value-of select="@width"/>
6571
+ </xsl:attribute>
6572
+ </xsl:if>
6552
6573
 
6553
- <xsl:variable name="image_width_effective">
6574
+ <xsl:if test="@height != '' and @height != 'auto'">
6575
+ <xsl:attribute name="height">
6576
+ <xsl:value-of select="@height"/>
6577
+ </xsl:attribute>
6578
+ </xsl:if>
6554
6579
 
6555
- <xsl:value-of select="$width_effective"/>
6580
+ <xsl:choose>
6581
+ <xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
6582
+ <xsl:attribute name="scaling">non-uniform</xsl:attribute>
6583
+ </xsl:when>
6584
+ <xsl:otherwise>
6556
6585
 
6557
- </xsl:variable>
6586
+ <xsl:variable name="img_src">
6587
+ <xsl:choose>
6588
+ <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
6589
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
6590
+ </xsl:choose>
6591
+ </xsl:variable>
6558
6592
 
6559
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
6560
- <xsl:if test="number($scale) &lt; 100">
6593
+ <xsl:variable name="image_width_effective">
6561
6594
 
6562
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
6595
+ <xsl:value-of select="$width_effective"/>
6563
6596
 
6564
- </xsl:if>
6597
+ </xsl:variable>
6598
+
6599
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
6600
+ <xsl:if test="number($scale) &lt; 100">
6601
+
6602
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
6603
+
6604
+ </xsl:if>
6605
+ </xsl:otherwise>
6606
+ </xsl:choose>
6565
6607
 
6566
6608
  </xsl:if>
6567
6609
 
@@ -10193,7 +10235,7 @@
10193
10235
  <xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
10194
10236
  <xsl:apply-templates mode="update_xml_step1"/>
10195
10237
  </xsl:template>
10196
- <xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
10238
+ <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">
10197
10239
  <xsl:copy>
10198
10240
  <xsl:copy-of select="@*"/>
10199
10241
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -586,7 +586,7 @@ h3, .h3 {
586
586
  font-size: 1.5em; }
587
587
 
588
588
  /*
589
- span[id^="toc"]:after {
589
+ span[id^="toc"]::after {
590
590
  float: left;
591
591
  padding-right: 4px;
592
592
  margin-left: -20px;
@@ -1112,7 +1112,7 @@ To top button
1112
1112
  color: #4D7EA5;
1113
1113
  box-shadow: none; }
1114
1114
 
1115
- nav h1:hover a:after {
1115
+ nav h1:hover a::after {
1116
1116
  display: none; }
1117
1117
 
1118
1118
  .document-stage-band p {
@@ -220,7 +220,7 @@ h3,.h3 {
220
220
  font-size: 1.5em;
221
221
  }
222
222
  /*
223
- span[id^="toc"]:after {
223
+ span[id^="toc"]::after {
224
224
  float: left;
225
225
  padding-right: 4px;
226
226
  margin-left: -20px;
@@ -755,7 +755,7 @@ To top button
755
755
  }
756
756
  }
757
757
 
758
- nav h1:hover a:after {
758
+ nav h1:hover a::after {
759
759
  display: none;
760
760
  }
761
761
 
@@ -13,6 +13,8 @@ module IsoDoc
13
13
  prefix_name(elem, "<br/>", lbl, "title")
14
14
  end
15
15
 
16
+ def middle_title(docxml); end
17
+
16
18
  include Init
17
19
  end
18
20
  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.2 -->
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">
@@ -192,9 +192,11 @@
192
192
  </attribute>
193
193
  </optional>
194
194
  <attribute name="citeas"/>
195
- <attribute name="type">
196
- <ref name="ReferenceFormat"/>
197
- </attribute>
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>
@@ -2046,6 +2068,9 @@
2046
2068
  </define>
2047
2069
  <define name="termdefinition">
2048
2070
  <element name="definition">
2071
+ <optional>
2072
+ <attribute name="type"/>
2073
+ </optional>
2049
2074
  <choice>
2050
2075
  <ref name="verbaldefinition"/>
2051
2076
  <ref name="nonverbalrep"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csa
3
- VERSION = "2.2.13".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.4.1"
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-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.13
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-07-24 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.4.1
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.4.1
26
+ version: 2.5.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement