FooBarWidget-mizuho 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. data/LICENSE.txt +20 -0
  2. data/README.markdown +68 -0
  3. data/Rakefile +9 -0
  4. data/asciidoc/BUGS +34 -0
  5. data/asciidoc/BUGS.txt +28 -0
  6. data/asciidoc/CHANGELOG +1585 -0
  7. data/asciidoc/CHANGELOG.txt +1595 -0
  8. data/asciidoc/COPYING +339 -0
  9. data/asciidoc/COPYRIGHT +18 -0
  10. data/asciidoc/INSTALL +82 -0
  11. data/asciidoc/INSTALL.txt +71 -0
  12. data/asciidoc/README +46 -0
  13. data/asciidoc/README.txt +36 -0
  14. data/asciidoc/a2x +641 -0
  15. data/asciidoc/asciidoc.conf +404 -0
  16. data/asciidoc/asciidoc.py +4255 -0
  17. data/asciidoc/common.aap +9 -0
  18. data/asciidoc/dblatex/asciidoc-dblatex.sty +18 -0
  19. data/asciidoc/dblatex/asciidoc-dblatex.xsl +17 -0
  20. data/asciidoc/dblatex/dblatex-readme.txt +22 -0
  21. data/asciidoc/doc/a2x.1 +246 -0
  22. data/asciidoc/doc/a2x.1.txt +195 -0
  23. data/asciidoc/doc/article.css-embedded.html +579 -0
  24. data/asciidoc/doc/article.html +62 -0
  25. data/asciidoc/doc/article.pdf +0 -0
  26. data/asciidoc/doc/article.txt +124 -0
  27. data/asciidoc/doc/asciidoc-revhistory.xml +27 -0
  28. data/asciidoc/doc/asciidoc.1 +161 -0
  29. data/asciidoc/doc/asciidoc.1.css-embedded.html +562 -0
  30. data/asciidoc/doc/asciidoc.1.css.html +212 -0
  31. data/asciidoc/doc/asciidoc.1.html +190 -0
  32. data/asciidoc/doc/asciidoc.1.txt +118 -0
  33. data/asciidoc/doc/asciidoc.conf +8 -0
  34. data/asciidoc/doc/asciidoc.css-embedded.html +7954 -0
  35. data/asciidoc/doc/asciidoc.css.html +7553 -0
  36. data/asciidoc/doc/asciidoc.dict +673 -0
  37. data/asciidoc/doc/asciidoc.html +3502 -0
  38. data/asciidoc/doc/asciidoc.txt +4757 -0
  39. data/asciidoc/doc/asciimath.txt +47 -0
  40. data/asciidoc/doc/book-multi.css-embedded.html +575 -0
  41. data/asciidoc/doc/book-multi.html +72 -0
  42. data/asciidoc/doc/book-multi.txt +159 -0
  43. data/asciidoc/doc/book.css-embedded.html +585 -0
  44. data/asciidoc/doc/book.html +60 -0
  45. data/asciidoc/doc/book.txt +133 -0
  46. data/asciidoc/doc/customers.csv +18 -0
  47. data/asciidoc/doc/faq.txt +262 -0
  48. data/asciidoc/doc/latex-backend.html +224 -0
  49. data/asciidoc/doc/latex-backend.txt +193 -0
  50. data/asciidoc/doc/latexmath.txt +35 -0
  51. data/asciidoc/doc/main.aap +293 -0
  52. data/asciidoc/doc/music-filter.html +513 -0
  53. data/asciidoc/doc/music-filter.pdf +0 -0
  54. data/asciidoc/doc/music-filter.txt +158 -0
  55. data/asciidoc/doc/source-highlight-filter.html +183 -0
  56. data/asciidoc/doc/source-highlight-filter.pdf +0 -0
  57. data/asciidoc/doc/source-highlight-filter.txt +174 -0
  58. data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +71 -0
  59. data/asciidoc/docbook-xsl/chunked.xsl +19 -0
  60. data/asciidoc/docbook-xsl/common.xsl +67 -0
  61. data/asciidoc/docbook-xsl/fo.xsl +117 -0
  62. data/asciidoc/docbook-xsl/htmlhelp.xsl +17 -0
  63. data/asciidoc/docbook-xsl/manpage.xsl +28 -0
  64. data/asciidoc/docbook-xsl/shaded-literallayout.patch +32 -0
  65. data/asciidoc/docbook-xsl/xhtml.xsl +14 -0
  66. data/asciidoc/docbook.conf +606 -0
  67. data/asciidoc/examples/website/CHANGELOG.html +3828 -0
  68. data/asciidoc/examples/website/INSTALL.html +163 -0
  69. data/asciidoc/examples/website/README-website.html +129 -0
  70. data/asciidoc/examples/website/README-website.txt +29 -0
  71. data/asciidoc/examples/website/README.html +125 -0
  72. data/asciidoc/examples/website/a2x.1.html +395 -0
  73. data/asciidoc/examples/website/asciidoc-docbook-xsl.html +165 -0
  74. data/asciidoc/examples/website/asciimath.html +157 -0
  75. data/asciidoc/examples/website/build-website.sh +25 -0
  76. data/asciidoc/examples/website/downloads.html +219 -0
  77. data/asciidoc/examples/website/downloads.txt +98 -0
  78. data/asciidoc/examples/website/faq.html +372 -0
  79. data/asciidoc/examples/website/index.html +398 -0
  80. data/asciidoc/examples/website/index.txt +222 -0
  81. data/asciidoc/examples/website/latex-backend.html +640 -0
  82. data/asciidoc/examples/website/latexmath.html +119 -0
  83. data/asciidoc/examples/website/layout1.conf +161 -0
  84. data/asciidoc/examples/website/layout1.css +65 -0
  85. data/asciidoc/examples/website/layout2.conf +158 -0
  86. data/asciidoc/examples/website/layout2.css +93 -0
  87. data/asciidoc/examples/website/manpage.html +266 -0
  88. data/asciidoc/examples/website/music-filter.html +242 -0
  89. data/asciidoc/examples/website/music1.abc +12 -0
  90. data/asciidoc/examples/website/music1.png +0 -0
  91. data/asciidoc/examples/website/music2.ly +9 -0
  92. data/asciidoc/examples/website/music2.png +0 -0
  93. data/asciidoc/examples/website/source-highlight-filter.html +251 -0
  94. data/asciidoc/examples/website/support.html +78 -0
  95. data/asciidoc/examples/website/support.txt +5 -0
  96. data/asciidoc/examples/website/userguide.html +7597 -0
  97. data/asciidoc/examples/website/version9.html +143 -0
  98. data/asciidoc/examples/website/version9.txt +48 -0
  99. data/asciidoc/filters/code-filter-readme.txt +37 -0
  100. data/asciidoc/filters/code-filter-test-c++.txt +7 -0
  101. data/asciidoc/filters/code-filter-test.txt +15 -0
  102. data/asciidoc/filters/code-filter.conf +8 -0
  103. data/asciidoc/filters/code-filter.py +239 -0
  104. data/asciidoc/filters/music-filter-test.txt +40 -0
  105. data/asciidoc/filters/music-filter.conf +40 -0
  106. data/asciidoc/filters/music2png.py +189 -0
  107. data/asciidoc/filters/source-highlight-filter-test.txt +19 -0
  108. data/asciidoc/filters/source-highlight-filter.conf +100 -0
  109. data/asciidoc/help.conf +213 -0
  110. data/asciidoc/html4.conf +363 -0
  111. data/asciidoc/images/highlighter.png +0 -0
  112. data/asciidoc/images/icons/README +5 -0
  113. data/asciidoc/images/icons/callouts/1.png +0 -0
  114. data/asciidoc/images/icons/callouts/10.png +0 -0
  115. data/asciidoc/images/icons/callouts/11.png +0 -0
  116. data/asciidoc/images/icons/callouts/12.png +0 -0
  117. data/asciidoc/images/icons/callouts/13.png +0 -0
  118. data/asciidoc/images/icons/callouts/14.png +0 -0
  119. data/asciidoc/images/icons/callouts/15.png +0 -0
  120. data/asciidoc/images/icons/callouts/2.png +0 -0
  121. data/asciidoc/images/icons/callouts/3.png +0 -0
  122. data/asciidoc/images/icons/callouts/4.png +0 -0
  123. data/asciidoc/images/icons/callouts/5.png +0 -0
  124. data/asciidoc/images/icons/callouts/6.png +0 -0
  125. data/asciidoc/images/icons/callouts/7.png +0 -0
  126. data/asciidoc/images/icons/callouts/8.png +0 -0
  127. data/asciidoc/images/icons/callouts/9.png +0 -0
  128. data/asciidoc/images/icons/caution.png +0 -0
  129. data/asciidoc/images/icons/example.png +0 -0
  130. data/asciidoc/images/icons/home.png +0 -0
  131. data/asciidoc/images/icons/important.png +0 -0
  132. data/asciidoc/images/icons/next.png +0 -0
  133. data/asciidoc/images/icons/note.png +0 -0
  134. data/asciidoc/images/icons/prev.png +0 -0
  135. data/asciidoc/images/icons/tip.png +0 -0
  136. data/asciidoc/images/icons/up.png +0 -0
  137. data/asciidoc/images/icons/warning.png +0 -0
  138. data/asciidoc/images/smallnew.png +0 -0
  139. data/asciidoc/images/tiger.png +0 -0
  140. data/asciidoc/install.sh +55 -0
  141. data/asciidoc/javascripts/ASCIIMathML.js +938 -0
  142. data/asciidoc/javascripts/LaTeXMathML.js +1223 -0
  143. data/asciidoc/javascripts/toc.js +69 -0
  144. data/asciidoc/lang-es.conf +15 -0
  145. data/asciidoc/latex.conf +663 -0
  146. data/asciidoc/linuxdoc.conf +285 -0
  147. data/asciidoc/math.conf +50 -0
  148. data/asciidoc/stylesheets/docbook-xsl.css +271 -0
  149. data/asciidoc/stylesheets/xhtml-deprecated-manpage.css +21 -0
  150. data/asciidoc/stylesheets/xhtml-deprecated.css +247 -0
  151. data/asciidoc/stylesheets/xhtml11-manpage.css +18 -0
  152. data/asciidoc/stylesheets/xhtml11-quirks.css +49 -0
  153. data/asciidoc/stylesheets/xhtml11.css +284 -0
  154. data/asciidoc/t.conf +20 -0
  155. data/asciidoc/text.conf +16 -0
  156. data/asciidoc/vim/ftdetect/asciidoc_filetype.vim +53 -0
  157. data/asciidoc/vim/syntax/asciidoc.vim +139 -0
  158. data/asciidoc/xhtml-deprecated-css.conf +235 -0
  159. data/asciidoc/xhtml-deprecated.conf +351 -0
  160. data/asciidoc/xhtml11-quirks.conf +57 -0
  161. data/asciidoc/xhtml11.conf +514 -0
  162. data/bin/mizuho +40 -0
  163. data/lib/mizuho/chapter.rb +54 -0
  164. data/lib/mizuho/generator.rb +106 -0
  165. data/lib/mizuho/heading.rb +46 -0
  166. data/lib/mizuho/parser.rb +99 -0
  167. data/lib/mizuho/template.rb +50 -0
  168. data/mizuho.gemspec +34 -0
  169. data/templates/asciidoc.css +358 -0
  170. data/templates/asciidoc.html.erb +86 -0
  171. data/templates/manualsonrails.css +165 -0
  172. data/templates/manualsonrails.html.erb +97 -0
  173. data/test/parser_spec.rb +190 -0
  174. data/test/spec_helper.rb +43 -0
  175. metadata +234 -0
@@ -0,0 +1,47 @@
1
+ ASCIIMathML Formulae
2
+ ====================
3
+
4
+ http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] is
5
+ a clever JavaScript written by Peter Jipsen that transforms
6
+ mathematical formulae written in plain text to standard mathematical
7
+ notation on an HTML page. See 'Appendix I' in the AsciiDoc User Guide
8
+ for more details.
9
+
10
+ The AsciiDoc `xhtml11` backend supports ASCIIMathML -- it links the
11
+ ASCIIMathML script and escapes ASCIIMathML delimiters and special
12
+ characters to yield valid XHTML. To use ASCIIMathML:
13
+
14
+ 1. Include the `-a asciimath` command-line option when you run
15
+ `asciidoc(1)`.
16
+ 2. Enclose ASCIIMathML formulas inside double-dollar passthroughs.
17
+
18
+ Here's the link:asciimath.txt[AsciiDoc source] that generated this
19
+ page.
20
+
21
+ .NOTE
22
+ - If the formulas don't appear to be correct you probably need to
23
+ install the correct math fonts (see the
24
+ http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML]
25
+ website for details).
26
+ - See the link:latexmath.html[LaTeXMathML page] if you prefer to use
27
+ LaTeX math formulas.
28
+
29
+ A list of formulas with a mixture of formatting:
30
+
31
+ - $$`[[a,b],[c,d]]((n),(k))`$$
32
+ - $$`x/x={(1,if x!=0),(text{undefined},if x=0):}`$$
33
+ - $$`d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h`$$
34
+ - Red [red]$$`sum_(i=1)\^n i=(n(n+1))/2`$$ and [blue]*bold
35
+ $$`int_0\^(pi/2) sinx\ dx=1`$$*
36
+ - [,,1.5]## 1.5 times normal size $$`(a,b]={x in RR : a < x <= b}`$$##
37
+ - A [,,2]##big## [blue]##blue## formula [blue,,2]$$`x^2+y_1+z_12^34`$$.
38
+ - [green,yellow,4]$$`x^2+y_1+z_12^34`$$
39
+
40
+ *********************************************************************
41
+ The first three terms factor to give
42
+ [red]$$$(x+b/(2a))^2=(b^2)/(4a^2)-c/a$$$. Now we take square roots on
43
+ both sides and get [red]$$$x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)$$$.
44
+ Finally we move the [red]$$$b/(2a)$$$ to the right and simplify to get
45
+ the two solutions: [red]*$$`x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)`$$*.
46
+ *********************************************************************
47
+
@@ -0,0 +1,575 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ <meta name="generator" content="AsciiDoc 8.2.5" />
7
+ <style type="text/css">
8
+ /* Debug borders */
9
+ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
10
+ /*
11
+ border: 1px solid red;
12
+ */
13
+ }
14
+
15
+ body {
16
+ margin: 1em 5% 1em 5%;
17
+ }
18
+
19
+ a {
20
+ color: blue;
21
+ text-decoration: underline;
22
+ }
23
+ a:visited {
24
+ color: fuchsia;
25
+ }
26
+
27
+ em {
28
+ font-style: italic;
29
+ color: navy;
30
+ }
31
+
32
+ strong {
33
+ font-weight: bold;
34
+ color: #083194;
35
+ }
36
+
37
+ tt {
38
+ color: navy;
39
+ }
40
+
41
+ h1, h2, h3, h4, h5, h6 {
42
+ color: #527bbd;
43
+ font-family: sans-serif;
44
+ margin-top: 1.2em;
45
+ margin-bottom: 0.5em;
46
+ line-height: 1.3;
47
+ }
48
+
49
+ h1, h2, h3 {
50
+ border-bottom: 2px solid silver;
51
+ }
52
+ h2 {
53
+ padding-top: 0.5em;
54
+ }
55
+ h3 {
56
+ float: left;
57
+ }
58
+ h3 + * {
59
+ clear: left;
60
+ }
61
+
62
+ div.sectionbody {
63
+ font-family: serif;
64
+ margin-left: 0;
65
+ }
66
+
67
+ hr {
68
+ border: 1px solid silver;
69
+ }
70
+
71
+ p {
72
+ margin-top: 0.5em;
73
+ margin-bottom: 0.5em;
74
+ }
75
+
76
+ pre {
77
+ padding: 0;
78
+ margin: 0;
79
+ }
80
+
81
+ span#author {
82
+ color: #527bbd;
83
+ font-family: sans-serif;
84
+ font-weight: bold;
85
+ font-size: 1.1em;
86
+ }
87
+ span#email {
88
+ }
89
+ span#revision {
90
+ font-family: sans-serif;
91
+ }
92
+
93
+ div#footer {
94
+ font-family: sans-serif;
95
+ font-size: small;
96
+ border-top: 2px solid silver;
97
+ padding-top: 0.5em;
98
+ margin-top: 4.0em;
99
+ }
100
+ div#footer-text {
101
+ float: left;
102
+ padding-bottom: 0.5em;
103
+ }
104
+ div#footer-badges {
105
+ float: right;
106
+ padding-bottom: 0.5em;
107
+ }
108
+
109
+ div#preamble,
110
+ div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
111
+ div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
112
+ div.admonitionblock {
113
+ margin-right: 10%;
114
+ margin-top: 1.5em;
115
+ margin-bottom: 1.5em;
116
+ }
117
+ div.admonitionblock {
118
+ margin-top: 2.5em;
119
+ margin-bottom: 2.5em;
120
+ }
121
+
122
+ div.content { /* Block element content. */
123
+ padding: 0;
124
+ }
125
+
126
+ /* Block element titles. */
127
+ div.title, caption.title {
128
+ color: #527bbd;
129
+ font-family: sans-serif;
130
+ font-weight: bold;
131
+ text-align: left;
132
+ margin-top: 1.0em;
133
+ margin-bottom: 0.5em;
134
+ }
135
+ div.title + * {
136
+ margin-top: 0;
137
+ }
138
+
139
+ td div.title:first-child {
140
+ margin-top: 0.0em;
141
+ }
142
+ div.content div.title:first-child {
143
+ margin-top: 0.0em;
144
+ }
145
+ div.content + div.title {
146
+ margin-top: 0.0em;
147
+ }
148
+
149
+ div.sidebarblock > div.content {
150
+ background: #ffffee;
151
+ border: 1px solid silver;
152
+ padding: 0.5em;
153
+ }
154
+
155
+ div.listingblock {
156
+ margin-right: 0%;
157
+ }
158
+ div.listingblock > div.content {
159
+ border: 1px solid silver;
160
+ background: #f4f4f4;
161
+ padding: 0.5em;
162
+ }
163
+
164
+ div.quoteblock > div.content {
165
+ padding-left: 2.0em;
166
+ }
167
+
168
+ div.attribution {
169
+ text-align: right;
170
+ }
171
+ div.verseblock + div.attribution {
172
+ text-align: left;
173
+ }
174
+
175
+ div.admonitionblock .icon {
176
+ vertical-align: top;
177
+ font-size: 1.1em;
178
+ font-weight: bold;
179
+ text-decoration: underline;
180
+ color: #527bbd;
181
+ padding-right: 0.5em;
182
+ }
183
+ div.admonitionblock td.content {
184
+ padding-left: 0.5em;
185
+ border-left: 2px solid silver;
186
+ }
187
+
188
+ div.exampleblock > div.content {
189
+ border-left: 2px solid silver;
190
+ padding: 0.5em;
191
+ }
192
+
193
+ div.verseblock div.content {
194
+ white-space: pre;
195
+ }
196
+
197
+ div.imageblock div.content { padding-left: 0; }
198
+ div.imageblock img { border: 1px solid silver; }
199
+ span.image img { border-style: none; }
200
+
201
+ dl {
202
+ margin-top: 0.8em;
203
+ margin-bottom: 0.8em;
204
+ }
205
+ dt {
206
+ margin-top: 0.5em;
207
+ margin-bottom: 0;
208
+ font-style: normal;
209
+ }
210
+ dd > *:first-child {
211
+ margin-top: 0;
212
+ }
213
+
214
+ ul, ol {
215
+ list-style-position: outside;
216
+ }
217
+ div.olist2 ol {
218
+ list-style-type: lower-alpha;
219
+ }
220
+
221
+ div.tableblock > table {
222
+ border: 3px solid #527bbd;
223
+ }
224
+ thead {
225
+ font-family: sans-serif;
226
+ font-weight: bold;
227
+ }
228
+ tfoot {
229
+ font-weight: bold;
230
+ }
231
+
232
+ div.hlist {
233
+ margin-top: 0.8em;
234
+ margin-bottom: 0.8em;
235
+ }
236
+ div.hlist td {
237
+ padding-bottom: 5px;
238
+ }
239
+ td.hlist1 {
240
+ vertical-align: top;
241
+ font-style: normal;
242
+ padding-right: 0.8em;
243
+ }
244
+ td.hlist2 {
245
+ vertical-align: top;
246
+ }
247
+
248
+ @media print {
249
+ div#footer-badges { display: none; }
250
+ }
251
+
252
+ div#toctitle {
253
+ color: #527bbd;
254
+ font-family: sans-serif;
255
+ font-size: 1.1em;
256
+ font-weight: bold;
257
+ margin-top: 1.0em;
258
+ margin-bottom: 0.1em;
259
+ }
260
+
261
+ div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
262
+ margin-top: 0;
263
+ margin-bottom: 0;
264
+ }
265
+ div.toclevel2 {
266
+ margin-left: 2em;
267
+ font-size: 0.9em;
268
+ }
269
+ div.toclevel3 {
270
+ margin-left: 4em;
271
+ font-size: 0.9em;
272
+ }
273
+ div.toclevel4 {
274
+ margin-left: 6em;
275
+ font-size: 0.9em;
276
+ }
277
+ /* Workarounds for IE6's broken and incomplete CSS2. */
278
+
279
+ div.sidebar-content {
280
+ background: #ffffee;
281
+ border: 1px solid silver;
282
+ padding: 0.5em;
283
+ }
284
+ div.sidebar-title, div.image-title {
285
+ color: #527bbd;
286
+ font-family: sans-serif;
287
+ font-weight: bold;
288
+ margin-top: 0.0em;
289
+ margin-bottom: 0.5em;
290
+ }
291
+
292
+ div.listingblock div.content {
293
+ border: 1px solid silver;
294
+ background: #f4f4f4;
295
+ padding: 0.5em;
296
+ }
297
+
298
+ div.quoteblock-content {
299
+ padding-left: 2.0em;
300
+ }
301
+
302
+ div.exampleblock-content {
303
+ border-left: 2px solid silver;
304
+ padding-left: 0.5em;
305
+ }
306
+
307
+ /* IE6 sets dynamically generated links as visited. */
308
+ div#toc a:visited { color: blue; }
309
+ </style>
310
+ <script type="text/javascript">
311
+ /*<![CDATA[*/
312
+ window.onload = function(){generateToc(2)}
313
+ /* Author: Mihai Bazon, September 2002
314
+ * http://students.infoiasi.ro/~mishoo
315
+ *
316
+ * Table Of Content generator
317
+ * Version: 0.4
318
+ *
319
+ * Feel free to use this script under the terms of the GNU General Public
320
+ * License, as long as you do not remove or alter this notice.
321
+ */
322
+
323
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
324
+ /* modified by Stuart Rackham, October 2006. License: GPL */
325
+
326
+ function getText(el) {
327
+ var text = "";
328
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
329
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
330
+ text += i.data;
331
+ else if (i.firstChild != null)
332
+ text += getText(i);
333
+ }
334
+ return text;
335
+ }
336
+
337
+ function TocEntry(el, text, toclevel) {
338
+ this.element = el;
339
+ this.text = text;
340
+ this.toclevel = toclevel;
341
+ }
342
+
343
+ function tocEntries(el, toclevels) {
344
+ var result = new Array;
345
+ var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
346
+ // Function that scans the DOM tree for header elements (the DOM2
347
+ // nodeIterator API would be a better technique but not supported by all
348
+ // browsers).
349
+ var iterate = function (el) {
350
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
351
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
352
+ var mo = re.exec(i.tagName)
353
+ if (mo)
354
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
355
+ iterate(i);
356
+ }
357
+ }
358
+ }
359
+ iterate(el);
360
+ return result;
361
+ }
362
+
363
+ // This function does the work. toclevels = 1..4.
364
+ function generateToc(toclevels) {
365
+ var toc = document.getElementById("toc");
366
+ var entries = tocEntries(document.getElementsByTagName("body")[0], toclevels);
367
+ for (var i = 0; i < entries.length; ++i) {
368
+ var entry = entries[i];
369
+ if (entry.element.id == "")
370
+ entry.element.id = "toc" + i;
371
+ var a = document.createElement("a");
372
+ a.href = "#" + entry.element.id;
373
+ a.appendChild(document.createTextNode(entry.text));
374
+ var div = document.createElement("div");
375
+ div.appendChild(a);
376
+ div.className = "toclevel" + entry.toclevel;
377
+ toc.appendChild(div);
378
+ }
379
+ }
380
+ /*]]>*/
381
+ </script>
382
+ <title>Multi-Part Book Title Goes Here</title>
383
+ </head>
384
+ <body>
385
+ <div id="header">
386
+ <h1>Multi-Part Book Title Goes Here</h1>
387
+ <span id="author">Author's Name</span><br />
388
+ <span id="revision">version 1.0,</span>
389
+ Dec 2003
390
+ <div id="toc">
391
+ <div id="toctitle">Table of Contents</div>
392
+ <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
393
+ </div>
394
+ </div>
395
+ <h1 id="_dedication">Dedication</h1>
396
+ <div class="para"><p>The optional dedication goes here.</p></div>
397
+ <div class="para"><p>This document is an <em>AsciiDoc</em> multi-part book skeleton containing
398
+ briefly annotated element placeholders plus a couple of example index
399
+ entries and footnotes. Books are normally used to generate DocBook
400
+ markup and the preface, appendix, bibliography, glossary and index
401
+ section titles are significant (<em>specialsections</em>).</p></div>
402
+ <div class="admonitionblock">
403
+ <table><tr>
404
+ <td class="icon">
405
+ <div class="title">Note</div>
406
+ </td>
407
+ <td class="content">Multi-part books differ from all other <em>AsciiDoc</em> document formats
408
+ in that top level sections (dedication, preface, book parts,
409
+ appendices, bibliography, glossary, index) must be level zero headings
410
+ (not level one).</td>
411
+ </tr></table>
412
+ </div>
413
+ <h1 id="_preface">Preface</h1>
414
+ <div class="para"><p>The optional book preface goes here at section level zero.</p></div>
415
+ <h3 id="_preface_sub_section">0.1. Preface Sub-section</h3><div style="clear:left"></div>
416
+ <div class="admonitionblock">
417
+ <table><tr>
418
+ <td class="icon">
419
+ <div class="title">Note</div>
420
+ </td>
421
+ <td class="content">Preface and appendix subsections start out of sequence at level
422
+ 2 (level 1 is skipped). This only applies to multi-part book
423
+ documents.</td>
424
+ </tr></table>
425
+ </div>
426
+ <h1 id="_the_first_part_of_the_book">The First Part of the Book</h1>
427
+ <h2 id="_the_first_chapter">1. The First Chapter</h2>
428
+ <div class="sectionbody">
429
+ <div class="para"><p>Chapters can be grouped by preceeding them with a level 0 Book Part
430
+ title.</p></div>
431
+ <div class="para"><p>Book chapters are at level 1 and can contain sub-sections nested up to
432
+ three deep.
433
+ <br />[An example footnote.]<br /></p></div>
434
+ <div class="para"><p>It's also worth noting that a book part can have it's own preface,
435
+ bibliography, glossary and index. Chapters can have their own
436
+ bibliography, glossary and index.</p></div>
437
+ <div class="para"><p>And now for something completely different: monkeys, lions and
438
+ tigers (Bengal and Siberian) using the alternative syntax index
439
+ entries.
440
+
441
+
442
+
443
+ Note that multi-entry terms generate separate index entries.</p></div>
444
+ <div class="para"><p>Here are a couple of image examples: an <span class="image">
445
+ <img src="images/smallnew.png" alt="images/smallnew.png" />
446
+ </span>
447
+ example inline image followed by an example block image:</p></div>
448
+ <div class="imageblock">
449
+ <div class="content">
450
+ <img src="images/tiger.png" alt="Tiger image" title="Tiger image"/>
451
+ </div>
452
+ <div class="image-title">Figure: Tiger block image</div>
453
+ </div>
454
+ <div class="para"><p>Followed by an example table:</p></div>
455
+ <div class="tableblock">
456
+ <table rules="none"
457
+ frame="hsides"
458
+ cellspacing="0" cellpadding="4">
459
+ <caption class="title">Table: An example table</caption>
460
+ <col width="205" />
461
+ <col width="308" />
462
+ <thead>
463
+ <tr>
464
+ <th align="left">
465
+ Option
466
+ </th>
467
+ <th align="left">
468
+ Description
469
+ </th>
470
+ </tr>
471
+ </thead>
472
+ <tbody valign="top">
473
+ <tr>
474
+ <td align="left">
475
+ -a <em>USER GROUP</em>
476
+ </td>
477
+ <td align="left">
478
+ Add <em>USER</em> to <em>GROUP</em>.
479
+ </td>
480
+ </tr>
481
+ <tr>
482
+ <td align="left">
483
+ -R <em>GROUP</em>
484
+ </td>
485
+ <td align="left">
486
+ Disables access to <em>GROUP</em>.
487
+ </td>
488
+ </tr>
489
+ </tbody>
490
+ </table>
491
+ </div>
492
+ <h3 id="X1">1.1. Sub-section with Anchor</h3><div style="clear:left"></div>
493
+ <div class="para"><p>Sub-section at level 2.</p></div>
494
+ <h4 id="_chapter_sub_section">1.1.1. Chapter Sub-section</h4>
495
+ <div class="para"><p>Sub-section at level 3.</p></div>
496
+ <h5 id="_chapter_sub_section_2">Chapter Sub-section</h5>
497
+ <div class="para"><p>Sub-section at level 4.</p></div>
498
+ <div class="para"><p>This is the maximum sub-section depth supported by the distributed
499
+ <em>AsciiDoc</em> configuration.
500
+ <br />[A second example footnote.]<br /></p></div>
501
+ </div>
502
+ <h2 id="_the_second_chapter">2. The Second Chapter</h2>
503
+ <div class="sectionbody">
504
+ <div class="para"><p>An example link to anchor at start of the <a href="#X1">first sub-section</a>.</p></div>
505
+ <div class="para"><p>An example link to a bibliography entry <a href="#taoup">[taoup]</a>.</p></div>
506
+ </div>
507
+ <h1 id="_the_second_part_of_the_book">The Second Part of the Book</h1>
508
+ <h2 id="_the_first_chapter_of_the_second_part">1. The First Chapter of the Second Part</h2>
509
+ <div class="sectionbody">
510
+ <div class="para"><p>Chapters grouped into book parts are at level 1 and can contain
511
+ sub-sections.</p></div>
512
+ </div>
513
+ <h1 id="_appendix_a_example_appendix">Appendix A: Example Appendix</h1>
514
+ <div class="para"><p>One or more optional appendixes go here at section level zero.</p></div>
515
+ <h3 id="_appendix_sub_section">0.1. Appendix Sub-section</h3><div style="clear:left"></div>
516
+ <div class="admonitionblock">
517
+ <table><tr>
518
+ <td class="icon">
519
+ <div class="title">Note</div>
520
+ </td>
521
+ <td class="content">Preface and appendix subsections start out of sequence at level
522
+ 2 (level 1 is skipped). This only applies to multi-part book
523
+ documents.</td>
524
+ </tr></table>
525
+ </div>
526
+ <h1 id="_bibliography">Bibliography</h1>
527
+ <div class="para"><p>The bibliography list is an example of an <em>AsciiDoc</em> SimpleList, the
528
+ <em>AsciiDoc</em> source list items are bulleted with a <tt>+</tt> character. The
529
+ first entry in this example has an anchor.</p></div>
530
+ <div class="olist"><ol>
531
+ <li>
532
+ <p>
533
+ <a id="taoup"></a>[taoup] Eric Steven Raymond. <em>The Art of Unix Programming</em>.
534
+ Addison-Wesley. ISBN 0-13-142901-9.
535
+ </p>
536
+ </li>
537
+ <li>
538
+ <p>
539
+ <a id="walsh-muellner"></a>[walsh-muellner] Norman Walsh &amp; Leonard Muellner.
540
+ <em>DocBook - The Definative Guide</em>. O'Reilly &amp; Associates. 199.
541
+ ISBN 1-56592-580-7.
542
+ </p>
543
+ </li>
544
+ </ol></div>
545
+ <h1 id="_glossary">Glossary</h1>
546
+ <div class="para"><p>Glossaries are optional. Glossaries are an example of an <em>AsciiDoc</em>
547
+ VariableList, the <em>AsciiDoc</em> glossary entry terms are terminated
548
+ by the <tt>:-</tt> characters.</p></div>
549
+ <div class="vlist"><dl>
550
+ <dt>
551
+ A glossary term
552
+ </dt>
553
+ <dd>
554
+ <p>
555
+ The corresponding (indented) definition.
556
+ </p>
557
+ </dd>
558
+ <dt>
559
+ A second glossary term
560
+ </dt>
561
+ <dd>
562
+ <p>
563
+ The corresponding (indented) definition.
564
+ </p>
565
+ </dd>
566
+ </dl></div>
567
+ <h1 id="_index">Index</h1>
568
+ <div id="footer">
569
+ <div id="footer-text">
570
+ Version 1.0<br />
571
+ Last updated 2008-04-05 10:34:11 NZDT
572
+ </div>
573
+ </div>
574
+ </body>
575
+ </html>