metanorma-ribose 2.2.13 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ribose/html/htmlstyle.css +2 -2
- data/lib/isodoc/ribose/html/htmlstyle.scss +2 -2
- data/lib/isodoc/ribose/html_convert.rb +0 -10
- data/lib/isodoc/ribose/presentation_xml_convert.rb +2 -0
- data/lib/isodoc/ribose/ribose.standard.xsl +70 -28
- data/lib/isodoc/ribose/xref.rb +4 -9
- data/lib/metanorma/ribose/isodoc.rng +29 -4
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b0e21983161b3c3054a720ba0c6cec67e16f4019f105bf7a3bd744809decdcf
|
4
|
+
data.tar.gz: f068cf5635d32d5f810197a5ce89bef28cd90c00a0b6b92a77fff703d4919363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8c76b2af573a73fc7637d1d94a67733c17bdd8e2eb554c66764b4445edeedee61793b9f5dc02bfd15cd5625568c0d63032a2be066885b063c217f66ff984605
|
7
|
+
data.tar.gz: 0edf7d93d97578f10f34b2817873e27e8609e4dc5cb05e33ce93c8fcdaba39ae927979a3d4abeeba52c6abf8be9c2d4e943b06f8633fed671b74702c41b45747
|
@@ -681,7 +681,7 @@ ol {
|
|
681
681
|
ul li {
|
682
682
|
list-style: none; }
|
683
683
|
|
684
|
-
ul > li
|
684
|
+
ul > li::before {
|
685
685
|
content: "\2014";
|
686
686
|
display: inline-block;
|
687
687
|
width: 1em;
|
@@ -705,7 +705,7 @@ ol ul > li:first-child {
|
|
705
705
|
#toc-list li {
|
706
706
|
list-style-type: none; }
|
707
707
|
|
708
|
-
#toc li
|
708
|
+
#toc li::before {
|
709
709
|
content: " ";
|
710
710
|
display: none; }
|
711
711
|
|
@@ -296,7 +296,7 @@ ul li {
|
|
296
296
|
list-style: none;
|
297
297
|
}
|
298
298
|
|
299
|
-
ul>li
|
299
|
+
ul>li::before {
|
300
300
|
content: "\2014";
|
301
301
|
display: inline-block;
|
302
302
|
width: 1em;
|
@@ -326,7 +326,7 @@ ol ul > li:first-child {
|
|
326
326
|
list-style-type: none;
|
327
327
|
}
|
328
328
|
|
329
|
-
#toc li
|
329
|
+
#toc li::before {
|
330
330
|
content: " ";
|
331
331
|
display: none;
|
332
332
|
}
|
@@ -13,16 +13,6 @@ module IsoDoc
|
|
13
13
|
Metanorma::Ribose.configuration
|
14
14
|
end
|
15
15
|
|
16
|
-
def make_body3(body, docxml)
|
17
|
-
body.div class: "main-section" do |div3|
|
18
|
-
boilerplate docxml, div3
|
19
|
-
front docxml, div3
|
20
|
-
middle docxml, div3
|
21
|
-
footnotes div3
|
22
|
-
comments div3
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
16
|
include BaseConvert
|
27
17
|
include Init
|
28
18
|
end
|
@@ -1526,11 +1526,26 @@
|
|
1526
1526
|
<xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
|
1527
1527
|
</xsl:if>
|
1528
1528
|
|
1529
|
-
<xsl:
|
1529
|
+
<xsl:variable name="font_family" select="."/>
|
1530
1530
|
|
1531
|
-
<xsl:
|
1532
|
-
<xsl:
|
1533
|
-
|
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
|
-
|
4146
|
+
<fo:block xsl:use-attribute-sets="table-note-style">
|
4132
4147
|
|
4133
|
-
|
4148
|
+
<xsl:call-template name="refine_table-note-style"/>
|
4134
4149
|
|
4135
|
-
|
4136
|
-
|
4150
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
4151
|
+
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
4137
4152
|
|
4138
|
-
|
4153
|
+
<xsl:call-template name="refine_table-note-name-style"/>
|
4139
4154
|
|
4140
|
-
|
4155
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
4141
4156
|
|
4142
|
-
|
4157
|
+
</fo:inline>
|
4143
4158
|
|
4144
|
-
|
4145
|
-
|
4159
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
4160
|
+
</fo:block>
|
4146
4161
|
|
4147
4162
|
</xsl:template> <!-- table/note -->
|
4148
4163
|
|
@@ -5210,6 +5225,9 @@
|
|
5210
5225
|
<!-- END Definition List -->
|
5211
5226
|
<!-- ===================== -->
|
5212
5227
|
|
5228
|
+
<!-- default: ignore title in sections/p -->
|
5229
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
|
5230
|
+
|
5213
5231
|
<!-- ========================= -->
|
5214
5232
|
<!-- Rich text formatting -->
|
5215
5233
|
<!-- ========================= -->
|
@@ -7269,8 +7287,12 @@
|
|
7269
7287
|
<xsl:variable name="isAdded" select="../@added"/>
|
7270
7288
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
7271
7289
|
<xsl:choose>
|
7272
|
-
<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']">
|
7273
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>
|
7274
7296
|
<xsl:variable name="src">
|
7275
7297
|
<xsl:call-template name="image_src"/>
|
7276
7298
|
</xsl:variable>
|
@@ -7303,25 +7325,45 @@
|
|
7303
7325
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
7304
7326
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
7305
7327
|
|
7306
|
-
<xsl:
|
7307
|
-
<xsl:
|
7308
|
-
<xsl:
|
7309
|
-
|
7310
|
-
|
7311
|
-
</xsl:variable>
|
7328
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
7329
|
+
<xsl:attribute name="width">
|
7330
|
+
<xsl:value-of select="@width"/>
|
7331
|
+
</xsl:attribute>
|
7332
|
+
</xsl:if>
|
7312
7333
|
|
7313
|
-
<xsl:
|
7334
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
7335
|
+
<xsl:attribute name="height">
|
7336
|
+
<xsl:value-of select="@height"/>
|
7337
|
+
</xsl:attribute>
|
7338
|
+
</xsl:if>
|
7314
7339
|
|
7315
|
-
|
7340
|
+
<xsl:choose>
|
7341
|
+
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
7342
|
+
<xsl:attribute name="scaling">non-uniform</xsl:attribute>
|
7343
|
+
</xsl:when>
|
7344
|
+
<xsl:otherwise>
|
7316
7345
|
|
7317
|
-
|
7346
|
+
<xsl:variable name="img_src">
|
7347
|
+
<xsl:choose>
|
7348
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
7349
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
7350
|
+
</xsl:choose>
|
7351
|
+
</xsl:variable>
|
7318
7352
|
|
7319
|
-
|
7320
|
-
<xsl:if test="number($scale) < 100">
|
7353
|
+
<xsl:variable name="image_width_effective">
|
7321
7354
|
|
7322
|
-
|
7355
|
+
<xsl:value-of select="$width_effective"/>
|
7323
7356
|
|
7324
|
-
|
7357
|
+
</xsl:variable>
|
7358
|
+
|
7359
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
7360
|
+
<xsl:if test="number($scale) < 100">
|
7361
|
+
|
7362
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
7363
|
+
|
7364
|
+
</xsl:if>
|
7365
|
+
</xsl:otherwise>
|
7366
|
+
</xsl:choose>
|
7325
7367
|
|
7326
7368
|
</xsl:if>
|
7327
7369
|
|
@@ -10975,7 +11017,7 @@
|
|
10975
11017
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
10976
11018
|
<xsl:apply-templates mode="update_xml_step1"/>
|
10977
11019
|
</xsl:template>
|
10978
|
-
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
11020
|
+
<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">
|
10979
11021
|
<xsl:copy>
|
10980
11022
|
<xsl:copy-of select="@*"/>
|
10981
11023
|
<xsl:apply-templates mode="update_xml_step1"/>
|
data/lib/isodoc/ribose/xref.rb
CHANGED
@@ -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
|
-
|
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.
|
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
|
-
<
|
196
|
-
<
|
197
|
-
|
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"/>
|
data/metanorma-ribose.gemspec
CHANGED
@@ -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.
|
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.
|
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-
|
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.
|
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.
|
26
|
+
version: 2.5.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|