metanorma-iso 1.7.1 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +11 -41
- data/.gitignore +2 -0
- data/.rubocop.yml +6 -2
- data/lib/asciidoctor/iso/base.rb +18 -16
- data/lib/asciidoctor/iso/biblio.rng +4 -6
- data/lib/asciidoctor/iso/cleanup.rb +28 -24
- data/lib/asciidoctor/iso/front.rb +26 -16
- data/lib/asciidoctor/iso/front_id.rb +30 -25
- data/lib/asciidoctor/iso/isodoc.rng +172 -3
- data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
- data/lib/asciidoctor/iso/isostandard.rng +17 -97
- data/lib/asciidoctor/iso/validate.rb +22 -109
- data/lib/asciidoctor/iso/validate_image.rb +97 -0
- data/lib/asciidoctor/iso/validate_requirements.rb +26 -20
- data/lib/asciidoctor/iso/validate_section.rb +39 -20
- data/lib/asciidoctor/iso/validate_style.rb +36 -24
- data/lib/asciidoctor/iso/validate_title.rb +23 -17
- data/lib/isodoc/iso/base_convert.rb +19 -2
- data/lib/isodoc/iso/html/style-human.css +7 -0
- data/lib/isodoc/iso/html/style-iso.css +7 -0
- data/lib/isodoc/iso/html_convert.rb +0 -1
- data/lib/isodoc/iso/i18n-en.yaml +4 -0
- data/lib/isodoc/iso/i18n-fr.yaml +4 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +4 -0
- data/lib/isodoc/iso/index.rb +140 -0
- data/lib/isodoc/iso/iso.amendment.xsl +1092 -208
- data/lib/isodoc/iso/iso.international-standard.xsl +1092 -208
- data/lib/isodoc/iso/presentation_xml_convert.rb +45 -37
- data/lib/isodoc/iso/word_convert.rb +0 -1
- data/lib/isodoc/iso/xref.rb +15 -7
- data/lib/metanorma/iso/processor.rb +1 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +8 -8
- data/spec/asciidoctor/amd_spec.rb +696 -0
- data/spec/asciidoctor/base_spec.rb +733 -0
- data/spec/asciidoctor/blocks_spec.rb +527 -0
- data/spec/asciidoctor/cleanup_spec.rb +1134 -0
- data/spec/asciidoctor/inline_spec.rb +195 -0
- data/spec/asciidoctor/lists_spec.rb +197 -0
- data/spec/asciidoctor/refs_spec.rb +375 -0
- data/spec/asciidoctor/section_spec.rb +393 -0
- data/spec/asciidoctor/table_spec.rb +329 -0
- data/spec/asciidoctor/validate_spec.rb +1627 -0
- data/spec/isodoc/amd_spec.rb +967 -946
- data/spec/isodoc/blocks_spec.rb +530 -507
- data/spec/isodoc/i18n_spec.rb +953 -911
- data/spec/isodoc/inline_spec.rb +355 -293
- data/spec/isodoc/iso_spec.rb +338 -314
- data/spec/isodoc/metadata_spec.rb +392 -382
- data/spec/isodoc/postproc_spec.rb +836 -657
- data/spec/isodoc/ref_spec.rb +374 -331
- data/spec/isodoc/section_spec.rb +821 -519
- data/spec/isodoc/table_spec.rb +472 -411
- data/spec/isodoc/terms_spec.rb +209 -185
- data/spec/isodoc/xref_spec.rb +1370 -1236
- data/spec/metanorma/processor_spec.rb +28 -26
- data/spec/spec_helper.rb +178 -193
- metadata +65 -66
- data/.rubocop.ribose.yml +0 -66
- data/lib/isodoc/iso/html/scripts.html +0 -178
- data/spec/asciidoctor-iso/amd_spec.rb +0 -694
- data/spec/asciidoctor-iso/base_spec.rb +0 -713
- data/spec/asciidoctor-iso/blocks_spec.rb +0 -482
- data/spec/asciidoctor-iso/cleanup_spec.rb +0 -1025
- data/spec/asciidoctor-iso/inline_spec.rb +0 -170
- data/spec/asciidoctor-iso/lists_spec.rb +0 -190
- data/spec/asciidoctor-iso/refs_spec.rb +0 -317
- data/spec/asciidoctor-iso/section_spec.rb +0 -362
- data/spec/asciidoctor-iso/table_spec.rb +0 -313
- data/spec/asciidoctor-iso/validate_spec.rb +0 -1621
- data/spec/assets/xref_error.adoc +0 -7
metadata
CHANGED
@@ -1,73 +1,59 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: ruby-jing
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: isodoc
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - "~>"
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
19
|
+
version: 1.6.0
|
34
20
|
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - "~>"
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
26
|
+
version: 1.6.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: metanorma-standoc
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
31
|
- - "~>"
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
33
|
+
version: 1.9.0
|
48
34
|
type: :runtime
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
38
|
- - "~>"
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
40
|
+
version: 1.9.0
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
42
|
+
name: mn2sts
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
45
|
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
47
|
+
version: 1.5.0
|
62
48
|
type: :runtime
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
54
|
+
version: 1.5.0
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
56
|
+
name: ruby-jing
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - ">="
|
@@ -81,27 +67,27 @@ dependencies:
|
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: '0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
70
|
+
name: tokenizer
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
75
|
+
version: 0.3.0
|
90
76
|
type: :runtime
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
80
|
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
82
|
+
version: 0.3.0
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
84
|
+
name: twitter_cldr
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
87
|
- - ">="
|
102
88
|
- !ruby/object:Gem::Version
|
103
89
|
version: '0'
|
104
|
-
type: :
|
90
|
+
type: :runtime
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
@@ -109,19 +95,19 @@ dependencies:
|
|
109
95
|
- !ruby/object:Gem::Version
|
110
96
|
version: '0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
98
|
+
name: byebug
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
103
|
+
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
|
-
- -
|
108
|
+
- - ">="
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
110
|
+
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: equivalent-xml
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,20 +150,34 @@ dependencies:
|
|
164
150
|
- - "~>"
|
165
151
|
- !ruby/object:Gem::Version
|
166
152
|
version: '4.7'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: iev
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.2.0
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.2.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rake
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- - "
|
171
|
+
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
173
|
+
version: '13.0'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- - "
|
178
|
+
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
180
|
+
version: '13.0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: rspec
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,58 +196,58 @@ dependencies:
|
|
196
196
|
name: rubocop
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- -
|
199
|
+
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
201
|
+
version: 1.5.2
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- -
|
206
|
+
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
208
|
+
version: 1.5.2
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
210
|
+
name: sassc
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- -
|
213
|
+
- - '='
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
215
|
+
version: 2.4.0
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- -
|
220
|
+
- - '='
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
222
|
+
version: 2.4.0
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
224
|
+
name: simplecov
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
227
|
- - "~>"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: '0.
|
229
|
+
version: '0.15'
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - "~>"
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: '0.
|
236
|
+
version: '0.15'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
|
-
name:
|
238
|
+
name: timecop
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
241
|
- - "~>"
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version: 0.
|
243
|
+
version: '0.9'
|
244
244
|
type: :development
|
245
245
|
prerelease: false
|
246
246
|
version_requirements: !ruby/object:Gem::Requirement
|
247
247
|
requirements:
|
248
248
|
- - "~>"
|
249
249
|
- !ruby/object:Gem::Version
|
250
|
-
version: 0.
|
250
|
+
version: '0.9'
|
251
251
|
description: |
|
252
252
|
metanorma-iso lets you write ISO standards in AsciiDoc syntax.
|
253
253
|
|
@@ -265,7 +265,6 @@ files:
|
|
265
265
|
- ".gitignore"
|
266
266
|
- ".hound.yml"
|
267
267
|
- ".oss-guides.rubocop.yml"
|
268
|
-
- ".rubocop.ribose.yml"
|
269
268
|
- ".rubocop.tb.yml"
|
270
269
|
- ".rubocop.yml"
|
271
270
|
- CODE_OF_CONDUCT.md
|
@@ -295,6 +294,7 @@ files:
|
|
295
294
|
- lib/asciidoctor/iso/reqt.rng
|
296
295
|
- lib/asciidoctor/iso/section.rb
|
297
296
|
- lib/asciidoctor/iso/validate.rb
|
297
|
+
- lib/asciidoctor/iso/validate_image.rb
|
298
298
|
- lib/asciidoctor/iso/validate_requirements.rb
|
299
299
|
- lib/asciidoctor/iso/validate_section.rb
|
300
300
|
- lib/asciidoctor/iso/validate_style.rb
|
@@ -307,7 +307,6 @@ files:
|
|
307
307
|
- lib/isodoc/iso/html/htmlstyle.scss
|
308
308
|
- lib/isodoc/iso/html/isodoc.css
|
309
309
|
- lib/isodoc/iso/html/isodoc.scss
|
310
|
-
- lib/isodoc/iso/html/scripts.html
|
311
310
|
- lib/isodoc/iso/html/style-human.css
|
312
311
|
- lib/isodoc/iso/html/style-human.scss
|
313
312
|
- lib/isodoc/iso/html/style-iso.css
|
@@ -321,6 +320,7 @@ files:
|
|
321
320
|
- lib/isodoc/iso/i18n-fr.yaml
|
322
321
|
- lib/isodoc/iso/i18n-zh-Hans.yaml
|
323
322
|
- lib/isodoc/iso/i18n.rb
|
323
|
+
- lib/isodoc/iso/index.rb
|
324
324
|
- lib/isodoc/iso/init.rb
|
325
325
|
- lib/isodoc/iso/iso.amendment.xsl
|
326
326
|
- lib/isodoc/iso/iso.international-standard.xsl
|
@@ -337,16 +337,16 @@ files:
|
|
337
337
|
- lib/metanorma/iso/processor.rb
|
338
338
|
- lib/metanorma/iso/version.rb
|
339
339
|
- metanorma-iso.gemspec
|
340
|
-
- spec/asciidoctor
|
341
|
-
- spec/asciidoctor
|
342
|
-
- spec/asciidoctor
|
343
|
-
- spec/asciidoctor
|
344
|
-
- spec/asciidoctor
|
345
|
-
- spec/asciidoctor
|
346
|
-
- spec/asciidoctor
|
347
|
-
- spec/asciidoctor
|
348
|
-
- spec/asciidoctor
|
349
|
-
- spec/asciidoctor
|
340
|
+
- spec/asciidoctor/amd_spec.rb
|
341
|
+
- spec/asciidoctor/base_spec.rb
|
342
|
+
- spec/asciidoctor/blocks_spec.rb
|
343
|
+
- spec/asciidoctor/cleanup_spec.rb
|
344
|
+
- spec/asciidoctor/inline_spec.rb
|
345
|
+
- spec/asciidoctor/lists_spec.rb
|
346
|
+
- spec/asciidoctor/refs_spec.rb
|
347
|
+
- spec/asciidoctor/section_spec.rb
|
348
|
+
- spec/asciidoctor/table_spec.rb
|
349
|
+
- spec/asciidoctor/validate_spec.rb
|
350
350
|
- spec/assets/header.html
|
351
351
|
- spec/assets/html.css
|
352
352
|
- spec/assets/htmlcover.html
|
@@ -360,7 +360,6 @@ files:
|
|
360
360
|
- spec/assets/word.css
|
361
361
|
- spec/assets/wordcover.html
|
362
362
|
- spec/assets/wordintro.html
|
363
|
-
- spec/assets/xref_error.adoc
|
364
363
|
- spec/examples/103_01_02.html
|
365
364
|
- spec/examples/english.yaml
|
366
365
|
- spec/examples/iso_123_.xml
|
data/.rubocop.ribose.yml
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
Include:
|
3
|
-
- "**/*.rake"
|
4
|
-
- "**/Gemfile"
|
5
|
-
- "**/*.gemfile"
|
6
|
-
- "**/Rakefile"
|
7
|
-
- "**/*.rb"
|
8
|
-
Exclude:
|
9
|
-
- "vendor/**/*"
|
10
|
-
- "db/**/*"
|
11
|
-
- "tmp/**/*"
|
12
|
-
DisplayCopNames: false
|
13
|
-
StyleGuideCopsOnly: false
|
14
|
-
Rails:
|
15
|
-
Enabled: true
|
16
|
-
Metrics/AbcSize:
|
17
|
-
Description: A calculated magnitude based on number of assignments, branches, and
|
18
|
-
conditions.
|
19
|
-
Enabled: true
|
20
|
-
Max: 15
|
21
|
-
Metrics/BlockLength:
|
22
|
-
Exclude:
|
23
|
-
- "spec/**/*"
|
24
|
-
Metrics/BlockNesting:
|
25
|
-
Description: Avoid excessive block nesting
|
26
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
27
|
-
Enabled: true
|
28
|
-
Max: 3
|
29
|
-
Metrics/ClassLength:
|
30
|
-
Description: Avoid classes longer than 100 lines of code.
|
31
|
-
Enabled: false
|
32
|
-
CountComments: false
|
33
|
-
Max: 100
|
34
|
-
Metrics/CyclomaticComplexity:
|
35
|
-
Description: A complexity metric that is strongly correlated to the number of test
|
36
|
-
cases needed to validate a method.
|
37
|
-
Enabled: true
|
38
|
-
Max: 6
|
39
|
-
Metrics/LineLength:
|
40
|
-
Description: Limit lines to 80 characters.
|
41
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
|
42
|
-
Enabled: true
|
43
|
-
Max: 80
|
44
|
-
AllowURI: true
|
45
|
-
URISchemes:
|
46
|
-
- http
|
47
|
-
- https
|
48
|
-
Metrics/MethodLength:
|
49
|
-
Description: Avoid methods longer than 10 lines of code.
|
50
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
51
|
-
Enabled: true
|
52
|
-
CountComments: true
|
53
|
-
Max: 10
|
54
|
-
Exclude:
|
55
|
-
- "spec/**/*"
|
56
|
-
Metrics/ParameterLists:
|
57
|
-
Description: Avoid long parameter lists.
|
58
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
59
|
-
Enabled: true
|
60
|
-
Max: 5
|
61
|
-
CountKeywordArgs: true
|
62
|
-
Metrics/PerceivedComplexity:
|
63
|
-
Description: A complexity metric geared towards measuring complexity for a human
|
64
|
-
reader.
|
65
|
-
Enabled: true
|
66
|
-
Max: 7
|
@@ -1,178 +0,0 @@
|
|
1
|
-
<script>
|
2
|
-
$("#toc").on('click', 'li', function(e) {
|
3
|
-
$(this).parent().find('li.toc-active').removeClass('toc-active');
|
4
|
-
$(this).addClass('toc-active');
|
5
|
-
});
|
6
|
-
</script>
|
7
|
-
|
8
|
-
<script>
|
9
|
-
//TOC toggle animation
|
10
|
-
$('#toggle').on('click', function(){
|
11
|
-
if( $('nav').is(':visible') ) {
|
12
|
-
$('nav').animate({ 'left': '-353px' }, 'slow', function(){
|
13
|
-
$('nav').hide();
|
14
|
-
});
|
15
|
-
$('body').animate({ 'margin-left': '0' }, 'slow');
|
16
|
-
}
|
17
|
-
else {
|
18
|
-
$('nav').show();
|
19
|
-
$('nav').animate({ 'left': '0px' }, 'slow');
|
20
|
-
$('body').animate({ 'margin-left': '298px' }, 'slow');
|
21
|
-
}
|
22
|
-
});
|
23
|
-
</script>
|
24
|
-
|
25
|
-
<script>
|
26
|
-
// Scroll to top button
|
27
|
-
window.onscroll = function() {scrollFunction()};
|
28
|
-
|
29
|
-
function scrollFunction() {
|
30
|
-
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
|
31
|
-
document.getElementById("myBtn").style.display = "block";
|
32
|
-
} else {
|
33
|
-
document.getElementById("myBtn").style.display = "none";
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
// When the user clicks on the button, scroll to the top of the document
|
38
|
-
function topFunction() {
|
39
|
-
document.body.scrollTop = 0;
|
40
|
-
document.documentElement.scrollTop = 0;
|
41
|
-
}
|
42
|
-
</script>
|
43
|
-
|
44
|
-
<script>
|
45
|
-
/*
|
46
|
-
$(document).ready(function() {
|
47
|
-
$('[id^=toc]').each(function ()
|
48
|
-
{
|
49
|
-
var currentToc = $(this);
|
50
|
-
var url = window.location.href;
|
51
|
-
currentToc.wrap("<a href='" + url + "#" + currentToc.attr("id") + "'></a>");
|
52
|
-
});
|
53
|
-
});
|
54
|
-
*/
|
55
|
-
</script>
|
56
|
-
|
57
|
-
|
58
|
-
<script>
|
59
|
-
|
60
|
-
// jQuery Inline Footnotes v1.0.3
|
61
|
-
// Copyright (c) 2011 Vesa Vänskä, released under the MIT License.
|
62
|
-
|
63
|
-
// Generated by CoffeeScript 1.6.1
|
64
|
-
(function() {
|
65
|
-
|
66
|
-
(function($) {
|
67
|
-
$.inlineFootnote = function(el, options) {
|
68
|
-
var _this = this;
|
69
|
-
this.el = $(el);
|
70
|
-
this.el.data("inlineFootnote", this);
|
71
|
-
this.initialize = function() {
|
72
|
-
this.options = $.extend({}, $.inlineFootnote.defaultOptions, options);
|
73
|
-
this.footnoteId = this.el.attr("href").match(/#(.*)/)[1];
|
74
|
-
if (this.footnoteId) {
|
75
|
-
this.el.mouseenter(this.openBox);
|
76
|
-
return $("body").mousemove(this.closeBox);
|
77
|
-
}
|
78
|
-
};
|
79
|
-
this.openBox = function(event) {
|
80
|
-
var footnoteContent, linkOffset;
|
81
|
-
if (!_this.box) {
|
82
|
-
footnoteContent = $("[id='" + _this.footnoteId + "']").children().filter(":not('" + _this.options.hideFromContent + "')");
|
83
|
-
linkOffset = _this.el.offset();
|
84
|
-
_this.box = $("<div />", {
|
85
|
-
id: _this.options.boxId,
|
86
|
-
html: footnoteContent.clone().find(_this.options.hideFromContent).remove().end(),
|
87
|
-
css: {
|
88
|
-
position: "absolute",
|
89
|
-
top: linkOffset.top,
|
90
|
-
left: linkOffset.left + _this.el.outerWidth()
|
91
|
-
}
|
92
|
-
}).appendTo("body");
|
93
|
-
return _this.positionBox();
|
94
|
-
}
|
95
|
-
};
|
96
|
-
this.closeBox = function(event) {
|
97
|
-
if (_this.box) {
|
98
|
-
if (_this.isHoveringFootnote(event)) {
|
99
|
-
clearTimeout(_this.closeTimeout);
|
100
|
-
return _this.closeTimeout = null;
|
101
|
-
} else {
|
102
|
-
if (!_this.closeTimeout) {
|
103
|
-
return _this.closeTimeout = setTimeout((function() {
|
104
|
-
_this.box.remove();
|
105
|
-
return _this.box = null;
|
106
|
-
}), _this.options.hideDelay);
|
107
|
-
}
|
108
|
-
}
|
109
|
-
}
|
110
|
-
};
|
111
|
-
this.isHoveringFootnote = function(event) {
|
112
|
-
return this.box.is(event.target) || $(event.target).closest(this.box).length > 0 || event.target === this.el[0];
|
113
|
-
};
|
114
|
-
this.positionBox = function() {
|
115
|
-
var boxHorizontalPadding, boxLeft, boxWidth, linkLeftOffset, windowWidth;
|
116
|
-
boxHorizontalPadding = parseInt(this.box.css("padding-left")) + parseInt(this.box.css("padding-right"));
|
117
|
-
linkLeftOffset = this.el.offset().left;
|
118
|
-
windowWidth = $(window).width();
|
119
|
-
if ((windowWidth / 2) > linkLeftOffset) {
|
120
|
-
boxLeft = linkLeftOffset + 20;
|
121
|
-
boxWidth = windowWidth - boxLeft - boxHorizontalPadding - this.options.boxMargin * 2;
|
122
|
-
if (boxWidth > this.options.maximumBoxWidth) {
|
123
|
-
boxWidth = this.options.maximumBoxWidth;
|
124
|
-
}
|
125
|
-
} else {
|
126
|
-
boxWidth = linkLeftOffset - boxHorizontalPadding - this.options.boxMargin * 2;
|
127
|
-
if (boxWidth > this.options.maximumBoxWidth) {
|
128
|
-
boxWidth = this.options.maximumBoxWidth;
|
129
|
-
}
|
130
|
-
boxLeft = linkLeftOffset - boxWidth - this.options.boxMargin * 2;
|
131
|
-
}
|
132
|
-
return this.box.css({
|
133
|
-
width: boxWidth,
|
134
|
-
left: boxLeft
|
135
|
-
});
|
136
|
-
};
|
137
|
-
return this.initialize();
|
138
|
-
};
|
139
|
-
$.inlineFootnote.defaultOptions = {
|
140
|
-
boxMargin: 20,
|
141
|
-
hideDelay: 200,
|
142
|
-
hideFromContent: "[rel=footnote]",
|
143
|
-
maximumBoxWidth: 500,
|
144
|
-
boxId: "footnote_box"
|
145
|
-
};
|
146
|
-
return $.fn.inlineFootnote = function(options) {
|
147
|
-
return this.each(function() {
|
148
|
-
return new $.inlineFootnote(this, options);
|
149
|
-
});
|
150
|
-
};
|
151
|
-
})(jQuery);
|
152
|
-
|
153
|
-
}).call(this);
|
154
|
-
</script>
|
155
|
-
|
156
|
-
<script>
|
157
|
-
$(function() {
|
158
|
-
$("[rel=footnote]").inlineFootnote();
|
159
|
-
});
|
160
|
-
</script>
|
161
|
-
<script>
|
162
|
-
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
|
163
|
-
//
|
164
|
-
// AnchorJS - v4.2.2 - 2020-04-20
|
165
|
-
// https://www.bryanbraun.com/anchorjs/
|
166
|
-
// Copyright (c) 2020 Bryan Braun; Licensed MIT
|
167
|
-
//
|
168
|
-
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
|
169
|
-
!function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=p(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",e.sheet.cssRules.length),e.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",e.sheet.cssRules.length),e.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",e.sheet.cssRules.length),e.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o<e.length;o++)if(this.hasAnchorJSLink(e[o]))d.push(o);else{if(e[o].hasAttribute("id"))n=e[o].getAttribute("id");else if(e[o].hasAttribute("data-anchor-id"))n=e[o].getAttribute("data-anchor-id");else{for(c=r=this.urlify(e[o].textContent),a=0;void 0!==s&&(c=r+"-"+a),a+=1,-1!==(s=i.indexOf(c)););s=void 0,i.push(c),e[o].setAttribute("id",c),n=c}(h=document.createElement("a")).className="anchorjs-link "+this.options.class,h.setAttribute("aria-label",this.options.ariaLabel),h.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(h.title=this.options.titleText),u=document.querySelector("base")?window.location.pathname+window.location.search:"",u=this.options.base||u,h.href=u+"#"+n,"always"===l&&(h.style.opacity="1"),""===this.options.icon&&(h.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(h.style.lineHeight="inherit")),"left"===this.options.placement?(h.style.position="absolute",h.style.marginLeft="-1em",h.style.paddingRight="0.5em",e[o].insertBefore(h,e[o].firstChild)):(h.style.paddingLeft="0.375em",e[o].appendChild(h))}for(o=0;o<d.length;o++)e.splice(d[o]-o,1);return this.elements=this.elements.concat(e),this},this.remove=function(A){for(var e,t,i=p(A),n=0;n<i.length;n++)(t=i[n].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[n]))&&this.elements.splice(e,1),i[n].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||f(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}});
|
170
|
-
// @license-end
|
171
|
-
</script>
|
172
|
-
<script>
|
173
|
-
anchors.options = {
|
174
|
-
placement: 'left'
|
175
|
-
};
|
176
|
-
anchors.add('h1, h2, h3, h4');
|
177
|
-
</script>
|
178
|
-
|