metanorma-generic 2.1.0 → 2.1.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/generic/base_convert.rb +1 -1
- data/lib/isodoc/generic/html_convert.rb +20 -14
- data/lib/metanorma/generic/version.rb +1 -1
- data/lib/metanorma/generic.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05f89e4a6adb0222c1cc71f880010902337d92cde88328a4754a61c5f30eb7dc
|
4
|
+
data.tar.gz: f506457c7e94d17694fe9512b559aa82a1665952bfdd06ae1554fc9b5e2d3d11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 704cda28036803f93d1cb11790dfe605fcc2c2eb4ff1ba09007b4ce30bf84cd511e307640f7803c83a1447d5f9af650dc32b00a447b0a704ca73ac198ea68523
|
7
|
+
data.tar.gz: b70f01e52405512c56e8fd3ef3994a245972f92f49029b2700c54d16b3cf7179fed7fd706c7fe683da3aae9cd294db4cf1bd561333b2689315ec8e0a58ad30fe
|
@@ -14,7 +14,7 @@ module IsoDoc
|
|
14
14
|
h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
|
15
15
|
d["id"] = h2["id"]
|
16
16
|
d.children.first.previous =
|
17
|
-
"<strong>#{h2.remove.children.to_xml}</strong
|
17
|
+
"<strong>#{h2.remove.children.to_xml}</strong> "
|
18
18
|
end
|
19
19
|
docxml
|
20
20
|
end
|
@@ -4,7 +4,6 @@ require "isodoc"
|
|
4
4
|
|
5
5
|
module IsoDoc
|
6
6
|
module Generic
|
7
|
-
|
8
7
|
# A {Converter} implementation that generates HTML output, and a document
|
9
8
|
# schema encapsulation of the document for validation
|
10
9
|
#
|
@@ -18,19 +17,25 @@ module IsoDoc
|
|
18
17
|
attr_accessor :_file
|
19
18
|
end
|
20
19
|
|
21
|
-
def self.inherited(
|
22
|
-
k._file = caller_locations.first.absolute_path
|
20
|
+
def self.inherited(k)
|
21
|
+
k._file = caller_locations(1..1).first.absolute_path
|
23
22
|
end
|
24
23
|
|
25
24
|
def default_fonts(options)
|
26
25
|
{
|
27
26
|
bodyfont: (
|
28
|
-
options[:script] == "Hans"
|
29
|
-
|
27
|
+
if options[:script] == "Hans"
|
28
|
+
'"Source Han Sans",serif'
|
29
|
+
else
|
30
|
+
configuration.html_bodyfont || '"Overpass",sans-serif'
|
31
|
+
end
|
30
32
|
),
|
31
33
|
headerfont: (
|
32
|
-
options[:script] == "Hans"
|
33
|
-
|
34
|
+
if options[:script] == "Hans"
|
35
|
+
'"Source Han Sans",sans-serif'
|
36
|
+
else
|
37
|
+
configuration.html_headerfont || '"Overpass",sans-serif'
|
38
|
+
end
|
34
39
|
),
|
35
40
|
monospacefont: configuration.html_monospacefont || '"Space Mono",monospace',
|
36
41
|
normalfontsize: configuration.html_normalfontsize,
|
@@ -43,21 +48,23 @@ module IsoDoc
|
|
43
48
|
def default_file_locations(_options)
|
44
49
|
{
|
45
50
|
htmlstylesheet: baselocation(configuration.htmlstylesheet) ||
|
46
|
-
|
51
|
+
html_doc_path("htmlstyle.scss"),
|
47
52
|
htmlcoverpage: baselocation(configuration.htmlcoverpage) ||
|
48
|
-
|
53
|
+
html_doc_path("html_generic_titlepage.html"),
|
49
54
|
htmlintropage: baselocation(configuration.htmlintropage) ||
|
50
|
-
|
55
|
+
html_doc_path("html_generic_intro.html"),
|
51
56
|
scripts: baselocation(configuration.scripts),
|
52
|
-
i18nyaml: (configuration.i18nyaml.is_a?(String)
|
53
|
-
|
57
|
+
i18nyaml: (if configuration.i18nyaml.is_a?(String)
|
58
|
+
baselocation(configuration.i18nyaml)
|
59
|
+
end),
|
54
60
|
}.transform_values { |v| v&.empty? ? nil : v }
|
55
61
|
end
|
56
62
|
|
57
63
|
def googlefonts
|
58
64
|
return unless configuration.webfont
|
65
|
+
|
59
66
|
Array(configuration.webfont).map do |x|
|
60
|
-
%{<link href="#{x
|
67
|
+
%{<link href="#{x}" rel="stylesheet"/>}
|
61
68
|
end.join("\n")
|
62
69
|
end
|
63
70
|
|
@@ -66,4 +73,3 @@ module IsoDoc
|
|
66
73
|
end
|
67
74
|
end
|
68
75
|
end
|
69
|
-
|
data/lib/metanorma/generic.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-generic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.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: 2022-05-
|
11
|
+
date: 2022-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|