metanorma-ribose 2.4.12 → 2.5.0
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/isodoc/ribose/base_convert.rb +4 -0
- data/lib/isodoc/ribose/html/htmlstyle.css +40 -0
- data/lib/isodoc/ribose/html_convert.rb +0 -4
- data/lib/isodoc/ribose/pdf_convert.rb +4 -4
- data/lib/isodoc/ribose/ribose.standard.xsl +32 -7
- data/lib/metanorma/ribose/processor.rb +0 -9
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- data/metanorma.yml +6 -0
- 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: 6870f076ae8e391de38bef5ec500f584ddcafc218734c371e2ee60c9ee06d76a
|
|
4
|
+
data.tar.gz: 29b9819b5bd291e1c9cffc0f954fc49873fd1d00e349ec9ee86703f82b6286e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9196ee05f5e746185b80db74ca6ebb7a2ce0b58487a1e11de20ab4a7012bfbedd9213fb5a72687e37f1ffeccdc1084199c101c77d178777ef42e90a2b7cc9ea7
|
|
7
|
+
data.tar.gz: cfb292071e9ae8a2c5384b413438a5c24d9dadd2ccf9a565533c3be527cf722139c6f41433265f883de5bb9e158612de2d89f94563338bb150e7a5e8d475e7f1
|
|
@@ -229,6 +229,46 @@ h6:hover > a.anchor,
|
|
|
229
229
|
.inline-header:hover > a.anchor {
|
|
230
230
|
visibility: visible; }
|
|
231
231
|
|
|
232
|
+
/* collapsible snippets: collapsible before hidable */
|
|
233
|
+
.hidable {
|
|
234
|
+
max-height: 0;
|
|
235
|
+
overflow: hidden;
|
|
236
|
+
transition: max-height 0.2s ease-out; }
|
|
237
|
+
|
|
238
|
+
.collapsible {
|
|
239
|
+
background-color: #777;
|
|
240
|
+
color: white;
|
|
241
|
+
cursor: pointer;
|
|
242
|
+
padding: 12px 0;
|
|
243
|
+
margin: 0;
|
|
244
|
+
width: 100%;
|
|
245
|
+
border: none;
|
|
246
|
+
text-align: left;
|
|
247
|
+
outline: none;
|
|
248
|
+
font-size: 15px; }
|
|
249
|
+
|
|
250
|
+
.active, .collapsible:hover {
|
|
251
|
+
background-color: #555; }
|
|
252
|
+
|
|
253
|
+
.collapsible:after {
|
|
254
|
+
content: '\25bc';
|
|
255
|
+
color: white;
|
|
256
|
+
font-weight: bold;
|
|
257
|
+
float: right;
|
|
258
|
+
margin-left: 12px;
|
|
259
|
+
margin-right: 12px; }
|
|
260
|
+
|
|
261
|
+
.active:after {
|
|
262
|
+
content: "\25b2"; }
|
|
263
|
+
|
|
264
|
+
/* collapsible: */
|
|
265
|
+
.collapsible + .hidable {
|
|
266
|
+
margin-top: 0; }
|
|
267
|
+
|
|
268
|
+
.collapsible:not(.active) + .hidable {
|
|
269
|
+
overflow: hidden;
|
|
270
|
+
padding: 0; }
|
|
271
|
+
|
|
232
272
|
#standard-band {
|
|
233
273
|
background-color: #0AC442; }
|
|
234
274
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
require "isodoc"
|
|
2
|
+
require_relative "base_convert"
|
|
2
3
|
|
|
3
4
|
module IsoDoc
|
|
4
5
|
module Ribose
|
|
5
6
|
# A {Converter} implementation that generates PDF HTML output, and a
|
|
6
7
|
# document schema encapsulation of the document for validation
|
|
7
|
-
class PdfConvert < IsoDoc::
|
|
8
|
+
class PdfConvert < IsoDoc::Generic::PdfConvert
|
|
8
9
|
def initialize(options)
|
|
9
10
|
@libdir = File.dirname(__FILE__)
|
|
10
11
|
super
|
|
11
12
|
end
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
end
|
|
14
|
+
include BaseConvert
|
|
15
|
+
include Init
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
end
|
|
@@ -3216,13 +3216,35 @@
|
|
|
3216
3216
|
</xsl:for-each>
|
|
3217
3217
|
</xsl:element>
|
|
3218
3218
|
|
|
3219
|
-
<xsl:call-template name="
|
|
3219
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
|
3220
3220
|
|
|
3221
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
|
3221
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
|
3222
3222
|
|
|
3223
3223
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
|
3224
3224
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
|
3225
3225
|
|
|
3226
|
+
<xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
|
|
3227
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
|
3228
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
3229
|
+
<xsl:choose>
|
|
3230
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
|
3231
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
|
3232
|
+
<xsl:attribute name="main_page_sequence"/>
|
|
3233
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
|
3234
|
+
</xsl:element>
|
|
3235
|
+
</xsl:when>
|
|
3236
|
+
<xsl:otherwise> <!-- bibliography -->
|
|
3237
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
|
3238
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
|
3239
|
+
<xsl:attribute name="main_page_sequence"/>
|
|
3240
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
|
3241
|
+
</xsl:element>
|
|
3242
|
+
</xsl:element>
|
|
3243
|
+
</xsl:otherwise>
|
|
3244
|
+
</xsl:choose>
|
|
3245
|
+
</xsl:for-each>
|
|
3246
|
+
</xsl:template>
|
|
3247
|
+
|
|
3226
3248
|
<xsl:template name="insertAnnexInSeparatePageSequences">
|
|
3227
3249
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
|
3228
3250
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
@@ -12044,10 +12066,12 @@
|
|
|
12044
12066
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
|
12045
12067
|
<xsl:copy>
|
|
12046
12068
|
<xsl:copy-of select="@*"/>
|
|
12047
|
-
<xsl:
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
<xsl:
|
|
12069
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
|
12070
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
|
12071
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
|
12072
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
|
12073
|
+
<xsl:value-of select="normalize-space(.)"/>
|
|
12074
|
+
</xsl:if>
|
|
12051
12075
|
</xsl:if>
|
|
12052
12076
|
</xsl:copy>
|
|
12053
12077
|
</xsl:template>
|
|
@@ -12922,7 +12946,8 @@
|
|
|
12922
12946
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
12923
12947
|
<xsl:choose>
|
|
12924
12948
|
<xsl:when test="normalize-space() != ''">
|
|
12925
|
-
<
|
|
12949
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
|
12950
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$src_attachment}" filename="{@name}"/>
|
|
12926
12951
|
</xsl:when>
|
|
12927
12952
|
<xsl:otherwise>
|
|
12928
12953
|
<!-- _{filename}_attachments -->
|
|
@@ -15,15 +15,6 @@ 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
|
-
|
|
27
18
|
def version
|
|
28
19
|
"Metanorma::Ribose #{Metanorma::Ribose::VERSION}"
|
|
29
20
|
end
|
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(">= 3.1.0")
|
|
31
31
|
|
|
32
|
-
spec.add_dependency "metanorma-generic", "~> 2.
|
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 2.7.0"
|
|
33
33
|
|
|
34
34
|
spec.add_development_dependency "debug"
|
|
35
35
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
data/metanorma.yml
CHANGED
|
@@ -21,6 +21,7 @@ header: lib/isodoc/ribose/html/header.html
|
|
|
21
21
|
wordcoverpage: lib/isodoc/ribose/html/word_rsd_titlepage.html
|
|
22
22
|
wordintropage: lib/isodoc/ribose/html/word_rsd_intro.html
|
|
23
23
|
wordstylesheet: lib/isodoc/ribose/html/wordstyle.scss
|
|
24
|
+
pdf_stylesheet: lib/isodoc/ribose/ribose.standard.xsl
|
|
24
25
|
word_bodyfont: '"Source Sans Pro","Arial",sans-serif'
|
|
25
26
|
word_headerfont: '"Source Sans Pro","Arial",sans-serif'
|
|
26
27
|
word_monospacefont: '"Source Code Pro",monospace'
|
|
@@ -49,3 +50,8 @@ metadata_extensions:
|
|
|
49
50
|
webfont:
|
|
50
51
|
- "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,600,600i&display=swap"
|
|
51
52
|
- "https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,300;0,600;1,300;1,600&display=swap"
|
|
53
|
+
fonts_manifest:
|
|
54
|
+
Source Sans Pro:
|
|
55
|
+
STIX Two Math:
|
|
56
|
+
Source Serif Pro:
|
|
57
|
+
Source Code Pro:
|
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.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-08-
|
|
11
|
+
date: 2024-08-19 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.7.0
|
|
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.7.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: debug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|