isodoc 1.0.18 → 1.0.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9fa741392b5d89abbcf094f509b027de84b74d1bc543d8395a587b7a556db543
4
- data.tar.gz: 4e9b4445b54e495a5cbfbecfa43ccde77b28923b5a569dc8ccbe464f672b05c0
3
+ metadata.gz: 60180ddd274fec56a00a852e6068ef112c6b743c94a022022de6f52bd7ad8d68
4
+ data.tar.gz: bbaa6413c5205ee6e1e3abc7debce481537d291161f8600ffa3363920242c698
5
5
  SHA512:
6
- metadata.gz: cb34c6d612f0a0b814df38a0851831fdfbaece00e05532af45445db8e07851aefff9e4cea8af3d7ebb0e48ae6d6a809b6a5c5f03571982e21099eb993ee3a7c1
7
- data.tar.gz: 21b9ca3ed5740d82f8f41a26897ed76e5a7b6c6603c79c71db5467b2e9220315cd876b12b78709b9a2415357aa861399cd78000e4050d15fe5c736bd6d1de0a0
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.9.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) {
@@ -161,5 +161,13 @@ module IsoDoc::Function
161
161
 
162
162
  def symbols_cleanup(docxml)
163
163
  end
164
+
165
+ def table_footnote_reference_format(a)
166
+ a
167
+ end
168
+
169
+ def footnote_reference_format(a)
170
+ a
171
+ end
164
172
  end
165
173
  end
@@ -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/loader/run_prettify.js"></script>'
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 =
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "1.0.18".freeze
2
+ VERSION = "1.0.19".freeze
3
3
  end
@@ -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 << "&nbsp;" } # 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.18
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-02-25 00:00:00.000000000 Z
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.9.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.9.0
96
+ version: 1.0.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: liquid
99
99
  requirement: !ruby/object:Gem::Requirement