asciidoctor-iso 0.9.9 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -0
  3. data/README.adoc +49 -9
  4. data/asciidoctor-iso.gemspec +3 -3
  5. data/lib/asciidoctor-iso.rb +2 -0
  6. data/lib/asciidoctor/iso/base.rb +14 -0
  7. data/lib/asciidoctor/iso/blocks.rb +1 -1
  8. data/lib/asciidoctor/iso/cleanup.rb +2 -2
  9. data/lib/asciidoctor/iso/cleanup_ref.rb +1 -1
  10. data/lib/asciidoctor/iso/inline.rb +1 -1
  11. data/lib/asciidoctor/iso/macros.rb +54 -0
  12. data/lib/asciidoctor/iso/ref.rb +7 -2
  13. data/lib/asciidoctor/iso/validate.rb +8 -8
  14. data/lib/asciidoctor/iso/validate_requirements.rb +5 -5
  15. data/lib/asciidoctor/iso/version.rb +1 -1
  16. data/lib/isodoc/iso/html/header.html +206 -0
  17. data/lib/isodoc/iso/html/html_iso_intro.html +34 -0
  18. data/lib/isodoc/iso/html/html_iso_titlepage.html +34 -0
  19. data/lib/isodoc/iso/html/htmlstyle.scss +46 -0
  20. data/lib/isodoc/iso/html/isodoc.scss +696 -0
  21. data/lib/isodoc/iso/html/scripts.html +174 -0
  22. data/lib/isodoc/iso/html/style-human.scss +1277 -0
  23. data/lib/isodoc/iso/html/style-iso.scss +1257 -0
  24. data/lib/isodoc/iso/html/word_iso_intro.html +72 -0
  25. data/lib/isodoc/iso/html/word_iso_titlepage.html +62 -0
  26. data/lib/isodoc/iso/html/wordstyle.scss +1175 -0
  27. data/lib/isodoc/iso/html_convert.rb +136 -0
  28. data/lib/isodoc/iso/metadata.rb +107 -0
  29. data/lib/isodoc/iso/word_convert.rb +139 -0
  30. data/spec/asciidoctor-iso/isobib_cache_spec.rb +18 -4
  31. data/spec/asciidoctor-iso/macros_spec.rb +92 -1
  32. data/spec/asciidoctor-iso/validate_spec.rb +173 -144
  33. data/spec/assets/header.html +7 -0
  34. data/spec/assets/html.css +2 -0
  35. data/spec/assets/htmlcover.html +4 -0
  36. data/spec/assets/htmlintro.html +5 -0
  37. data/spec/assets/i18n.yaml +2 -0
  38. data/spec/assets/iso.doc +2312 -0
  39. data/spec/assets/iso.headless.html +33 -0
  40. data/spec/assets/iso.html +1388 -0
  41. data/spec/assets/iso.xml +8 -0
  42. data/spec/assets/rice_image1.png +0 -0
  43. data/spec/assets/scripts.html +3 -0
  44. data/spec/assets/std.css +2 -0
  45. data/spec/assets/word.css +2 -0
  46. data/spec/assets/wordcover.html +3 -0
  47. data/spec/assets/wordintro.html +4 -0
  48. data/spec/examples/103_01_02.html +247 -0
  49. data/spec/isodoc/i18n_spec.rb +642 -0
  50. data/spec/isodoc/iso_spec.rb +168 -0
  51. data/spec/isodoc/metadata_spec.rb +152 -0
  52. data/spec/isodoc/postproc_spec.rb +409 -0
  53. data/spec/isodoc/section_spec.rb +522 -0
  54. data/spec/isodoc/xref_spec.rb +1337 -0
  55. data/spec/spec_helper.rb +45 -0
  56. metadata +45 -9
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <div xmlns:epub="http://www.idpf.org/2007/ops">
4
+
5
+
6
+ <div class="title-section">
7
+ <p>&#xA0;</p>
8
+ </div>
9
+ <br />
10
+ <div class="prefatory-section">
11
+ <p>&#xA0;</p>
12
+ </div>
13
+ <br />
14
+ <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
15
+ <br />
16
+ <div>
17
+ <h1 class="ForewordTitle">Foreword</h1>
18
+ <div id="" class="Note">
19
+ <p><span class="note_label">NOTE</span>&#xA0; These results are based on a study carried out on three different types of kernel.</p>
20
+ </div>
21
+ </div>
22
+ <p class="zzSTDTitle1"></p>
23
+ </main>
24
+ <script type="text/x-mathjax-config">
25
+ MathJax.Hub.Config({
26
+ asciimath2jax: {
27
+ delimiters: [['(#(', ')#)']]
28
+ }
29
+ });
30
+ </script>
31
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=AM_HTMLorMML"></script>
32
+
33
+ </div>
@@ -0,0 +1,1388 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
4
+ <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <title>spec/assets/iso</title><style>
6
+ <!--
7
+ @charset "UTF-8";
8
+ /*
9
+ 0 CSS RESET
10
+ */
11
+ /* http://meyerweb.com/eric/tools/css/reset/
12
+ v2.0 | 20110126
13
+ License: none (public domain)
14
+ */
15
+ html, body, div, span, applet, object, iframe,
16
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
17
+ a, abbr, acronym, address, big, cite, code,
18
+ del, dfn, em, img, ins, kbd, q, s, samp,
19
+ small, strike, strong, sub, sup, tt, var,
20
+ b, u, i, center,
21
+ ol, ul, li,
22
+ fieldset, form, label, legend,
23
+ table, caption, tbody, tfoot, thead, tr, th, td,
24
+ article, aside, canvas, details, embed,
25
+ figure, figcaption, footer, header, hgroup,
26
+ menu, nav, output, ruby, section, summary,
27
+ time, mark, audio, video {
28
+ margin: 0;
29
+ padding: 0; }
30
+
31
+ html, body, div, span, applet, object, iframe,
32
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
33
+ a, abbr, acronym, address, big, cite, code,
34
+ del, dfn, em, img, ins, kbd, q, s, samp,
35
+ small, strike, strong, sub, sup, tt, var,
36
+ b, u, i, center,
37
+ dl, dt, dd, ol, ul, li,
38
+ fieldset, form, label, legend,
39
+ table, caption, tbody, tfoot, thead, tr, th, td,
40
+ article, aside, canvas, details, embed,
41
+ figure, figcaption, footer, header, hgroup,
42
+ menu, nav, output, ruby, section, summary,
43
+ time, mark, audio, video {
44
+ border: 0;
45
+ font-size: 100%; }
46
+
47
+ html, body, div, span, applet, object, iframe,
48
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
49
+ a, abbr, acronym, address, big, cite, code,
50
+ del, dfn, em, img, ins, kbd, q, s, samp,
51
+ small, strike, strong, tt, var,
52
+ b, u, i, center,
53
+ dl, dd, ol, ul, li,
54
+ fieldset, form, label, legend,
55
+ table, caption, tbody, tfoot, thead, tr, th, td,
56
+ article, aside, canvas, details, embed,
57
+ figure, figcaption, footer, header, hgroup,
58
+ menu, nav, output, ruby, section, summary,
59
+ time, mark, audio, video {
60
+ vertical-align: baseline; }
61
+
62
+ html, body, div, span, applet, object, iframe,
63
+ p, blockquote, pre,
64
+ a, abbr, acronym, address, big, cite, code,
65
+ del, dfn, em, img, ins, kbd, q, s, samp,
66
+ small, strike, strong, sub, sup, tt, var,
67
+ b, u, i, center,
68
+ dl, dt, dd, ol, ul, li,
69
+ fieldset, form, label, legend,
70
+ table, caption, tbody, tfoot, thead, tr, th, td,
71
+ article, aside, canvas, details, embed,
72
+ figure, figcaption, footer, header, hgroup,
73
+ menu, nav, output, ruby, section, summary,
74
+ time, mark, audio, video {
75
+ font-family: "Cambria", serif; }
76
+
77
+ dl {
78
+ display: grid;
79
+ grid-template-columns: max-content auto; }
80
+
81
+ dt {
82
+ grid-column-start: 1; }
83
+
84
+ dd {
85
+ grid-column-start: 2; }
86
+
87
+ dd p, dt p {
88
+ margin-top: 0px; }
89
+
90
+ h1, h2, h3, h4, h5, h6, .h2Annex {
91
+ font-family: "Cambria", serif; }
92
+
93
+ /* HTML5 display-role reset for older browsers */
94
+ article, aside, details, figcaption, figure,
95
+ footer, header, hgroup, menu, nav, section {
96
+ display: block; }
97
+
98
+ body {
99
+ line-height: 1.3; }
100
+
101
+ blockquote, q {
102
+ quotes: none; }
103
+
104
+ blockquote:before, blockquote:after,
105
+ q:before, q:after {
106
+ content: '';
107
+ content: none; }
108
+
109
+ table {
110
+ border-collapse: collapse;
111
+ border-spacing: 0; }
112
+
113
+ /* New CSS */
114
+ body {
115
+ margin-left: 298px;
116
+ margin-right: 2em; }
117
+
118
+ main {
119
+ padding-left: 4em;
120
+ padding-right: 2em; }
121
+
122
+ .title-section, .prefatory-section {
123
+ padding-left: 4em;
124
+ padding-top: 2em; }
125
+
126
+ .coverpage_docnumber, .coverpage_techcommittee {
127
+ text-align: right;
128
+ font-size: 0.9em;
129
+ line-height: 0.5em; }
130
+
131
+ .doctitle-en, .doctitle-fr {
132
+ margin-top: 2em;
133
+ text-align: left; }
134
+
135
+ .doctitle-en {
136
+ padding-left: 3em;
137
+ margin-left: -3em;
138
+ padding-top: 2em;
139
+ padding-bottom: 2em; }
140
+
141
+ .doctitle-en span {
142
+ font-size: 2em;
143
+ line-height: 1.5em;
144
+ display: block; }
145
+
146
+ .doctitle-fr span {
147
+ font-size: 1.5em;
148
+ line-height: 1.2em;
149
+ font-style: italic;
150
+ display: block; }
151
+
152
+ span.title {
153
+ text-transform: uppercase;
154
+ font-size: 1em;
155
+ font-weight: 800; }
156
+
157
+ .coverpage_docstage {
158
+ margin-top: 2em;
159
+ margin-bottom: 2em; }
160
+
161
+ .coverpage_warning {
162
+ font-size: 0.9em;
163
+ font-style: italic;
164
+ padding-bottom: 1em; }
165
+
166
+ .copyright .year, .copyright .message,
167
+ .copyright .name, .copyright .address {
168
+ margin-top: 1em;
169
+ display: block; }
170
+
171
+ .copyright .message, .copyright .name,
172
+ .copyright .address {
173
+ font-size: 0.9em; }
174
+
175
+ /* TYPOGRAPHY */
176
+ h1 {
177
+ font-size: 1.5em;
178
+ line-height: 2em;
179
+ margin-top: 2em;
180
+ margin-bottom: 1em; }
181
+
182
+ h2 {
183
+ font-size: 1.2em;
184
+ line-height: 1.5em;
185
+ margin-top: 2em;
186
+ margin-bottom: 1em; }
187
+
188
+ h1, h2, h3, h4, h5, h6 {
189
+ line-height: 1.2; }
190
+
191
+ p {
192
+ margin-top: 1em;
193
+ margin-bottom: 1em; }
194
+
195
+ p.zzSTDTitle1 {
196
+ font-weight: 700;
197
+ font-size: 1.5em; }
198
+
199
+ span.obligation {
200
+ font-weight: 400; }
201
+
202
+ a {
203
+ color: black;
204
+ text-decoration-color: black; }
205
+
206
+ nav a {
207
+ text-decoration: none;
208
+ color: black; }
209
+
210
+ h2 p {
211
+ display: inline; }
212
+
213
+ ul li {
214
+ list-style: none; }
215
+
216
+ ul li p:before {
217
+ content: "—";
218
+ display: inline-block;
219
+ width: 1em;
220
+ margin-left: -1.5em;
221
+ margin-right: 0.5em; }
222
+
223
+ li p {
224
+ /* display: inline-block; */
225
+ margin-bottom: 0.6em;
226
+ line-height: 1.2; }
227
+
228
+ #toc li:before {
229
+ content: " ";
230
+ display: none; }
231
+
232
+ p.AltTerms {
233
+ margin-bottom: 0;
234
+ font-style: italic;
235
+ margin-left: 2em; }
236
+
237
+ p.Terms {
238
+ font-weight: bold; }
239
+
240
+ /* Navigation*/
241
+ @media (min-width: 768px) {
242
+ nav {
243
+ position: fixed;
244
+ top: 0;
245
+ bottom: 0;
246
+ left: 0;
247
+ width: 278px;
248
+ font-size: 0.9em;
249
+ overflow: auto;
250
+ padding: 0 0 0 20px;
251
+ background-color: #f7f7f7;
252
+ line-height: 1.2em; }
253
+
254
+ #toggle {
255
+ position: fixed;
256
+ height: 100%;
257
+ width: 30px;
258
+ border-right: solid black 1px;
259
+ background-color: #f7f7f7;
260
+ color: black !important;
261
+ cursor: pointer;
262
+ margin-left: -4em;
263
+ margin-top: -2em; }
264
+
265
+ #toggle span {
266
+ text-align: center;
267
+ width: 100%;
268
+ position: absolute;
269
+ top: 50%;
270
+ transform: translate(0, -50%); }
271
+
272
+ .container {
273
+ padding-left: 360px; }
274
+
275
+ .rule.toc {
276
+ display: none; }
277
+
278
+ h1.toc-contents {
279
+ margin-top: 1em; }
280
+
281
+ ul#toc-list {
282
+ padding: 0;
283
+ margin: 0; } }
284
+ @media (max-width: 768px) {
285
+ #toc {
286
+ padding: 0 1.5em 0 1.5em;
287
+ overflow: visible; }
288
+
289
+ #toggle {
290
+ display: none;
291
+ margin-left: -4em;
292
+ margin-top: -2em; }
293
+
294
+ body {
295
+ margin-left: 2em; }
296
+
297
+ main {
298
+ padding: 0; }
299
+
300
+ .title-section, .prefatory-section {
301
+ padding-left: 0;
302
+ padding-top: 0;
303
+ width: 100%; } }
304
+ #toc ul {
305
+ margin: 0;
306
+ padding: 0;
307
+ list-style: none; }
308
+
309
+ #toc li {
310
+ padding: 5px 10px; }
311
+
312
+ #toc a {
313
+ text-decoration: none;
314
+ display: block; }
315
+
316
+ #toc a:hover {
317
+ color: black; }
318
+
319
+ #toc .h2 {
320
+ padding-left: 30px; }
321
+
322
+ #toc .h3 {
323
+ padding-left: 50px; }
324
+
325
+ #toc .toc-active a {
326
+ color: black; }
327
+
328
+ /*#toc .toc-active, #toc li:hover {
329
+ background: #1d1d1d;
330
+ box-shadow: inset -5px 0px 10px -5px #1d1d1d!important;
331
+ }*/
332
+ #toc .toc-active, #toc li:hover {
333
+ box-shadow: 0px 1px 0px 0px black !important;
334
+ color: black; }
335
+
336
+ #toc li:hover a {
337
+ color: black; }
338
+
339
+ /*
340
+ Document types + stages
341
+ */
342
+ .document-type-band {
343
+ left: 0;
344
+ top: 180px;
345
+ height: 100%;
346
+ position: fixed;
347
+ display: block;
348
+ z-index: 99;
349
+ /*box-shadow: -5px 0px 10px #1d1d1d*/ }
350
+
351
+ .document-stage-band {
352
+ left: 0;
353
+ top: 0;
354
+ height: 100%;
355
+ position: fixed;
356
+ display: block;
357
+ z-index: 98;
358
+ box-shadow: -5px 0px 10px #1d1d1d; }
359
+
360
+ .document-type {
361
+ position: relative;
362
+ width: 25px; }
363
+
364
+ .document-stage {
365
+ position: relative;
366
+ width: 25px; }
367
+
368
+ p.document-type, p.document-stage {
369
+ color: white;
370
+ text-transform: uppercase;
371
+ font-size: 0.9em;
372
+ font-weight: 400;
373
+ letter-spacing: 0.05em;
374
+ margin: 0;
375
+ margin-left: 6px;
376
+ writing-mode: tb-rl;
377
+ -webkit-transform: rotate(180deg);
378
+ -moz-transform: rotate(180deg);
379
+ -o-transform: rotate(180deg);
380
+ white-space: nowrap;
381
+ display: block;
382
+ bottom: 0; }
383
+
384
+ p.document-type {
385
+ font-weight: 400;
386
+ height: 210px; }
387
+
388
+ #governance-band p.document-type {
389
+ font-weight: 400;
390
+ height: 230px !important; }
391
+
392
+ p.document-stage {
393
+ font-weight: 300;
394
+ height: 160px; }
395
+
396
+ #standard-band {
397
+ background-color: #0ac442; }
398
+
399
+ #standard {
400
+ border-bottom: solid 3px #0ac442; }
401
+
402
+ #governance {
403
+ border-bottom: solid 3px #750697; }
404
+
405
+ #governance-band {
406
+ background-color: #750697; }
407
+
408
+ #guide {
409
+ border-bottom: solid 3px #48a0e7; }
410
+
411
+ #guide-band {
412
+ background-color: #48a0e7; }
413
+
414
+ .coverpage-maturity {
415
+ font-family: 'Overpass', sans-serif;
416
+ font-weight: 400;
417
+ font-size: 1em;
418
+ margin: 0 0 2em 0;
419
+ text-transform: uppercase; }
420
+
421
+ #working-draft {
422
+ border-bottom: solid 3px #fda706; }
423
+
424
+ #working-draft-band {
425
+ background-color: #fda706; }
426
+
427
+ #committee-draft {
428
+ border-bottom: solid 3px #fd06fd; }
429
+
430
+ #committee-draft-band {
431
+ background-color: #fd06fd; }
432
+
433
+ #draft-standard {
434
+ border-bottom: solid 3px #fdf906; }
435
+
436
+ #draft-standard {
437
+ border-bottom: solid 3px #fdf906; }
438
+
439
+ #standard {
440
+ border-bottom: solid 3px #0ac442; }
441
+
442
+ #standard-band {
443
+ background-color: #0ac442; }
444
+
445
+ #obsolete {
446
+ border-bottom: solid 3px #7e0d13; }
447
+
448
+ #obsolete-band {
449
+ background-color: #7e0d13; }
450
+
451
+ /* 3 Other styles */
452
+ /*
453
+ 3.3 Lists
454
+ */
455
+ ul, ol {
456
+ margin-left: 2em; }
457
+
458
+ #toc-list ul {
459
+ margin-bottom: 0.25em; }
460
+
461
+ #toc-list ol li {
462
+ list-style-type: none; }
463
+
464
+ /*
465
+ 3.4 Rules
466
+ */
467
+ .rule {
468
+ width: 100%;
469
+ height: 1px;
470
+ background-color: #0e1a85;
471
+ margin: 2em 0; }
472
+
473
+ /*
474
+ 3.5 Bibliograhy
475
+ */
476
+ p.Biblio, p.NormRef {
477
+ margin-top: 1em;
478
+ margin-left: 2em; }
479
+
480
+ /*
481
+ 3.6 Source Code + figures
482
+ */
483
+ .Sourcecode {
484
+ font-family: "Courier New", monospace; }
485
+
486
+ .figure, .Sourcecode {
487
+ background-color: #f7f7f7;
488
+ line-height: 1.6em;
489
+ padding: 1.5em;
490
+ margin: 2em 0 1em 0;
491
+ overflow: auto; }
492
+
493
+ .figure-title, .FigureTitle {
494
+ font-weight: 700;
495
+ font-size: 1em;
496
+ text-align: center; }
497
+
498
+ /*
499
+ 3.7 Notes
500
+ */
501
+ .Note, .note {
502
+ background-color: #fff495;
503
+ color: #47430c;
504
+ padding: 0.5em;
505
+ margin: 1.5em 0 1.5em 0;
506
+ text-align: left; }
507
+
508
+ .Note p, .note p {
509
+ margin: 0; }
510
+
511
+ /*
512
+ 3.8 Examples
513
+ */
514
+ .example {
515
+ background-color: #e1eef1;
516
+ padding: 0.5em;
517
+ margin: 2em 0 1em 0;
518
+ text-align: left; }
519
+
520
+ .example p {
521
+ margin: 0; }
522
+
523
+ .example .example-title {
524
+ font-weight: 700;
525
+ text-transform: uppercase;
526
+ text-align: center;
527
+ margin-top: 0; }
528
+
529
+ /*
530
+ 3.9 Tables
531
+ */
532
+ table {
533
+ border-collapse: collapse;
534
+ width: 100%;
535
+ font-weight: 300;
536
+ margin: 1em 0 2em 0;
537
+ margin-left: auto;
538
+ margin-right: auto;
539
+ padding-right: 2em;
540
+ text-align: center; }
541
+
542
+ table, th, td {
543
+ border: 1px solid black;
544
+ font-size: 0.95em; }
545
+
546
+ td, th {
547
+ padding: 1em !important; }
548
+
549
+ td.header {
550
+ font-weight: 400; }
551
+
552
+ p.TableTitle {
553
+ text-align: center;
554
+ margin-top: 2.5em;
555
+ font-weight: 800;
556
+ font-size: 1.1em; }
557
+
558
+ .TableFootnote {
559
+ text-align: left !important; }
560
+
561
+ /*
562
+ 3.10 Footnotes
563
+ */
564
+ a.footnote-number, a.TableFootnoteRef {
565
+ vertical-align: super;
566
+ font-size: 0.8em; }
567
+
568
+ .footnote {
569
+ font-size: 0.9em; }
570
+
571
+ sup a {
572
+ vertical-align: super;
573
+ font-size: 0.8em; }
574
+
575
+ #footnote_box {
576
+ font-size: 14px;
577
+ background: white;
578
+ padding: 0 10px;
579
+ margin: 10px;
580
+ border: 1px solid #888;
581
+ -moz-box-shadow: 0px 0px 5px #888;
582
+ -webkit-box-shadow: 0px 0px 5px #888;
583
+ box-shadow: 0px 0px 5px #888; }
584
+
585
+ ol.footnotes-list, aside.footnote {
586
+ margin-left: 1em; }
587
+
588
+ ol.footnotes-list li, aside.footnote {
589
+ font-size: 0.9em;
590
+ vertical-align: top;
591
+ list-style: decimal;
592
+ margin-bottom: 1em; }
593
+
594
+ ol.footnotes-list:first-child {
595
+ margin-top: 2em; }
596
+
597
+ ol.footnotes-list p, aside.footnote p {
598
+ display: inline; }
599
+
600
+ ol li p:before {
601
+ content: "";
602
+ display: none; }
603
+
604
+ /*
605
+ 3.11 Blockquotes
606
+ */
607
+ .blockquote, .Quote {
608
+ background-color: #f7f7f7;
609
+ font-style: italic;
610
+ width: 80%;
611
+ padding: 1.5em;
612
+ margin-top: 2em;
613
+ margin-left: auto;
614
+ margin-right: auto; }
615
+
616
+ /*
617
+ 3.12 Formulas
618
+ */
619
+ .formula {
620
+ background-color: #f7f7f7;
621
+ padding: 1.5em;
622
+ margin-top: 2em;
623
+ text-align: center;
624
+ margin-left: 20%;
625
+ margin-right: 20%; }
626
+
627
+ /*
628
+ Keywords
629
+ */
630
+ span.keyword {
631
+ font-weight: 600; }
632
+
633
+ .Admonition, .admonition {
634
+ background-color: #ffb3b3;
635
+ /* color: #47430c;*/
636
+ padding: 0.5em;
637
+ margin: 1.5em 0 1.5em 0;
638
+ text-align: left; }
639
+
640
+ .Admonition p, .admonition p {
641
+ margin: 0; }
642
+
643
+ /* Old CSS
644
+ p.MsoCommentText, li.MsoCommentText, div.MsoCommentText {
645
+ margin-top: 0cm;
646
+ margin-right: 0cm;
647
+ margin-bottom: 12.0pt;
648
+ margin-left: 0cm;
649
+ text-align: justify;
650
+ line-height: 12.0pt;
651
+ tab-stops: 20.15pt;
652
+ font-size: 12.0pt;
653
+ font-family: "Cambria", serif; }
654
+
655
+ p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject {
656
+ margin-top: 0cm;
657
+ margin-right: 0cm;
658
+ margin-bottom: 12.0pt;
659
+ margin-left: 0cm;
660
+ text-align: justify;
661
+ line-height: 12.0pt;
662
+ tab-stops: 20.15pt;
663
+ font-size: 10.0pt;
664
+ font-family: "Cambria", serif;
665
+ font-weight: bold;
666
+ }
667
+
668
+ p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode {
669
+ margin-top: 0cm;
670
+ margin-right: 0cm;
671
+ margin-bottom: 12.0pt;
672
+ margin-left: 0cm;
673
+ text-align: left;
674
+ line-height: 12.0pt;
675
+ tab-stops: 20.15pt;
676
+ font-size: 9.0pt;
677
+ font-family: "Courier New", monospace; }
678
+
679
+ p.Biblio, li.Biblio, div.Biblio {
680
+ margin-top: 0cm;
681
+ margin-right: 0cm;
682
+ margin-bottom: 12.0pt;
683
+ margin-left: 33.15pt;
684
+ text-indent: -33.15pt;
685
+ tab-stops: 33.15pt;
686
+ line-height: 12.0pt;
687
+ font-size: 11.0pt;
688
+ font-family: "Cambria", serif; }
689
+
690
+ p.FigureTitle {
691
+ margin-top: 0cm;
692
+ margin-right: 0cm;
693
+ margin-bottom: 6.0pt;
694
+ margin-left: 0cm;
695
+ text-align: center;
696
+ line-height: 12.0pt;
697
+ page-break-before: avoid;
698
+ tab-stops: 20.15pt;
699
+ font-size: 11.0pt;
700
+ font-family: "Cambria", serif;
701
+ font-weight: bold; }
702
+
703
+ p.TableTitle {
704
+ margin-top: 0cm;
705
+ margin-right: 0cm;
706
+ margin-bottom: 6.0pt;
707
+ margin-left: 0cm;
708
+ text-align: center;
709
+ page-break-after: avoid;
710
+ line-height: 12.0pt;
711
+ tab-stops: 20.15pt;
712
+ font-size: 11.0pt;
713
+ font-weight: bold;
714
+ font-family: "Cambria", serif; }
715
+
716
+ p.Note, div.Note, li.Note, p.TableFootnote, div.TableFootnote, li.TableFootnote {
717
+ margin-top: 0cm;
718
+ margin-right: 0cm;
719
+ margin-bottom: 12.0pt;
720
+ margin-left: 0cm;
721
+ text-align: justify;
722
+ line-height: 12.0pt;
723
+ tab-stops: 20.15pt;
724
+ font-size: 10.0pt;
725
+ font-family: "Cambria", serif; }
726
+
727
+ /* may need to be revised */
728
+ /*
729
+ p.ANNEX, li.ANNEX, div.ANNEX {
730
+ margin-top: 0cm;
731
+ margin-right: 0cm;
732
+ margin-bottom: 24.0pt;
733
+ margin-left: 0cm;
734
+ text-align: center;
735
+ text-indent: 0cm;
736
+ line-height: 15.5pt;
737
+ page-break-before: always;
738
+ page-break-after: avoid;
739
+ tab-stops: 20.15pt;
740
+ font-size: 14.0pt;
741
+ font-family: "Cambria", serif;
742
+ font-weight: bold; }
743
+
744
+ p.BiblioTitle, li.BiblioTitle, div.BiblioTitle {
745
+ margin-top: 0cm;
746
+ margin-right: 0cm;
747
+ margin-bottom: 15.5pt;
748
+ margin-left: 0cm;
749
+ text-align: center;
750
+ line-height: 15.5pt;
751
+ tab-stops: 20.15pt;
752
+ font-size: 14.0pt;
753
+ font-family: "Cambria", serif;
754
+ font-weight: bold; }
755
+
756
+ p.Definition, li.Definition, div.Definition {
757
+ margin-top: 0cm;
758
+ margin-right: 0cm;
759
+ margin-bottom: 12.0pt;
760
+ margin-left: 0cm;
761
+ text-align: justify;
762
+ line-height: 12.0pt;
763
+ tab-stops: 20.15pt;
764
+ font-size: 11.0pt;
765
+ font-family: "Cambria", serif; }
766
+
767
+ p.ForewordTitle, li.ForewordTitle, div.ForewordTitle {
768
+ margin-top: 0cm;
769
+ margin-right: 0cm;
770
+ margin-bottom: 15.5pt;
771
+ margin-left: 0cm;
772
+ text-align: justify;
773
+ line-height: 15.5pt;
774
+ page-break-before: always;
775
+ page-break-after: avoid;
776
+ tab-stops: 20.15pt;
777
+ font-size: 14.0pt;
778
+ font-family: "Cambria", serif;
779
+ font-weight: bold; }
780
+
781
+ p.IntroTitle, li.IntroTitle, div.IntroTitle {
782
+ margin-top: 0cm;
783
+ margin-right: 0cm;
784
+ margin-bottom: 15.5pt;
785
+ margin-left: 0cm;
786
+ text-align: justify;
787
+ line-height: 15.5pt;
788
+ page-break-after: avoid;
789
+ tab-stops: 20.15pt;
790
+ font-size: 14.0pt;
791
+ page-break-before: always;
792
+ font-family: "Cambria", serif;
793
+ font-weight: bold; }
794
+
795
+ p.Terms, li.Terms, div.Terms {
796
+ margin: 0cm;
797
+ margin-bottom: .0001pt;
798
+ line-height: 12.0pt;
799
+ page-break-after: avoid;
800
+ tab-stops: 20.15pt;
801
+ font-size: 11.0pt;
802
+ font-family: "Cambria", serif;
803
+ font-weight: bold; }
804
+
805
+ p.AltTerms, li.AltTerms, div.AltTerms {
806
+ margin: 0cm;
807
+ margin-bottom: .0001pt;
808
+ line-height: 12.0pt;
809
+ page-break-after: avoid;
810
+ tab-stops: 20.15pt;
811
+ font-size: 11.0pt;
812
+ font-family: "Cambria", serif; }
813
+
814
+ p.DeprecatedTerms, li.DeprecatedTerms, div.DeprecatedTerms {
815
+ margin: 0cm;
816
+ margin-bottom: .0001pt;
817
+ line-height: 12.0pt;
818
+ page-break-after: avoid;
819
+ tab-stops: 20.15pt;
820
+ font-size: 11.0pt;
821
+ font-family: "Cambria", serif; }
822
+
823
+ p.TermNum, li.TermNum, div.TermNum {
824
+ margin: 0cm;
825
+ margin-bottom: .0001pt;
826
+ line-height: 12.0pt;
827
+ page-break-after: avoid;
828
+ tab-stops: 20.15pt;
829
+ font-size: 11.0pt;
830
+ font-family: "Cambria", serif;
831
+ font-weight: bold; }
832
+
833
+ p.zzContents, li.zzContents, div.zzContents {
834
+ margin-top: 48.0pt;
835
+ margin-right: 0cm;
836
+ margin-bottom: 15.5pt;
837
+ margin-left: 0cm;
838
+ line-height: 15.5pt;
839
+ page-break-before: always;
840
+ page-break-after: avoid;
841
+ tab-stops: 20.15pt;
842
+ font-size: 14.0pt;
843
+ font-family: "Cambria", serif;
844
+ font-weight: bold; }
845
+
846
+ p.zzCopyright, li.zzCopyright, div.zzCopyright {
847
+ margin-top: 0cm;
848
+ margin-right: 14.2pt;
849
+ margin-bottom: 12.0pt;
850
+ margin-left: 14.2pt;
851
+ text-align: justify;
852
+ line-height: 12.0pt;
853
+ tab-stops: 20.15pt 25.7pt 481.15pt;
854
+ border: none;
855
+ padding: 0cm;
856
+ font-size: 11.0pt;
857
+ font-family: "Cambria", serif; }
858
+
859
+ p.zzSTDTitle, li.zzSTDTitle, div.zzSTDTitle {
860
+ margin-top: 20.0pt;
861
+ margin-right: 0cm;
862
+ margin-bottom: 38.0pt;
863
+ margin-left: 0cm;
864
+ line-height: 17.5pt;
865
+ tab-stops: 20.15pt;
866
+ font-size: 16.0pt;
867
+ font-family: "Cambria", serif;
868
+ font-weight: bold; }
869
+
870
+ p.zzSTDTitle1, li.zzSTDTitle1, div.zzSTDTitle1 {
871
+ margin-top: 0pt;
872
+ margin-right: 0cm;
873
+ margin-bottom: 18.0pt;
874
+ margin-left: 0cm;
875
+ line-height: 17.5pt;
876
+ tab-stops: 20.15pt;
877
+ font-size: 16.0pt;
878
+ font-family: "Cambria", serif;
879
+ font-weight: bold; }
880
+
881
+ p.Quote, li.Quote, div.Quote {
882
+ margin-top: 0cm;
883
+ margin-right: 36.0pt;
884
+ margin-bottom: 0cm;
885
+ margin-left: 36.0pt;
886
+ text-align: justify;
887
+ line-height: 12.0pt;
888
+ tab-stops: 20.15pt;
889
+ font-size: 11.0pt;
890
+ font-family: "Cambria", serif; }
891
+
892
+ p.QuoteAttribution {
893
+ text-align: right; }
894
+
895
+ p.Admonition, li.Admonition, div.Admonition {
896
+ border: none;
897
+ padding: 0cm;
898
+ font-size: 12.0pt;
899
+ font-family: "Cambria", serif;
900
+ font-weight: bold; }
901
+
902
+ p.Code, li.Code, div.Code {
903
+ margin: 0cm;
904
+ margin-bottom: .0001pt;
905
+ line-height: 10.0pt;
906
+ tab-stops: 20.15pt;
907
+ font-size: 9.0pt;
908
+ font-family: "Courier New", monospace; }
909
+
910
+ p.Formula, li.Formula, div.Formula {
911
+ margin-top: 0cm;
912
+ margin-right: 0cm;
913
+ margin-bottom: 11.0pt;
914
+ margin-left: 20.15pt;
915
+ line-height: 12.0pt;
916
+ tab-stops: right 487.45pt;
917
+ font-size: 11.0pt;
918
+ font-family: "Cambria", serif; }
919
+
920
+ table.dl {
921
+ margin-top: 0cm;
922
+ margin-right: 0cm;
923
+ margin-bottom: 11.0pt;
924
+ margin-left: 20.15pt; }
925
+
926
+ .h2Annex {
927
+ margin-top: 3.0pt;
928
+ margin-right: 0cm;
929
+ margin-bottom: 12.0pt;
930
+ margin-left: 0cm;
931
+ text-indent: 0cm;
932
+ line-height: 12.5pt;
933
+ page-break-after: avoid;
934
+ tab-stops: 27.0pt 35.0pt;
935
+ font-size: 12.0pt;
936
+ font-family: "Cambria", serif;
937
+ font-weight: bold; }
938
+
939
+ ol {
940
+ margin-bottom: 0cm; }
941
+
942
+ ul {
943
+ margin-bottom: 0cm; }
944
+
945
+ table.MsoISOTable {
946
+ border-collapse: collapse;
947
+ border: solid windowtext 2pt;
948
+ font-size: 10.0pt;
949
+ font-family: "Cambria", serif; }
950
+
951
+ table.MsoISOTable tr {
952
+ page-break-inside: avoid; }
953
+
954
+ table.MsoISOTable th {
955
+ border: solid windowtext 1pt;
956
+ padding: 0cm 2.85pt 0cm 2.85pt; }
957
+
958
+ table.MsoISOTable td {
959
+ border: solid windowtext 1pt;
960
+ padding: 0cm 2.85pt 0cm 2.85pt; }
961
+
962
+ table.MsoTableGrid {
963
+ border: solid windowtext 1.0pt;
964
+ font-size: 10.0pt;
965
+ font-family: "Cambria", serif; }
966
+
967
+ td {
968
+ page-break-inside: avoid; }
969
+
970
+ tr {
971
+ page-break-after: avoid; }
972
+
973
+ span.stem {
974
+ font-family: "Cambria Math",serif;
975
+ font-style: italic; }
976
+
977
+ div.formula {
978
+ tab-stops: right 487.45pt; }
979
+
980
+ body {
981
+ tab-interval: 36.0pt; }
982
+
983
+ dt {
984
+ page-break-inside: avoid;
985
+ page-break-after: avoid; }
986
+
987
+ .coverpage_docnumber {
988
+ text-align: right;
989
+ font-size: 14.0pt;
990
+ font-weight: bold; }
991
+
992
+ .coverpage_techcommittee {
993
+ text-align: right; }
994
+
995
+ .coverpage_docstage {
996
+ text-align: center;
997
+ font-size: 30.0pt;
998
+ color: #485094; }
999
+
1000
+ div.doctitle {
1001
+ margin-top: 100.0pt;
1002
+ text-align: left;
1003
+ font-size: 16.0pt; }
1004
+
1005
+ div.coverpage_warning {
1006
+ border: solid windowtext 1.0pt #485094;
1007
+ padding: 1.0pt 4.0pt 1.0pt 4.0pt #485094;
1008
+ margin-left: 4.25pt;
1009
+ margin-right: 4.25pt; }
1010
+
1011
+ .coverpage_warning {
1012
+ color: #485094;
1013
+ font-size: 10.0pt; }
1014
+
1015
+ .coverpage {
1016
+ text-align: center;
1017
+ margin: 2em 0; }
1018
+
1019
+ .coverpage-logo {
1020
+ color: #485094; }
1021
+
1022
+ .coverpage-tc-name {
1023
+ color: #485094;
1024
+ font-size: 1.2em;
1025
+ line-height: 1.2em;
1026
+ margin: 0.25em 0; }
1027
+
1028
+ .coverpage-doc-identity {
1029
+ background-color: #485094;
1030
+ color: white;
1031
+ font-size: 2em;
1032
+ line-height: 2em;
1033
+ margin: 0.5em 0; }
1034
+
1035
+ .coverpage-title {
1036
+ font-weight: 400; }
1037
+
1038
+ .coverpage-title .title-second {
1039
+ display: none; }
1040
+
1041
+ .coverpage-stage-block {
1042
+ font-style: italic;
1043
+ font-size: 1.25em;
1044
+ font-weight: 600; }
1045
+
1046
+ .coverpage-warning {
1047
+ border-top: solid 1px #f36f36;
1048
+ border-bottom: solid 1px #f36f36;
1049
+ margin: 1em 2em;
1050
+ color: #485094;
1051
+ padding: 1em; }
1052
+
1053
+ .coverpage-warning .title {
1054
+ color: #f36f36;
1055
+ font-weight: 500; }
1056
+
1057
+ .coverpage-warning .content {
1058
+ font-style: italic; }
1059
+
1060
+ .copyright {
1061
+ padding: 1em; }
1062
+
1063
+ .copyright .name {
1064
+ color: #485094;
1065
+ font-weight: 600; }
1066
+
1067
+ .copyright .address {
1068
+ color: #485094; }
1069
+
1070
+ div.rule {
1071
+ width: 100%;
1072
+ height: 1px;
1073
+ background-color: #485094;
1074
+ margin: 2em 0; }
1075
+
1076
+ #toc-list ul {
1077
+ margin-bottom: 0.25em; }
1078
+
1079
+ #toc-list li {
1080
+ list-style-type: none; }
1081
+
1082
+ .MsoTocTextSpan {
1083
+ color: windowtext;
1084
+ display: none;
1085
+ text-decoration: none;
1086
+ text-underline: none; }
1087
+
1088
+ a.TableFootnoteRef {
1089
+ vertical-align: super; }
1090
+
1091
+ aside {
1092
+ font-size: 10.0pt; }
1093
+
1094
+ /*
1095
+ div.example {
1096
+ border:solid black .25pt;
1097
+
1098
+ padding:10pt;
1099
+
1100
+ margin:10pt;
1101
+
1102
+ }
1103
+ */
1104
+ /*
1105
+ div.example {
1106
+ margin-left: 70.9pt;
1107
+ text-indent: -70.9pt; }
1108
+
1109
+ p.example, li.example, div.example, td.example, td.example p {
1110
+ margin: 0in;
1111
+ margin-bottom: .0001pt;
1112
+ font-size: 10.0pt;
1113
+ font-family: "Cambria", serif; }
1114
+
1115
+ span.note_label, span.example_label, td.example_label, td.note_label {
1116
+ font-size: 10.0pt;
1117
+ font-family: "Cambria", serif; }*/
1118
+
1119
+ -->
1120
+ </style>
1121
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
1122
+
1123
+ <!--TOC script import-->
1124
+ <script type="text/javascript" src="https://cdn.rawgit.com/jgallen23/toc/0.3.2/dist/toc.min.js"></script>
1125
+
1126
+ <!--Google fonts-->
1127
+ <link href="https://fonts.googleapis.com/css?family=Overpass:300,300i,600,900" rel="stylesheet" />
1128
+ <link href="https://fonts.googleapis.com/css?family=Lato:400,400i,700,900" rel="stylesheet" />
1129
+ <!--Font awesome import for the link icon-->
1130
+ <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/solid.css" integrity="sha384-v2Tw72dyUXeU3y4aM2Y0tBJQkGfplr39mxZqlTBDUZAb9BGoC40+rdFCG0m10lXk" crossorigin="anonymous" />
1131
+ <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/fontawesome.css" integrity="sha384-q3jl8XQu1OpdLgGFvNRnPdj5VIlCvgsDQTQB6owSOHWlAurxul7f+JpUOVdAiJ5P" crossorigin="anonymous" />
1132
+ </head>
1133
+ <body lang="EN-US" link="blue" vlink="#954F72" xml:lang="EN-US">
1134
+ <div class="title-section"> <div id="toggle"> <span>&#x2022;</span> </div>
1135
+ <p class="coverpage_docnumber"> :(E) </p>
1136
+
1137
+ <p class="coverpage_techcommittee">&#xA0;</p>
1138
+
1139
+ <p class="coverpage_techcommittee"><a name="CVP_Secretariat_Loca" id="CVP_Secretariat_Loca">Secretariat</a>: XXXX</p>
1140
+
1141
+ <div class="doctitle-en"><span class="title"></span> <span class="subtitle"></span> <span class="part"></span></div>
1142
+
1143
+ <div class="doctitle-fr"><span class="title"></span> <span class="subtitle"></span> <span class="part"></span></div>
1144
+
1145
+ <div class="coverpage_docstage">
1146
+ <p> stage</p>
1147
+ </div>
1148
+
1149
+
1150
+
1151
+ </div>
1152
+
1153
+
1154
+
1155
+ <p>&#xA0;</p>
1156
+ </div>
1157
+ <br />
1158
+ <div class="prefatory-section"><div class="copyright">
1159
+ <p class="year">
1160
+ &#xA9; , Published in Switzerland
1161
+ </p>
1162
+
1163
+ <p class="message">
1164
+ All rights
1165
+ reserved. Unless otherwise specified, no part of this publication may be
1166
+ reproduced or utilized otherwise in any form or by any means, electronic or
1167
+ mechanical, including photocopying, or posting on the internet or an intranet,
1168
+ without prior written permission. Permission can be requested from either ISO
1169
+ at the address below or ISO&#x2019;s member body in the country of the requester.
1170
+ </p>
1171
+
1172
+ <p class="name">ISO copyright office</p>
1173
+ <p class="address">
1174
+ Ch. de Blandonnet 8 &#x2022; CP 401<br />
1175
+ CH-1214 Vernier, Geneva, Switzerland<br />
1176
+ Tel.&#xA0;&#xA0;+ 41 22 749 01 11<br />
1177
+ Fax&#xA0;&#xA0;+ 41 22 749 09 47<br />
1178
+ copyright@iso.org<br />
1179
+ www.iso.org
1180
+ </p>
1181
+ </div>
1182
+
1183
+
1184
+
1185
+
1186
+ <nav>
1187
+
1188
+ <h1 id="content">Contents</h1>
1189
+ <div id="toc"></div>
1190
+
1191
+ </nav>
1192
+
1193
+ <p>&#xA0;</p>
1194
+ </div>
1195
+ <br />
1196
+ <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
1197
+ <br />
1198
+ <div>
1199
+ <h1 class="ForewordTitle">Foreword</h1>
1200
+ <div id="" class="Note">
1201
+ <p><span class="note_label">NOTE</span>&#xA0; These results are based on a study carried out on three different types of kernel.</p>
1202
+ </div>
1203
+ </div>
1204
+ <p class="zzSTDTitle1"></p>
1205
+ </main>
1206
+ <script type="text/x-mathjax-config">
1207
+ MathJax.Hub.Config({
1208
+ asciimath2jax: {
1209
+ delimiters: [['(#(', ')#)']]
1210
+ }
1211
+ });
1212
+ </script>
1213
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=AM_HTMLorMML"></script>
1214
+ <script>
1215
+ //TOC generation
1216
+ $('#toc').toc({
1217
+ 'selectors': 'h1,h2:not(.TermNum)', //elements to use as headings
1218
+ 'container': 'main', //element to find all selectors in
1219
+ 'smoothScrolling': true, //enable or disable smooth scrolling on click
1220
+ 'prefix': 'toc', //prefix for anchor tags and class names
1221
+ 'onHighlight': function(el) {}, //called when a new section is highlighted
1222
+ 'highlightOnScroll': true, //add class to heading that is currently in focus
1223
+ 'highlightOffset': 100, //offset to trigger the next headline
1224
+ 'anchorName': function(i, heading, prefix) { //custom function for anchor name
1225
+ return prefix+i;
1226
+ },
1227
+ 'headerText': function(i, heading, $heading) { //custom function building the header-item text
1228
+ return $heading.text();
1229
+ },
1230
+ 'itemClass': function(i, heading, $heading, prefix) { // custom function for item class
1231
+ return $heading[0].tagName.toLowerCase();
1232
+ }
1233
+ });
1234
+
1235
+ </script>
1236
+
1237
+ <script>
1238
+ //TOC toggle animation
1239
+ $('#toggle').on('click', function(){
1240
+ if( $('nav').is(':visible') ) {
1241
+ $('nav').animate({ 'left': '-353px' }, 'slow', function(){
1242
+ $('nav').hide();
1243
+ });
1244
+ $('body').animate({ 'margin-left': '0' }, 'slow');
1245
+ }
1246
+ else {
1247
+ $('nav').show();
1248
+ $('nav').animate({ 'left': '0px' }, 'slow');
1249
+ $('body').animate({ 'margin-left': '298px' }, 'slow');
1250
+ }
1251
+ });
1252
+ </script>
1253
+
1254
+ <script>
1255
+ // Scroll to top button
1256
+ window.onscroll = function() {scrollFunction()};
1257
+
1258
+ function scrollFunction() {
1259
+ if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
1260
+ document.getElementById("myBtn").style.display = "block";
1261
+ } else {
1262
+ document.getElementById("myBtn").style.display = "none";
1263
+ }
1264
+ }
1265
+
1266
+ // When the user clicks on the button, scroll to the top of the document
1267
+ function topFunction() {
1268
+ document.body.scrollTop = 0;
1269
+ document.documentElement.scrollTop = 0;
1270
+ }
1271
+ </script>
1272
+
1273
+ <script>
1274
+ $(document).ready(function() {
1275
+ $('[id^=toc]').each(function ()
1276
+ {
1277
+ var currentToc = $(this);
1278
+ var url = window.location.href;
1279
+ currentToc.wrap("<a href='" + url + "#" + currentToc.attr("id") + "' </a>");
1280
+ });
1281
+ });
1282
+ </script>
1283
+
1284
+
1285
+ <script>
1286
+
1287
+ // jQuery Inline Footnotes v1.0.3
1288
+ // Copyright (c) 2011 Vesa Vänskä, released under the MIT License.
1289
+
1290
+ // Generated by CoffeeScript 1.6.1
1291
+ (function() {
1292
+
1293
+ (function($) {
1294
+ $.inlineFootnote = function(el, options) {
1295
+ var _this = this;
1296
+ this.el = $(el);
1297
+ this.el.data("inlineFootnote", this);
1298
+ this.initialize = function() {
1299
+ this.options = $.extend({}, $.inlineFootnote.defaultOptions, options);
1300
+ this.footnoteId = this.el.attr("href").match(/#(.*)/)[1];
1301
+ if (this.footnoteId) {
1302
+ this.el.mouseenter(this.openBox);
1303
+ return $("body").mousemove(this.closeBox);
1304
+ }
1305
+ };
1306
+ this.openBox = function(event) {
1307
+ var footnoteContent, linkOffset;
1308
+ if (!_this.box) {
1309
+ footnoteContent = $("[id='" + _this.footnoteId + "']").children().filter(":not('" + _this.options.hideFromContent + "')");
1310
+ linkOffset = _this.el.offset();
1311
+ _this.box = $("<div />", {
1312
+ id: _this.options.boxId,
1313
+ html: footnoteContent.clone().find(_this.options.hideFromContent).remove().end(),
1314
+ css: {
1315
+ position: "absolute",
1316
+ top: linkOffset.top,
1317
+ left: linkOffset.left + _this.el.outerWidth()
1318
+ }
1319
+ }).appendTo("body");
1320
+ return _this.positionBox();
1321
+ }
1322
+ };
1323
+ this.closeBox = function(event) {
1324
+ if (_this.box) {
1325
+ if (_this.isHoveringFootnote(event)) {
1326
+ clearTimeout(_this.closeTimeout);
1327
+ return _this.closeTimeout = null;
1328
+ } else {
1329
+ if (!_this.closeTimeout) {
1330
+ return _this.closeTimeout = setTimeout((function() {
1331
+ _this.box.remove();
1332
+ return _this.box = null;
1333
+ }), _this.options.hideDelay);
1334
+ }
1335
+ }
1336
+ }
1337
+ };
1338
+ this.isHoveringFootnote = function(event) {
1339
+ return this.box.is(event.target) || $(event.target).closest(this.box).length > 0 || event.target === this.el[0];
1340
+ };
1341
+ this.positionBox = function() {
1342
+ var boxHorizontalPadding, boxLeft, boxWidth, linkLeftOffset, windowWidth;
1343
+ boxHorizontalPadding = parseInt(this.box.css("padding-left")) + parseInt(this.box.css("padding-right"));
1344
+ linkLeftOffset = this.el.offset().left;
1345
+ windowWidth = $(window).width();
1346
+ if ((windowWidth / 2) > linkLeftOffset) {
1347
+ boxLeft = linkLeftOffset + 20;
1348
+ boxWidth = windowWidth - boxLeft - boxHorizontalPadding - this.options.boxMargin * 2;
1349
+ if (boxWidth > this.options.maximumBoxWidth) {
1350
+ boxWidth = this.options.maximumBoxWidth;
1351
+ }
1352
+ } else {
1353
+ boxWidth = linkLeftOffset - boxHorizontalPadding - this.options.boxMargin * 2;
1354
+ if (boxWidth > this.options.maximumBoxWidth) {
1355
+ boxWidth = this.options.maximumBoxWidth;
1356
+ }
1357
+ boxLeft = linkLeftOffset - boxWidth - this.options.boxMargin * 2;
1358
+ }
1359
+ return this.box.css({
1360
+ width: boxWidth,
1361
+ left: boxLeft
1362
+ });
1363
+ };
1364
+ return this.initialize();
1365
+ };
1366
+ $.inlineFootnote.defaultOptions = {
1367
+ boxMargin: 20,
1368
+ hideDelay: 200,
1369
+ hideFromContent: "[rel=footnote]",
1370
+ maximumBoxWidth: 500,
1371
+ boxId: "footnote_box"
1372
+ };
1373
+ return $.fn.inlineFootnote = function(options) {
1374
+ return this.each(function() {
1375
+ return new $.inlineFootnote(this, options);
1376
+ });
1377
+ };
1378
+ })(jQuery);
1379
+
1380
+ }).call(this);
1381
+ </script>
1382
+
1383
+ <script>
1384
+ $(function() {
1385
+ $("[rel=footnote]").inlineFootnote();
1386
+ });
1387
+ </script></body>
1388
+ </html>