isodoc 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/isodoc.gemspec +1 -1
- data/lib/isodoc/base_style/blocks.scss +1 -5
- data/lib/isodoc/function/cleanup.rb +8 -0
- data/lib/isodoc/html_function/postprocess.rb +15 -3
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +2 -2
- data/lib/isodoc/word_function/postprocess.rb +14 -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: 60180ddd274fec56a00a852e6068ef112c6b743c94a022022de6f52bd7ad8d68
|
4
|
+
data.tar.gz: bbaa6413c5205ee6e1e3abc7debce481537d291161f8600ffa3363920242c698
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d2acafc4783382f3f16fc09503cc8ade62cbacfec22c350122d22fc32820b16600cb53795061ab590a31bbdc2bc03edb1be22a7e916607da8161c1df332c3d5
|
7
|
+
data.tar.gz: 82fc816103195b36a79c3ffc578b008166eb7f0b2180acb11e74f71ed58f41ab23b88ea0c1f903e60976c45639b9eecc97ed743b0b10b86efea41ad17d179cb2
|
data/isodoc.gemspec
CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_dependency "nokogiri", ">= 1.10.4"
|
34
34
|
spec.add_dependency "thread_safe"
|
35
35
|
spec.add_dependency "uuidtools"
|
36
|
-
spec.add_dependency "html2doc", "~> 0.
|
36
|
+
spec.add_dependency "html2doc", "~> 1.0.0"
|
37
37
|
spec.add_dependency "liquid"
|
38
38
|
spec.add_dependency "roman-numerals"
|
39
39
|
spec.add_dependency "sassc", "~> 2.2.1"
|
@@ -45,10 +45,6 @@
|
|
45
45
|
@mixin sourceBlock($colorBg, $colorFg: null) {
|
46
46
|
@include monospaceBlockStyle();
|
47
47
|
|
48
|
-
.SourceTitle {
|
49
|
-
@include blockTitle();
|
50
|
-
}
|
51
|
-
|
52
48
|
@if $colorFg {
|
53
49
|
color: $colorFg;
|
54
50
|
}
|
@@ -59,7 +55,7 @@
|
|
59
55
|
padding: 1.5em;
|
60
56
|
margin: 2em 0 1em 0;
|
61
57
|
overflow-y: auto;
|
62
|
-
overflow-x: scroll
|
58
|
+
overflow-x: scroll;
|
63
59
|
}
|
64
60
|
|
65
61
|
@mixin pseudocodeBlock($colorBg, $colorFg: null) {
|
@@ -27,9 +27,9 @@ module IsoDoc::HtmlFunction
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def html_cleanup(x)
|
30
|
-
footnote_backlinks(html_toc(
|
30
|
+
footnote_format(footnote_backlinks(html_toc(
|
31
31
|
term_header((html_footnote_filter(html_preface(htmlstyle(x))))))
|
32
|
-
)
|
32
|
+
))
|
33
33
|
end
|
34
34
|
|
35
35
|
def htmlstylesheet
|
@@ -199,8 +199,20 @@ module IsoDoc::HtmlFunction
|
|
199
199
|
docxml
|
200
200
|
end
|
201
201
|
|
202
|
+
def footnote_format(docxml)
|
203
|
+
docxml.xpath("//a[@epub:type = 'footnote']/sup").each do |x|
|
204
|
+
footnote_reference_format(x)
|
205
|
+
end
|
206
|
+
docxml.xpath("//a[@class = 'TableFootnoteRef'] | "\
|
207
|
+
"//span[@class = 'TableFootnoteRef']").each do |x|
|
208
|
+
table_footnote_reference_format(x)
|
209
|
+
end
|
210
|
+
docxml
|
211
|
+
end
|
212
|
+
|
202
213
|
def sourcecode_highlighter
|
203
|
-
'<script src="https://cdn.rawgit.com/google/code-prettify/master/
|
214
|
+
'<script src="https://cdn.rawgit.com/google/code-prettify/master/'\
|
215
|
+
'loader/run_prettify.js"></script>'
|
204
216
|
end
|
205
217
|
|
206
218
|
MATHJAX_ADDR =
|
data/lib/isodoc/version.rb
CHANGED
@@ -17,8 +17,8 @@ module IsoDoc::WordFunction
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def make_body1(body, _docxml)
|
20
|
-
FileUtils.rm_rf tmpimagedir
|
21
|
-
FileUtils.mkdir tmpimagedir
|
20
|
+
#FileUtils.rm_rf tmpimagedir
|
21
|
+
#FileUtils.mkdir tmpimagedir
|
22
22
|
body.div **{ class: "WordSection1" } do |div1|
|
23
23
|
div1.p { |p| p << " " } # placeholder
|
24
24
|
end
|
@@ -73,6 +73,7 @@ xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
|
|
73
73
|
word_image_caption(docxml)
|
74
74
|
word_section_breaks(docxml)
|
75
75
|
authority_cleanup(docxml)
|
76
|
+
word_footnote_format(docxml)
|
76
77
|
docxml
|
77
78
|
end
|
78
79
|
|
@@ -208,5 +209,18 @@ xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
|
|
208
209
|
ins << m.remove
|
209
210
|
end
|
210
211
|
end
|
212
|
+
|
213
|
+
def word_footnote_format(docxml)
|
214
|
+
# the content is in a[@epub:type = 'footnote']//sup, but in Word,
|
215
|
+
# we need to inject content around the autonumbered footnote reference
|
216
|
+
docxml.xpath("//a[@epub:type = 'footnote']").each do |x|
|
217
|
+
footnote_reference_format(x)
|
218
|
+
end
|
219
|
+
docxml.xpath("//a[@class = 'TableFootnoteRef'] | "\
|
220
|
+
"//span[@class = 'TableFootnoteRef']").each do |x|
|
221
|
+
table_footnote_reference_format(x)
|
222
|
+
end
|
223
|
+
docxml
|
224
|
+
end
|
211
225
|
end
|
212
226
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isodoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 1.0.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 1.0.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: liquid
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|