metanorma-cc 1.6.2 → 1.6.3
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 +4 -4
- data/lib/asciidoctor/cc/basicdoc.rng +18 -3
- data/lib/asciidoctor/cc/isodoc.rng +7 -0
- data/lib/isodoc/cc/csd.standard.xsl +92 -8
- data/lib/metanorma/cc/processor.rb +10 -0
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.gemspec +1 -1
- metadata +4 -5
- data/lib/metanorma/cc/fonts_manifest.yaml +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ccf08dec13e54c9bda2492e45448c05806a6ec2423313fec4d665ea0e94c1850
|
|
4
|
+
data.tar.gz: 970449ff10bd637add6afc4b50fcf09a93da7306709e0b24063dc4a3222f9d5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7878f144abf9849a3e87c7deb39a1a69abdac68b5e6f8d8d1d39ed211ba1c2ccf697fc901a33f5a20d709f193522bfcddee12e86df6c08e18a02e77ef406a81
|
|
7
|
+
data.tar.gz: f486c99a5fb4684c26d140051b33c6a62b3e46818955ae574663f880dc1d48cde0673cd7c5844daa4765f8b6f474a9db495c8ced2b95d63026539b5fe2ad8c07
|
|
@@ -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"/>
|
|
@@ -1182,6 +1182,7 @@
|
|
|
1182
1182
|
|
|
1183
1183
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
|
1184
1184
|
|
|
1185
|
+
|
|
1185
1186
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
|
1186
1187
|
|
|
1187
1188
|
|
|
@@ -2192,7 +2193,9 @@
|
|
|
2192
2193
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
|
2193
2194
|
<fo:block-container>
|
|
2194
2195
|
|
|
2195
|
-
<xsl:
|
|
2196
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
|
2197
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
2198
|
+
</xsl:if>
|
|
2196
2199
|
|
|
2197
2200
|
|
|
2198
2201
|
<xsl:if test="parent::*[local-name() = 'note']">
|
|
@@ -2207,6 +2210,7 @@
|
|
|
2207
2210
|
<fo:block-container>
|
|
2208
2211
|
|
|
2209
2212
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
2213
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
2210
2214
|
|
|
2211
2215
|
|
|
2212
2216
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
@@ -2390,12 +2394,32 @@
|
|
|
2390
2394
|
</xsl:otherwise>
|
|
2391
2395
|
</xsl:choose>
|
|
2392
2396
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
|
2393
|
-
<xsl:
|
|
2394
|
-
<xsl:
|
|
2395
|
-
|
|
2396
|
-
<xsl:
|
|
2397
|
-
|
|
2398
|
-
|
|
2397
|
+
<xsl:variable name="lengths">
|
|
2398
|
+
<xsl:for-each select="*[local-name()='dt']">
|
|
2399
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
|
2400
|
+
<xsl:variable name="attributes">
|
|
2401
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
|
2402
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
|
2403
|
+
</xsl:variable>
|
|
2404
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
|
2405
|
+
</xsl:for-each>
|
|
2406
|
+
</xsl:variable>
|
|
2407
|
+
<xsl:variable name="maxLength">
|
|
2408
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
|
2409
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
|
2410
|
+
<xsl:if test="position() = 1">
|
|
2411
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
|
2412
|
+
</xsl:if>
|
|
2413
|
+
</xsl:for-each> -->
|
|
2414
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
|
2415
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
|
2416
|
+
<xsl:if test="position() = 1">
|
|
2417
|
+
<xsl:value-of select="."/>
|
|
2418
|
+
</xsl:if>
|
|
2419
|
+
</xsl:for-each>
|
|
2420
|
+
</xsl:variable>
|
|
2421
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
|
2422
|
+
<xsl:value-of select="$maxLength"/>
|
|
2399
2423
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
|
2400
2424
|
<xsl:param name="key_iso"/>
|
|
2401
2425
|
|
|
@@ -3194,6 +3218,8 @@
|
|
|
3194
3218
|
<xsl:variable name="bookmark-title_">
|
|
3195
3219
|
<xsl:call-template name="getLangVersion">
|
|
3196
3220
|
<xsl:with-param name="lang" select="@lang"/>
|
|
3221
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
|
3222
|
+
<xsl:with-param name="title" select="@title-part"/>
|
|
3197
3223
|
</xsl:call-template>
|
|
3198
3224
|
</xsl:variable>
|
|
3199
3225
|
<xsl:choose>
|
|
@@ -3211,13 +3237,34 @@
|
|
|
3211
3237
|
</xsl:choose>
|
|
3212
3238
|
</fo:bookmark-title>
|
|
3213
3239
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
|
3240
|
+
|
|
3241
|
+
<xsl:call-template name="insertFigureBookmarks">
|
|
3242
|
+
<xsl:with-param name="contents" select="contents"/>
|
|
3243
|
+
</xsl:call-template>
|
|
3244
|
+
|
|
3245
|
+
<xsl:call-template name="insertTableBookmarks">
|
|
3246
|
+
<xsl:with-param name="contents" select="contents"/>
|
|
3247
|
+
<xsl:with-param name="lang" select="@lang"/>
|
|
3248
|
+
</xsl:call-template>
|
|
3249
|
+
|
|
3214
3250
|
</fo:bookmark>
|
|
3215
3251
|
|
|
3216
3252
|
</xsl:for-each>
|
|
3217
3253
|
</xsl:when>
|
|
3218
3254
|
<xsl:otherwise>
|
|
3219
3255
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
|
3256
|
+
|
|
3220
3257
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
|
3258
|
+
|
|
3259
|
+
<xsl:call-template name="insertFigureBookmarks">
|
|
3260
|
+
<xsl:with-param name="contents" select="contents"/>
|
|
3261
|
+
</xsl:call-template>
|
|
3262
|
+
|
|
3263
|
+
<xsl:call-template name="insertTableBookmarks">
|
|
3264
|
+
<xsl:with-param name="contents" select="contents"/>
|
|
3265
|
+
<xsl:with-param name="lang" select="@lang"/>
|
|
3266
|
+
</xsl:call-template>
|
|
3267
|
+
|
|
3221
3268
|
</xsl:for-each>
|
|
3222
3269
|
</xsl:otherwise>
|
|
3223
3270
|
</xsl:choose>
|
|
@@ -3236,8 +3283,44 @@
|
|
|
3236
3283
|
|
|
3237
3284
|
</fo:bookmark-tree>
|
|
3238
3285
|
</xsl:if>
|
|
3286
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
|
3287
|
+
<xsl:param name="contents"/>
|
|
3288
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
|
3289
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
|
3290
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
|
3291
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
|
3292
|
+
<fo:bookmark internal-destination="{@id}">
|
|
3293
|
+
<fo:bookmark-title>
|
|
3294
|
+
<xsl:value-of select="normalize-space(title)"/>
|
|
3295
|
+
</fo:bookmark-title>
|
|
3296
|
+
</fo:bookmark>
|
|
3297
|
+
</xsl:for-each>
|
|
3298
|
+
</fo:bookmark>
|
|
3299
|
+
</xsl:if>
|
|
3300
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
|
3301
|
+
<xsl:param name="contents"/>
|
|
3302
|
+
<xsl:param name="lang"/>
|
|
3303
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
|
3304
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
|
3305
|
+
<fo:bookmark-title>
|
|
3306
|
+
<xsl:choose>
|
|
3307
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
|
3308
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
|
3309
|
+
</xsl:choose>
|
|
3310
|
+
</fo:bookmark-title>
|
|
3311
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
|
3312
|
+
<fo:bookmark internal-destination="{@id}">
|
|
3313
|
+
<fo:bookmark-title>
|
|
3314
|
+
<xsl:value-of select="normalize-space(title)"/>
|
|
3315
|
+
</fo:bookmark-title>
|
|
3316
|
+
</fo:bookmark>
|
|
3317
|
+
</xsl:for-each>
|
|
3318
|
+
</fo:bookmark>
|
|
3319
|
+
</xsl:if>
|
|
3239
3320
|
</xsl:template><xsl:template name="getLangVersion">
|
|
3240
3321
|
<xsl:param name="lang"/>
|
|
3322
|
+
<xsl:param name="doctype" select="''"/>
|
|
3323
|
+
<xsl:param name="title" select="''"/>
|
|
3241
3324
|
<xsl:choose>
|
|
3242
3325
|
<xsl:when test="$lang = 'en'">
|
|
3243
3326
|
|
|
@@ -3733,7 +3816,8 @@
|
|
|
3733
3816
|
<fo:block-container margin-left="0mm">
|
|
3734
3817
|
|
|
3735
3818
|
<fo:block xsl:use-attribute-sets="quote-style">
|
|
3736
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
|
3819
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
|
3820
|
+
<xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
|
3737
3821
|
</fo:block>
|
|
3738
3822
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
|
3739
3823
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
@@ -18,6 +18,16 @@ module Metanorma
|
|
|
18
18
|
)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
+
def fonts_manifest
|
|
22
|
+
{
|
|
23
|
+
"Source Sans Pro" => nil,
|
|
24
|
+
"Source Serif Pro" => nil,
|
|
25
|
+
"Source Code Pro" => nil,
|
|
26
|
+
"Source Han Sans" => nil,
|
|
27
|
+
"STIX Two Math" => nil,
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
21
31
|
def version
|
|
22
32
|
"Metanorma::CC #{Metanorma::CC::VERSION}"
|
|
23
33
|
end
|
data/lib/metanorma/cc/version.rb
CHANGED
data/metanorma-cc.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-cc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.3
|
|
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
|
|
@@ -228,7 +228,6 @@ files:
|
|
|
228
228
|
- lib/isodoc/cc/xref.rb
|
|
229
229
|
- lib/metanorma-cc.rb
|
|
230
230
|
- lib/metanorma/cc.rb
|
|
231
|
-
- lib/metanorma/cc/fonts_manifest.yaml
|
|
232
231
|
- lib/metanorma/cc/processor.rb
|
|
233
232
|
- lib/metanorma/cc/version.rb
|
|
234
233
|
- metanorma-cc.gemspec
|