metanorma-mpfa 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -991,7 +991,7 @@
991
991
 
992
992
 
993
993
 
994
-
994
+
995
995
  </xsl:attribute-set><xsl:attribute-set name="example-style">
996
996
 
997
997
 
@@ -1057,6 +1057,7 @@
1057
1057
 
1058
1058
 
1059
1059
 
1060
+
1060
1061
  </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1061
1062
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1062
1063
 
@@ -1077,6 +1078,8 @@
1077
1078
 
1078
1079
 
1079
1080
 
1081
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1082
+
1080
1083
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1081
1084
 
1082
1085
 
@@ -1119,6 +1122,7 @@
1119
1122
 
1120
1123
 
1121
1124
 
1125
+
1122
1126
  </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1123
1127
 
1124
1128
 
@@ -1154,10 +1158,12 @@
1154
1158
 
1155
1159
 
1156
1160
 
1161
+
1157
1162
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1158
1163
 
1159
1164
 
1160
1165
 
1166
+
1161
1167
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1162
1168
 
1163
1169
 
@@ -1206,6 +1212,7 @@
1206
1212
 
1207
1213
 
1208
1214
 
1215
+
1209
1216
 
1210
1217
 
1211
1218
 
@@ -1282,6 +1289,8 @@
1282
1289
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
1283
1290
 
1284
1291
 
1292
+ </xsl:attribute-set><xsl:attribute-set name="list-style">
1293
+
1285
1294
  </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
1286
1295
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1287
1296
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -1335,11 +1344,11 @@
1335
1344
  <xsl:variable name="table">
1336
1345
 
1337
1346
  <xsl:variable name="simple-table">
1338
- <xsl:call-template name="getSimpleTable"/>
1347
+ <xsl:call-template name="getSimpleTable"/>
1339
1348
  </xsl:variable>
1340
1349
 
1341
1350
  <!-- <xsl:if test="$namespace = 'bipm'">
1342
- <fo:block>&#xA0;</fo:block>
1351
+ <fo:block>&#xA0;</fo:block>
1343
1352
  </xsl:if> -->
1344
1353
 
1345
1354
  <!-- $namespace = 'iso' or -->
@@ -1448,6 +1457,7 @@
1448
1457
  <attribute name="border-bottom">2pt solid black</attribute>
1449
1458
 
1450
1459
 
1460
+
1451
1461
  </xsl:variable>
1452
1462
 
1453
1463
 
@@ -1589,6 +1599,9 @@
1589
1599
  <fo:block xsl:use-attribute-sets="table-name-style">
1590
1600
 
1591
1601
 
1602
+
1603
+
1604
+
1592
1605
  <xsl:choose>
1593
1606
  <xsl:when test="$continued = 'true'">
1594
1607
  <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
@@ -1736,6 +1749,7 @@
1736
1749
  <!-- font-weight="bold" -->
1737
1750
  <fo:table-header>
1738
1751
 
1752
+
1739
1753
  <xsl:apply-templates/>
1740
1754
  </fo:table-header>
1741
1755
  </xsl:template><xsl:template name="table-header-title">
@@ -1981,6 +1995,10 @@
1981
1995
 
1982
1996
 
1983
1997
 
1998
+
1999
+
2000
+
2001
+
1984
2002
  <!-- <xsl:if test="$namespace = 'bipm'">
1985
2003
  <xsl:attribute name="height">8mm</xsl:attribute>
1986
2004
  </xsl:if> -->
@@ -2069,6 +2087,9 @@
2069
2087
 
2070
2088
 
2071
2089
 
2090
+
2091
+
2092
+
2072
2093
  <xsl:if test=".//*[local-name() = 'table']">
2073
2094
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2074
2095
  </xsl:if>
@@ -2282,6 +2303,7 @@
2282
2303
 
2283
2304
 
2284
2305
 
2306
+
2285
2307
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2286
2308
 
2287
2309
 
@@ -2584,6 +2606,7 @@
2584
2606
 
2585
2607
  <fo:table-row>
2586
2608
 
2609
+
2587
2610
  <fo:table-cell>
2588
2611
 
2589
2612
  <fo:block margin-top="6pt">
@@ -2599,6 +2622,7 @@
2599
2622
 
2600
2623
 
2601
2624
 
2625
+
2602
2626
  <xsl:apply-templates/>
2603
2627
  <!-- <xsl:if test="$namespace = 'gb'">
2604
2628
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -3146,7 +3170,15 @@
3146
3170
  <xsl:copy>
3147
3171
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
3148
3172
  </xsl:copy>
3149
- <mathml:mspace width="0.5ex"/>
3173
+ <xsl:choose>
3174
+ <!-- if in msub, then don't add space -->
3175
+ <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
3176
+ <!-- if next char in digit, don't add space -->
3177
+ <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
3178
+ <xsl:otherwise>
3179
+ <mathml:mspace width="0.5ex"/>
3180
+ </xsl:otherwise>
3181
+ </xsl:choose>
3150
3182
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3151
3183
  <xsl:variable name="target">
3152
3184
  <xsl:choose>
@@ -3170,6 +3202,7 @@
3170
3202
  </xsl:variable>
3171
3203
  <fo:inline xsl:use-attribute-sets="link-style">
3172
3204
 
3205
+
3173
3206
  <xsl:choose>
3174
3207
  <xsl:when test="$target_text = ''">
3175
3208
  <xsl:apply-templates/>
@@ -3321,6 +3354,7 @@
3321
3354
  </xsl:choose>
3322
3355
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
3323
3356
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3357
+
3324
3358
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
3325
3359
 
3326
3360
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
@@ -3394,6 +3428,7 @@
3394
3428
  </xsl:call-template>
3395
3429
 
3396
3430
  <fo:block>
3431
+
3397
3432
  <xsl:apply-templates/>
3398
3433
  </fo:block>
3399
3434
  <xsl:call-template name="fn_display_figure"/>
@@ -3678,6 +3713,7 @@
3678
3713
  <xsl:if test="normalize-space() != ''">
3679
3714
  <fo:block xsl:use-attribute-sets="figure-name-style">
3680
3715
 
3716
+
3681
3717
  <xsl:apply-templates/>
3682
3718
  </fo:block>
3683
3719
  </xsl:if>
@@ -3758,6 +3794,7 @@
3758
3794
 
3759
3795
  <fo:block-container margin-left="0mm">
3760
3796
  <xsl:copy-of select="@id"/>
3797
+
3761
3798
  <xsl:if test="parent::*[local-name() = 'note']">
3762
3799
  <xsl:attribute name="margin-left">
3763
3800
  <xsl:choose>
@@ -3768,7 +3805,9 @@
3768
3805
 
3769
3806
  </xsl:if>
3770
3807
  <fo:block-container margin-left="0mm">
3771
-
3808
+
3809
+
3810
+
3772
3811
  <fo:block xsl:use-attribute-sets="sourcecode-style">
3773
3812
  <xsl:variable name="_font-size">
3774
3813
 
@@ -3797,10 +3836,14 @@
3797
3836
  </xsl:choose>
3798
3837
  </xsl:attribute>
3799
3838
  </xsl:if>
3800
- <xsl:apply-templates/>
3801
- </fo:block>
3839
+
3840
+ <xsl:apply-templates/>
3841
+ </fo:block>
3842
+
3843
+
3802
3844
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3803
3845
 
3846
+
3804
3847
  </fo:block-container>
3805
3848
  </fo:block-container>
3806
3849
  </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -4142,6 +4185,8 @@
4142
4185
 
4143
4186
 
4144
4187
 
4188
+
4189
+
4145
4190
  <xsl:call-template name="getTitle">
4146
4191
  <xsl:with-param name="name" select="'title-source'"/>
4147
4192
  </xsl:call-template>
@@ -4365,6 +4410,7 @@
4365
4410
  <xsl:call-template name="setId"/>
4366
4411
 
4367
4412
 
4413
+
4368
4414
  <xsl:apply-templates/>
4369
4415
  </fo:block>
4370
4416
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
@@ -4611,17 +4657,17 @@
4611
4657
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
4612
4658
  <xsl:choose>
4613
4659
  <xsl:when test="normalize-space($_doc_ident) != ''">
4614
- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
4660
+ <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
4615
4661
  <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
4616
4662
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4617
- </xsl:if>
4663
+ </xsl:if> -->
4618
4664
  <xsl:value-of select="$_doc_ident"/>
4619
4665
  </xsl:when>
4620
4666
  <xsl:otherwise>
4621
- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
4667
+ <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
4622
4668
  <xsl:if test="$type != ''">
4623
4669
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4624
- </xsl:if>
4670
+ </xsl:if> -->
4625
4671
  <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
4626
4672
  </xsl:otherwise>
4627
4673
  </xsl:choose>
@@ -5120,4 +5166,14 @@
5120
5166
  <xsl:value-of select="$align"/>
5121
5167
  </xsl:when>
5122
5168
  </xsl:choose>
5169
+ </xsl:template><xsl:template name="setTextAlignment">
5170
+ <xsl:param name="default">left</xsl:param>
5171
+ <xsl:attribute name="text-align">
5172
+ <xsl:choose>
5173
+ <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
5174
+ <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
5175
+ <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
5176
+ <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
5177
+ </xsl:choose>
5178
+ </xsl:attribute>
5123
5179
  </xsl:template></xsl:stylesheet>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module MPFA
3
- VERSION = "0.6.4".freeze
3
+ VERSION = "0.6.5".freeze
4
4
  end
5
5
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.bindir = "exe"
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
- spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
29
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
30
30
 
31
31
  spec.add_dependency "htmlentities", "~> 4.3.4"
32
32
  spec.add_dependency "isodoc", "~> 1.6.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-mpfa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-07 00:00:00.000000000 Z
11
+ date: 2021-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -290,7 +290,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
290
290
  requirements:
291
291
  - - ">="
292
292
  - !ruby/object:Gem::Version
293
- version: 2.4.0
293
+ version: 2.5.0
294
294
  required_rubygems_version: !ruby/object:Gem::Requirement
295
295
  requirements:
296
296
  - - ">="