metanorma-ribose 1.6.9 → 1.6.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/ribose/basicdoc.rng +18 -3
- data/lib/asciidoctor/ribose/isodoc.rng +7 -0
- data/lib/isodoc/ribose/rsd.standard.xsl +92 -8
- data/lib/metanorma/ribose/processor.rb +9 -0
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- metadata +4 -5
- data/lib/metanorma/ribose/fonts_manifest.yaml +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25b2357a2bb9c00be5cf07d097618593f934e024e00624bba8dfeb620745d082
|
4
|
+
data.tar.gz: a15ef2944d344cd69ffd7c3d866649798925de0aa1c3b57041b1eed684e4307f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe83e2e765f0ec8eaaad9496fa3da2451fb6a58773e025fb63a1fc7ac94c3d6de412bc94bde715d2a2da5705cd03b702f2bccf0329faf90d6fe923ab9f6b497f
|
7
|
+
data.tar.gz: 0e4ee8adea90d49fb8d43d719567d98cdedf21048e0d8357a37fa2cfdabe5bc15c38344a98fe9ea5d0cdf9b30d167547700ebdb9536fe952d3b061f8831a134b
|
@@ -729,12 +729,27 @@
|
|
729
729
|
</define>
|
730
730
|
<define name="index">
|
731
731
|
<element name="index">
|
732
|
-
<attribute name="
|
732
|
+
<attribute name="to">
|
733
|
+
<data type="IDREF"/>
|
734
|
+
</attribute>
|
735
|
+
<element name="primary">
|
736
|
+
<oneOrMore>
|
737
|
+
<ref name="PureTextElement"/>
|
738
|
+
</oneOrMore>
|
739
|
+
</element>
|
733
740
|
<optional>
|
734
|
-
<
|
741
|
+
<element name="secondary">
|
742
|
+
<oneOrMore>
|
743
|
+
<ref name="PureTextElement"/>
|
744
|
+
</oneOrMore>
|
745
|
+
</element>
|
735
746
|
</optional>
|
736
747
|
<optional>
|
737
|
-
<
|
748
|
+
<element name="tertiary">
|
749
|
+
<oneOrMore>
|
750
|
+
<ref name="PureTextElement"/>
|
751
|
+
</oneOrMore>
|
752
|
+
</element>
|
738
753
|
</optional>
|
739
754
|
</element>
|
740
755
|
</define>
|
@@ -55,6 +55,13 @@
|
|
55
55
|
<param name="pattern">\i\c*|\c+#\c+</param>
|
56
56
|
</data>
|
57
57
|
</attribute>
|
58
|
+
<optional>
|
59
|
+
<attribute name="to">
|
60
|
+
<data type="string">
|
61
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
62
|
+
</data>
|
63
|
+
</attribute>
|
64
|
+
</optional>
|
58
65
|
<optional>
|
59
66
|
<attribute name="type">
|
60
67
|
<ref name="ReferenceFormat"/>
|
@@ -1285,6 +1285,7 @@
|
|
1285
1285
|
|
1286
1286
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1287
1287
|
|
1288
|
+
|
1288
1289
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1289
1290
|
|
1290
1291
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -2297,7 +2298,9 @@
|
|
2297
2298
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2298
2299
|
<fo:block-container>
|
2299
2300
|
|
2300
|
-
<xsl:
|
2301
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2302
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2303
|
+
</xsl:if>
|
2301
2304
|
|
2302
2305
|
|
2303
2306
|
<xsl:if test="parent::*[local-name() = 'note']">
|
@@ -2312,6 +2315,7 @@
|
|
2312
2315
|
<fo:block-container>
|
2313
2316
|
|
2314
2317
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2318
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2315
2319
|
|
2316
2320
|
|
2317
2321
|
<xsl:variable name="parent" select="local-name(..)"/>
|
@@ -2495,12 +2499,32 @@
|
|
2495
2499
|
</xsl:otherwise>
|
2496
2500
|
</xsl:choose>
|
2497
2501
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
2498
|
-
<xsl:
|
2499
|
-
<xsl:
|
2500
|
-
|
2501
|
-
<xsl:
|
2502
|
-
|
2503
|
-
|
2502
|
+
<xsl:variable name="lengths">
|
2503
|
+
<xsl:for-each select="*[local-name()='dt']">
|
2504
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
2505
|
+
<xsl:variable name="attributes">
|
2506
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
2507
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
2508
|
+
</xsl:variable>
|
2509
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
2510
|
+
</xsl:for-each>
|
2511
|
+
</xsl:variable>
|
2512
|
+
<xsl:variable name="maxLength">
|
2513
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
2514
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
2515
|
+
<xsl:if test="position() = 1">
|
2516
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
2517
|
+
</xsl:if>
|
2518
|
+
</xsl:for-each> -->
|
2519
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
2520
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2521
|
+
<xsl:if test="position() = 1">
|
2522
|
+
<xsl:value-of select="."/>
|
2523
|
+
</xsl:if>
|
2524
|
+
</xsl:for-each>
|
2525
|
+
</xsl:variable>
|
2526
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
2527
|
+
<xsl:value-of select="$maxLength"/>
|
2504
2528
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
2505
2529
|
<xsl:param name="key_iso"/>
|
2506
2530
|
|
@@ -3307,6 +3331,8 @@
|
|
3307
3331
|
<xsl:variable name="bookmark-title_">
|
3308
3332
|
<xsl:call-template name="getLangVersion">
|
3309
3333
|
<xsl:with-param name="lang" select="@lang"/>
|
3334
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
3335
|
+
<xsl:with-param name="title" select="@title-part"/>
|
3310
3336
|
</xsl:call-template>
|
3311
3337
|
</xsl:variable>
|
3312
3338
|
<xsl:choose>
|
@@ -3324,13 +3350,34 @@
|
|
3324
3350
|
</xsl:choose>
|
3325
3351
|
</fo:bookmark-title>
|
3326
3352
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3353
|
+
|
3354
|
+
<xsl:call-template name="insertFigureBookmarks">
|
3355
|
+
<xsl:with-param name="contents" select="contents"/>
|
3356
|
+
</xsl:call-template>
|
3357
|
+
|
3358
|
+
<xsl:call-template name="insertTableBookmarks">
|
3359
|
+
<xsl:with-param name="contents" select="contents"/>
|
3360
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3361
|
+
</xsl:call-template>
|
3362
|
+
|
3327
3363
|
</fo:bookmark>
|
3328
3364
|
|
3329
3365
|
</xsl:for-each>
|
3330
3366
|
</xsl:when>
|
3331
3367
|
<xsl:otherwise>
|
3332
3368
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3369
|
+
|
3333
3370
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3371
|
+
|
3372
|
+
<xsl:call-template name="insertFigureBookmarks">
|
3373
|
+
<xsl:with-param name="contents" select="contents"/>
|
3374
|
+
</xsl:call-template>
|
3375
|
+
|
3376
|
+
<xsl:call-template name="insertTableBookmarks">
|
3377
|
+
<xsl:with-param name="contents" select="contents"/>
|
3378
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3379
|
+
</xsl:call-template>
|
3380
|
+
|
3334
3381
|
</xsl:for-each>
|
3335
3382
|
</xsl:otherwise>
|
3336
3383
|
</xsl:choose>
|
@@ -3349,8 +3396,44 @@
|
|
3349
3396
|
|
3350
3397
|
</fo:bookmark-tree>
|
3351
3398
|
</xsl:if>
|
3399
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
3400
|
+
<xsl:param name="contents"/>
|
3401
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
3402
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
3403
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
3404
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
3405
|
+
<fo:bookmark internal-destination="{@id}">
|
3406
|
+
<fo:bookmark-title>
|
3407
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3408
|
+
</fo:bookmark-title>
|
3409
|
+
</fo:bookmark>
|
3410
|
+
</xsl:for-each>
|
3411
|
+
</fo:bookmark>
|
3412
|
+
</xsl:if>
|
3413
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
3414
|
+
<xsl:param name="contents"/>
|
3415
|
+
<xsl:param name="lang"/>
|
3416
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
3417
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
3418
|
+
<fo:bookmark-title>
|
3419
|
+
<xsl:choose>
|
3420
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
3421
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
3422
|
+
</xsl:choose>
|
3423
|
+
</fo:bookmark-title>
|
3424
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
3425
|
+
<fo:bookmark internal-destination="{@id}">
|
3426
|
+
<fo:bookmark-title>
|
3427
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3428
|
+
</fo:bookmark-title>
|
3429
|
+
</fo:bookmark>
|
3430
|
+
</xsl:for-each>
|
3431
|
+
</fo:bookmark>
|
3432
|
+
</xsl:if>
|
3352
3433
|
</xsl:template><xsl:template name="getLangVersion">
|
3353
3434
|
<xsl:param name="lang"/>
|
3435
|
+
<xsl:param name="doctype" select="''"/>
|
3436
|
+
<xsl:param name="title" select="''"/>
|
3354
3437
|
<xsl:choose>
|
3355
3438
|
<xsl:when test="$lang = 'en'">
|
3356
3439
|
|
@@ -3846,7 +3929,8 @@
|
|
3846
3929
|
<fo:block-container margin-left="0mm">
|
3847
3930
|
|
3848
3931
|
<fo:block xsl:use-attribute-sets="quote-style">
|
3849
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3932
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
3933
|
+
<xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
3850
3934
|
</fo:block>
|
3851
3935
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3852
3936
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -15,6 +15,15 @@ module Metanorma
|
|
15
15
|
)
|
16
16
|
end
|
17
17
|
|
18
|
+
def fonts_manifest
|
19
|
+
{
|
20
|
+
"Source Sans Pro" => nil,
|
21
|
+
"STIX Two Math" => nil,
|
22
|
+
"Source Serif Pro" => nil,
|
23
|
+
"Source Code Pro" => nil,
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
18
27
|
def version
|
19
28
|
"Metanorma::Ribose #{Metanorma::Ribose::VERSION}"
|
20
29
|
end
|
data/metanorma-ribose.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
30
30
|
|
31
|
-
spec.add_dependency 'metanorma-generic', '~> 1.8.
|
31
|
+
spec.add_dependency 'metanorma-generic', '~> 1.8.1'
|
32
32
|
|
33
33
|
spec.add_development_dependency "byebug", "~> 9.1"
|
34
34
|
spec.add_development_dependency "sassc", "2.4.0"
|
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: 1.6.
|
4
|
+
version: 1.6.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-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: 1.8.
|
19
|
+
version: 1.8.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: 1.8.
|
26
|
+
version: 1.8.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -221,7 +221,6 @@ files:
|
|
221
221
|
- lib/isodoc/ribose/xref.rb
|
222
222
|
- lib/metanorma-ribose.rb
|
223
223
|
- lib/metanorma/ribose.rb
|
224
|
-
- lib/metanorma/ribose/fonts_manifest.yaml
|
225
224
|
- lib/metanorma/ribose/processor.rb
|
226
225
|
- lib/metanorma/ribose/version.rb
|
227
226
|
- metanorma-ribose.gemspec
|