FooBarWidget-mizuho 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. data/asciidoc/BUGS +3 -3
  2. data/asciidoc/CHANGELOG +112 -63
  3. data/asciidoc/CHANGELOG.txt +50 -0
  4. data/asciidoc/INSTALL +6 -6
  5. data/asciidoc/Makefile.in +21 -5
  6. data/asciidoc/README +3 -3
  7. data/asciidoc/asciidoc.conf +9 -12
  8. data/asciidoc/asciidoc.py +204 -151
  9. data/asciidoc/common.aap +2 -2
  10. data/asciidoc/doc/a2x.1 +4 -3
  11. data/asciidoc/doc/a2x.1.txt +1 -1
  12. data/asciidoc/doc/article.css-embedded.html +13 -12
  13. data/asciidoc/doc/article.html +46 -644
  14. data/asciidoc/doc/article.pdf +0 -0
  15. data/asciidoc/doc/asciidoc.1 +2 -2
  16. data/asciidoc/doc/asciidoc.1.css-embedded.html +14 -13
  17. data/asciidoc/doc/asciidoc.1.css.html +3 -3
  18. data/asciidoc/doc/asciidoc.1.html +3 -3
  19. data/asciidoc/doc/asciidoc.css-embedded.html +238 -225
  20. data/asciidoc/doc/asciidoc.css.html +227 -215
  21. data/asciidoc/doc/asciidoc.dict +10 -1
  22. data/asciidoc/doc/asciidoc.html +181 -164
  23. data/asciidoc/doc/asciidoc.txt +167 -148
  24. data/asciidoc/doc/asciimathml.txt +5 -4
  25. data/asciidoc/doc/book.css-embedded.html +13 -12
  26. data/asciidoc/doc/faq.txt +60 -3
  27. data/asciidoc/doc/music-filter.html +94 -41
  28. data/asciidoc/doc/music-filter.pdf +0 -0
  29. data/asciidoc/doc/source-highlight-filter.html +125 -465
  30. data/asciidoc/doc/source-highlight-filter.pdf +0 -0
  31. data/asciidoc/docbook.conf +8 -2
  32. data/asciidoc/examples/website/CHANGELOG.html +129 -4
  33. data/asciidoc/examples/website/INSTALL.html +6 -6
  34. data/asciidoc/examples/website/README-website.html +3 -3
  35. data/asciidoc/examples/website/README.html +3 -3
  36. data/asciidoc/examples/website/a2x.1.html +4 -4
  37. data/asciidoc/examples/website/asciidoc-docbook-xsl.html +3 -3
  38. data/asciidoc/examples/website/asciidoc-graphviz-sample.txt +1 -0
  39. data/asciidoc/examples/website/downloads.html +7 -7
  40. data/asciidoc/examples/website/faq.html +95 -40
  41. data/asciidoc/examples/website/index.html +34 -13
  42. data/asciidoc/examples/website/index.txt +25 -9
  43. data/asciidoc/examples/website/latex-backend.html +4 -4
  44. data/asciidoc/examples/website/manpage.html +3 -3
  45. data/asciidoc/examples/website/music-filter.html +3 -3
  46. data/asciidoc/examples/website/sample1.png +0 -0
  47. data/asciidoc/examples/website/sample3.png +0 -0
  48. data/asciidoc/examples/website/sample4.png +0 -0
  49. data/asciidoc/examples/website/source-highlight-filter.html +5 -5
  50. data/asciidoc/examples/website/support.html +3 -3
  51. data/asciidoc/examples/website/userguide.html +227 -215
  52. data/asciidoc/examples/website/version9.html +3 -3
  53. data/asciidoc/filters/{code-filter-readme.txt → code/code-filter-readme.txt} +0 -0
  54. data/asciidoc/filters/{code-filter-test.txt → code/code-filter-test.txt} +0 -0
  55. data/asciidoc/filters/{code-filter.conf → code/code-filter.conf} +1 -1
  56. data/asciidoc/filters/{code-filter.py → code/code-filter.py} +0 -0
  57. data/asciidoc/filters/graphviz/asciidoc-graphviz-sample.txt +130 -0
  58. data/asciidoc/filters/graphviz/graphviz-filter.conf +39 -0
  59. data/asciidoc/filters/graphviz/graphviz2png.py +154 -0
  60. data/asciidoc/filters/{music-filter-test.txt → music/music-filter-test.txt} +0 -0
  61. data/asciidoc/filters/{music-filter.conf → music/music-filter.conf} +0 -0
  62. data/asciidoc/filters/{music2png.py → music/music2png.py} +0 -0
  63. data/asciidoc/filters/{source-highlight-filter-test.txt → source/source-highlight-filter-test.txt} +0 -0
  64. data/asciidoc/filters/{source-highlight-filter.conf → source/source-highlight-filter.conf} +2 -1
  65. data/asciidoc/html4.conf +5 -2
  66. data/asciidoc/stylesheets/xhtml11-quirks.css +0 -8
  67. data/asciidoc/stylesheets/xhtml11.css +11 -2
  68. data/asciidoc/vim/syntax/asciidoc.vim +1 -1
  69. data/asciidoc/xhtml11.conf +5 -2
  70. data/lib/mizuho/parser.rb +5 -1
  71. data/mizuho.gemspec +5 -16
  72. data/test/parser_spec.rb +49 -0
  73. metadata +22 -10
@@ -2,10 +2,11 @@ ASCIIMathML Formulae
2
2
  ====================
3
3
 
4
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 E' in the AsciiDoc User Guide
8
- for more details.
5
+ a clever JavaScript written by Peter Jipsen that dynamically
6
+ transforms mathematical formulae written in a wiki-like plain text
7
+ markup to http://www.w3.org/Math/[MathML] markup which is displayed as
8
+ standard mathematical notation by the Web Browser. See 'Appendix E'
9
+ in the AsciiDoc User Guide for more details.
9
10
 
10
11
  The AsciiDoc `xhtml11` backend supports ASCIIMathML -- it links the
11
12
  ASCIIMathML script and escapes ASCIIMathML delimiters and special
@@ -3,7 +3,7 @@
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
4
  <head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
- <meta name="generator" content="AsciiDoc 8.3.1" />
6
+ <meta name="generator" content="AsciiDoc 8.3.3" />
7
7
  <title>Book Title Goes Here</title>
8
8
  <style type="text/css">
9
9
  /* Debug borders */
@@ -228,12 +228,21 @@ dd > *:first-child {
228
228
  ul, ol {
229
229
  list-style-position: outside;
230
230
  }
231
- div.olist > ol {
231
+ ol.arabic {
232
232
  list-style-type: decimal;
233
233
  }
234
- div.olist2 > ol {
234
+ ol.loweralpha {
235
235
  list-style-type: lower-alpha;
236
236
  }
237
+ ol.upperalpha {
238
+ list-style-type: upper-alpha;
239
+ }
240
+ ol.lowerroman {
241
+ list-style-type: lower-roman;
242
+ }
243
+ ol.upperroman {
244
+ list-style-type: upper-roman;
245
+ }
237
246
 
238
247
  div.compact ul, div.compact ol,
239
248
  div.compact p, div.compact p,
@@ -366,14 +375,6 @@ div.exampleblock-content {
366
375
 
367
376
  /* IE6 sets dynamically generated links as visited. */
368
377
  div#toc a:visited { color: blue; }
369
-
370
- /* Because IE6 child selector is broken. */
371
- div.olist2 ol {
372
- list-style-type: lower-alpha;
373
- }
374
- div.olist2 div.olist ol {
375
- list-style-type: decimal;
376
- }
377
378
  </style>
378
379
  <script type="text/javascript">
379
380
  /*<![CDATA[*/
@@ -599,7 +600,7 @@ A second glossary term
599
600
  <div id="footer">
600
601
  <div id="footer-text">
601
602
  Version 1.0<br />
602
- Last updated 2008-12-13 09:56:50 NZDT
603
+ Last updated 2009-01-02 12:43:47 NZDT
603
604
  </div>
604
605
  </div>
605
606
  </body>
data/asciidoc/doc/faq.txt CHANGED
@@ -4,6 +4,65 @@ AsciiDoc Frequently Asked Questions
4
4
  An embryonic AsciiDoc FAQ.
5
5
 
6
6
 
7
+ == Is it possible to include charts in AsciiDoc documents?
8
+
9
+ There are a number of programs available that generate presentation
10
+ charts from textual specification, for example
11
+ http://home.gna.org/pychart/[Pychart] is a library for writing chart
12
+ scripts in Python. Here's an example from the 'Pychart' documentation:
13
+
14
+ .barchart.py
15
+ ---------------------------------------------------------------------
16
+ #
17
+ # Example bar chart (from Pychart documentation http://home.gna.org/pychart/).
18
+ #
19
+ from pychart import *
20
+ theme.get_options()
21
+
22
+ data = [(10, 20, 30, 5), (20, 65, 33, 5), (30, 55, 30, 5), (40, 45, 51, 7),
23
+ (50, 25, 27, 3), (60, 75, 30, 5), (70, 80, 42, 5), (80, 62, 32, 5),
24
+ (90, 42, 39, 5), (100, 32, 39, 4)]
25
+
26
+ # The attribute y_coord=... tells that the Y axis values
27
+ # should be taken from samples.
28
+ # In this example, Y values will be [40,50,60,70,80].
29
+ ar = area.T(y_coord = category_coord.T(data[3:8], 0),
30
+ x_grid_style=line_style.gray50_dash1,
31
+ x_grid_interval=20, x_range = (0,100),
32
+ x_axis=axis.X(label="X label"),
33
+ y_axis=axis.Y(label="Y label"),
34
+ bg_style = fill_style.gray90,
35
+ border_line_style = line_style.default,
36
+ legend = legend.T(loc=(80,10)))
37
+
38
+ # Below call sets the default attributes for all bar plots.
39
+ chart_object.set_defaults(bar_plot.T, direction="horizontal", data=data)
40
+
41
+ # Attribute cluster=(0,3) tells that you are going to draw three bar
42
+ # plots side by side. The plot labeled "foo" will the leftmost (i.e.,
43
+ # 0th out of 3). Attribute hcol tells the column from which to
44
+ # retrive sample values from. It defaults to one.
45
+ ar.add_plot(bar_plot.T(label="foo", cluster=(0,3)))
46
+ ar.add_plot(bar_plot.T(label="bar", hcol=2, cluster=(1,3)))
47
+ ar.add_plot(bar_plot.T(label="baz", hcol=3, cluster=(2,3)))
48
+ ar.draw()
49
+ ---------------------------------------------------------------------
50
+
51
+ To execute the script and include the generated chart image in your
52
+ document add the following lines to the AsciiDoc source:
53
+
54
+ ---------------------------------------------------------------------
55
+ // Generate chart image file.
56
+ \sys2::[python barchart.py --format=png --output=barchart.png --scale=2]
57
+
58
+ // Display chart image file.
59
+ image::barchart.png[]
60
+ ---------------------------------------------------------------------
61
+
62
+ NOTE: You need to run asciidoc(1) with the `--unsafe` command-line
63
+ option to execute the `sys2` system macro.
64
+
65
+
7
66
  == How can I render indented paragraphs?
8
67
 
9
68
  To unconditionally indent all paragraphs add the following line to the
@@ -77,7 +136,7 @@ a backslash character. These elements include:
77
136
  - Attribute references.
78
137
  - Text formatting.
79
138
  - Quoting,
80
- - 'URLs', 'image' and 'link' macros.
139
+ - Macros.
81
140
  - Replacements.
82
141
  - Special words.
83
142
  - Table cell separators.
@@ -115,8 +174,6 @@ the first match unescapes allowing the second to substitute. A
115
174
  work-around for difficult cases is to side-step the problem using the
116
175
  `\pass:[]` passthrough inline macro.
117
176
 
118
- NOTE: System macros cannot be escaped.
119
-
120
177
 
121
178
  == How can I set default list and tables styles?
122
179
 
@@ -3,7 +3,8 @@
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
4
  <head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
- <meta name="generator" content="AsciiDoc 8.2.7" />
6
+ <meta name="generator" content="AsciiDoc 8.3.1" />
7
+ <title>Music Filter</title>
7
8
  <style type="text/css">
8
9
  /* Debug borders */
9
10
  p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
@@ -165,13 +166,25 @@ div.listingblock > div.content {
165
166
  padding: 0.5em;
166
167
  }
167
168
 
168
- div.quoteblock > div.content {
169
+ div.quoteblock {
169
170
  padding-left: 2.0em;
170
171
  }
171
-
172
- div.attribution {
172
+ div.quoteblock > div.attribution {
173
+ padding-top: 0.5em;
173
174
  text-align: right;
174
175
  }
176
+
177
+ div.verseblock {
178
+ padding-left: 2.0em;
179
+ }
180
+ div.verseblock > div.content {
181
+ white-space: pre;
182
+ }
183
+ div.verseblock > div.attribution {
184
+ padding-top: 0.75em;
185
+ text-align: left;
186
+ }
187
+ /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
175
188
  div.verseblock + div.attribution {
176
189
  text-align: left;
177
190
  }
@@ -194,10 +207,6 @@ div.exampleblock > div.content {
194
207
  padding: 0.5em;
195
208
  }
196
209
 
197
- div.verseblock div.content {
198
- white-space: pre;
199
- }
200
-
201
210
  div.imageblock div.content { padding-left: 0; }
202
211
  div.imageblock img { border: 1px solid silver; }
203
212
  span.image img { border-style: none; }
@@ -210,6 +219,7 @@ dt {
210
219
  margin-top: 0.5em;
211
220
  margin-bottom: 0;
212
221
  font-style: normal;
222
+ color: navy;
213
223
  }
214
224
  dd > *:first-child {
215
225
  margin-top: 0.1em;
@@ -218,12 +228,28 @@ dd > *:first-child {
218
228
  ul, ol {
219
229
  list-style-position: outside;
220
230
  }
221
- div.olist > ol {
231
+ ol.arabic {
222
232
  list-style-type: decimal;
223
233
  }
224
- div.olist2 > ol {
234
+ ol.loweralpha {
225
235
  list-style-type: lower-alpha;
226
236
  }
237
+ ol.upperalpha {
238
+ list-style-type: upper-alpha;
239
+ }
240
+ ol.lowerroman {
241
+ list-style-type: lower-roman;
242
+ }
243
+ ol.upperroman {
244
+ list-style-type: upper-roman;
245
+ }
246
+
247
+ div.compact ul, div.compact ol,
248
+ div.compact p, div.compact p,
249
+ div.compact div, div.compact div {
250
+ margin-top: 0.1em;
251
+ margin-bottom: 0.1em;
252
+ }
227
253
 
228
254
  div.tableblock > table {
229
255
  border: 3px solid #527bbd;
@@ -235,22 +261,49 @@ thead {
235
261
  tfoot {
236
262
  font-weight: bold;
237
263
  }
264
+ td > div.verse {
265
+ white-space: pre;
266
+ }
267
+ p.table {
268
+ margin-top: 0;
269
+ }
270
+ /* Because the table frame attribute is overriden by CSS in most browsers. */
271
+ div.tableblock > table[frame="void"] {
272
+ border-style: none;
273
+ }
274
+ div.tableblock > table[frame="hsides"] {
275
+ border-left-style: none;
276
+ border-right-style: none;
277
+ }
278
+ div.tableblock > table[frame="vsides"] {
279
+ border-top-style: none;
280
+ border-bottom-style: none;
281
+ }
282
+
238
283
 
239
- div.hlist {
284
+ div.hdlist {
240
285
  margin-top: 0.8em;
241
286
  margin-bottom: 0.8em;
242
287
  }
243
- div.hlist td {
288
+ div.hdlist tr {
244
289
  padding-bottom: 15px;
245
290
  }
246
- td.hlist1 {
291
+ dt.hdlist1.strong, td.hdlist1.strong {
292
+ font-weight: bold;
293
+ }
294
+ td.hdlist1 {
247
295
  vertical-align: top;
248
296
  font-style: normal;
249
297
  padding-right: 0.8em;
298
+ color: navy;
250
299
  }
251
- td.hlist2 {
300
+ td.hdlist2 {
252
301
  vertical-align: top;
253
302
  }
303
+ div.hdlist.compact tr {
304
+ margin: 0;
305
+ padding-bottom: 0;
306
+ }
254
307
 
255
308
  @media print {
256
309
  div#footer-badges { display: none; }
@@ -302,8 +355,17 @@ div.listingblock div.content {
302
355
  padding: 0.5em;
303
356
  }
304
357
 
305
- div.quoteblock-content {
306
- padding-left: 2.0em;
358
+ div.quoteblock-attribution {
359
+ padding-top: 0.5em;
360
+ text-align: right;
361
+ }
362
+
363
+ div.verseblock-content {
364
+ white-space: pre;
365
+ }
366
+ div.verseblock-attribution {
367
+ padding-top: 0.75em;
368
+ text-align: left;
307
369
  }
308
370
 
309
371
  div.exampleblock-content {
@@ -313,16 +375,7 @@ div.exampleblock-content {
313
375
 
314
376
  /* IE6 sets dynamically generated links as visited. */
315
377
  div#toc a:visited { color: blue; }
316
-
317
- /* Because IE6 child selector is broken. */
318
- div.olist2 ol {
319
- list-style-type: lower-alpha;
320
- }
321
- div.olist2 div.olist ol {
322
- list-style-type: decimal;
323
- }
324
378
  </style>
325
- <title>Music Filter</title>
326
379
  </head>
327
380
  <body>
328
381
  <div id="header">
@@ -330,28 +383,28 @@ div.olist2 div.olist ol {
330
383
  </div>
331
384
  <div id="preamble">
332
385
  <div class="sectionbody">
333
- <div class="para"><p>The <em>AsciiDoc</em> distribution includes a Music Block filter that
386
+ <div class="paragraph"><p>The <em>AsciiDoc</em> distribution includes a Music Block filter that
334
387
  translates music in <a href="http://lilypond.org/">LilyPond</a> or
335
388
  <a href="http://abcnotation.org.uk/">ABC</a> notation to standard classical
336
389
  notation in the form of a trimmed PNG image which is automatically
337
390
  inserted into the <em>AsciiDoc</em> output document (see the <a href="#X1">examples below</a>).</p></div>
338
- <div class="para"><p>Actually the filter (<tt>./filters/music2png.py</tt>) can be used outside
391
+ <div class="paragraph"><p>Actually the filter (<tt>./filters/music2png.py</tt>) can be used outside
339
392
  <em>AsciiDoc</em> to convert LilyPond or ABC music files to PNG images.
340
393
  Execute the following command to see how to use it:</p></div>
341
394
  <div class="literalblock">
342
395
  <div class="content">
343
396
  <pre><tt>$ ./filters/music2png.py --help</tt></pre>
344
397
  </div></div>
345
- <div class="para"><p>The Music Filter can be used as a model for filters that convert a
398
+ <div class="paragraph"><p>The Music Filter can be used as a model for filters that convert a
346
399
  block of text into a file that is linked or embedded into the <em>AsciiDoc</em>
347
400
  output document.</p></div>
348
401
  <div class="exampleblock" id="X1">
349
402
  <div class="title">Example 1: Music Block containing ABC notation</div>
350
403
  <div class="exampleblock-content">
351
- <div class="para"><p>This Music Block:</p></div>
404
+ <div class="paragraph"><p>This Music Block:</p></div>
352
405
  <div class="listingblock">
353
406
  <div class="content">
354
- <pre><tt> [music,music1.png]
407
+ <pre><tt> ["music","music1.png",scaledwidth="100%"]
355
408
  ---------------------------------------------------------------------
356
409
  T:The Butterfly
357
410
  R:slip jig
@@ -367,7 +420,7 @@ output document.</p></div>
367
420
  |:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):|
368
421
  ---------------------------------------------------------------------</tt></pre>
369
422
  </div></div>
370
- <div class="para"><p>Renders:</p></div>
423
+ <div class="paragraph"><p>Renders:</p></div>
371
424
  <div class="musicblock">
372
425
  <div class="content">
373
426
  <img style="border-width: 0;" src="music1.png" alt="music1.png" />
@@ -376,7 +429,7 @@ output document.</p></div>
376
429
  <div class="exampleblock" id="X2">
377
430
  <div class="title">Example 2: Music Block containing LilyPond notation</div>
378
431
  <div class="exampleblock-content">
379
- <div class="para"><p>This example contains LilyPond musical markup, it uses the <em>link</em>
432
+ <div class="paragraph"><p>This example contains LilyPond musical markup, it uses the <em>link</em>
380
433
  attribute so you can click on the music image to display the source
381
434
  notation. The <tt>music2.ly</tt> source file is automatically created and
382
435
  retained by the <tt>music2png.py</tt> filter when the <tt>-m</tt> option is used.</p></div>
@@ -395,7 +448,7 @@ retained by the <tt>music2png.py</tt> filter when the <tt>-m</tt> option is used
395
448
  }
396
449
  ---------------------------------------------------------------------</tt></pre>
397
450
  </div></div>
398
- <div class="para"><p>Renders:</p></div>
451
+ <div class="paragraph"><p>Renders:</p></div>
399
452
  <div class="musicblock">
400
453
  <div class="content">
401
454
  <a href="music2.ly">
@@ -418,9 +471,9 @@ are using.</td>
418
471
  </div>
419
472
  <h2 id="_using_the_filter">Using the Filter</h2>
420
473
  <div class="sectionbody">
421
- <div class="para"><p>Insert a delimited Music Block containing valid ABC notation into your
474
+ <div class="paragraph"><p>Insert a delimited Music Block containing valid ABC notation into your
422
475
  <em>AsciiDoc</em> document:</p></div>
423
- <div class="ilist"><ul>
476
+ <div class="ulist"><ul>
424
477
  <li>
425
478
  <p>
426
479
  The Music Block delimiter is the word <tt>music</tt> followed by four or
@@ -452,7 +505,7 @@ The optional named block attributes <em>link</em>, <em>width</em> and <em>height
452
505
  </div>
453
506
  <h2 id="_limitations">Limitations</h2>
454
507
  <div class="sectionbody">
455
- <div class="ilist"><ul>
508
+ <div class="ulist"><ul>
456
509
  <li>
457
510
  <p>
458
511
  The <tt><tt>asciidoc(1)</tt></tt> output file cannot be <tt>-</tt> (stdout), you must
@@ -470,8 +523,8 @@ If the music image file is linked to the output document then the
470
523
  </div>
471
524
  <h2 id="_installation">Installation</h2>
472
525
  <div class="sectionbody">
473
- <div class="para"><p>In addition to <em>AsciiDoc</em> you will need to have installed:</p></div>
474
- <div class="ilist"><ul>
526
+ <div class="paragraph"><p>In addition to <em>AsciiDoc</em> you will need to have installed:</p></div>
527
+ <div class="ulist"><ul>
475
528
  <li>
476
529
  <p>
477
530
  <a href="http://lilypond.org/web/">LilyPond</a> (most Linux distributions include
@@ -485,13 +538,13 @@ If the music image file is linked to the output document then the
485
538
  </p>
486
539
  </li>
487
540
  </ul></div>
488
- <div class="para"><p>Test the music filter it by converting the test file to HTML with <em>AsciiDoc</em>:</p></div>
541
+ <div class="paragraph"><p>Test the music filter it by converting the test file to HTML with <em>AsciiDoc</em>:</p></div>
489
542
  <div class="literalblock">
490
543
  <div class="content">
491
544
  <pre><tt>$ asciidoc -v ./filters/music-filter-test.txt
492
545
  $ firefox ./filters/music-filter-test.html &amp;</tt></pre>
493
546
  </div></div>
494
- <div class="para"><p>The filter was developed and tested on Xubuntu Linux using LilyPond
547
+ <div class="paragraph"><p>The filter was developed and tested on Xubuntu Linux using LilyPond
495
548
  2.10.5 and ImageMagick 6.2.4.</p></div>
496
549
  <div class="admonitionblock">
497
550
  <table><tr>
@@ -506,7 +559,7 @@ a problem).</td>
506
559
  </div>
507
560
  <div id="footer">
508
561
  <div id="footer-text">
509
- Last updated 2008-07-02 21:36:40 NZDT
562
+ Last updated 2008-12-31 14:47:04 NZDT
510
563
  </div>
511
564
  </div>
512
565
  </body>
Binary file
@@ -1,378 +1,30 @@
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">
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
4
3
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
- <meta name="generator" content="AsciiDoc 8.2.7" />
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
- ul, ol, li > p {
77
- margin-top: 0;
78
- }
79
-
80
- pre {
81
- padding: 0;
82
- margin: 0;
83
- }
84
-
85
- span#author {
86
- color: #527bbd;
87
- font-family: sans-serif;
88
- font-weight: bold;
89
- font-size: 1.1em;
90
- }
91
- span#email {
92
- }
93
- span#revision {
94
- font-family: sans-serif;
95
- }
96
-
97
- div#footer {
98
- font-family: sans-serif;
99
- font-size: small;
100
- border-top: 2px solid silver;
101
- padding-top: 0.5em;
102
- margin-top: 4.0em;
103
- }
104
- div#footer-text {
105
- float: left;
106
- padding-bottom: 0.5em;
107
- }
108
- div#footer-badges {
109
- float: right;
110
- padding-bottom: 0.5em;
111
- }
112
-
113
- div#preamble,
114
- div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
115
- div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
116
- div.admonitionblock {
117
- margin-right: 10%;
118
- margin-top: 1.5em;
119
- margin-bottom: 1.5em;
120
- }
121
- div.admonitionblock {
122
- margin-top: 2.5em;
123
- margin-bottom: 2.5em;
124
- }
125
-
126
- div.content { /* Block element content. */
127
- padding: 0;
128
- }
129
-
130
- /* Block element titles. */
131
- div.title, caption.title {
132
- color: #527bbd;
133
- font-family: sans-serif;
134
- font-weight: bold;
135
- text-align: left;
136
- margin-top: 1.0em;
137
- margin-bottom: 0.5em;
138
- }
139
- div.title + * {
140
- margin-top: 0;
141
- }
142
-
143
- td div.title:first-child {
144
- margin-top: 0.0em;
145
- }
146
- div.content div.title:first-child {
147
- margin-top: 0.0em;
148
- }
149
- div.content + div.title {
150
- margin-top: 0.0em;
151
- }
152
-
153
- div.sidebarblock > div.content {
154
- background: #ffffee;
155
- border: 1px solid silver;
156
- padding: 0.5em;
157
- }
158
-
159
- div.listingblock {
160
- margin-right: 0%;
161
- }
162
- div.listingblock > div.content {
163
- border: 1px solid silver;
164
- background: #f4f4f4;
165
- padding: 0.5em;
166
- }
167
-
168
- div.quoteblock {
169
- padding-left: 2.0em;
170
- }
171
- div.quoteblock > div.attribution {
172
- padding-top: 0.5em;
173
- text-align: right;
174
- }
175
-
176
- div.verseblock {
177
- padding-left: 2.0em;
178
- }
179
- div.verseblock > div.content {
180
- white-space: pre;
181
- }
182
- div.verseblock > div.attribution {
183
- padding-top: 0.75em;
184
- text-align: left;
185
- }
186
- /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
187
- div.verseblock + div.attribution {
188
- text-align: left;
189
- }
190
-
191
- div.admonitionblock .icon {
192
- vertical-align: top;
193
- font-size: 1.1em;
194
- font-weight: bold;
195
- text-decoration: underline;
196
- color: #527bbd;
197
- padding-right: 0.5em;
198
- }
199
- div.admonitionblock td.content {
200
- padding-left: 0.5em;
201
- border-left: 2px solid silver;
202
- }
203
-
204
- div.exampleblock > div.content {
205
- border-left: 2px solid silver;
206
- padding: 0.5em;
207
- }
208
-
209
- div.imageblock div.content { padding-left: 0; }
210
- div.imageblock img { border: 1px solid silver; }
211
- span.image img { border-style: none; }
212
-
213
- dl {
214
- margin-top: 0.8em;
215
- margin-bottom: 0.8em;
216
- }
217
- dt {
218
- margin-top: 0.5em;
219
- margin-bottom: 0;
220
- font-style: normal;
221
- }
222
- dd > *:first-child {
223
- margin-top: 0.1em;
224
- }
225
-
226
- ul, ol {
227
- list-style-position: outside;
228
- }
229
- div.olist > ol {
230
- list-style-type: decimal;
231
- }
232
- div.olist2 > ol {
233
- list-style-type: lower-alpha;
234
- }
235
-
236
- div.tableblock > table {
237
- border: 3px solid #527bbd;
238
- }
239
- thead {
240
- font-family: sans-serif;
241
- font-weight: bold;
242
- }
243
- tfoot {
244
- font-weight: bold;
245
- }
246
-
247
- div.hlist {
248
- margin-top: 0.8em;
249
- margin-bottom: 0.8em;
250
- }
251
- div.hlist td {
252
- padding-bottom: 15px;
253
- }
254
- td.hlist1 {
255
- vertical-align: top;
256
- font-style: normal;
257
- padding-right: 0.8em;
258
- }
259
- td.hlist2 {
260
- vertical-align: top;
261
- }
262
-
263
- @media print {
264
- div#footer-badges { display: none; }
265
- }
266
-
267
- div#toctitle {
268
- color: #527bbd;
269
- font-family: sans-serif;
270
- font-size: 1.1em;
271
- font-weight: bold;
272
- margin-top: 1.0em;
273
- margin-bottom: 0.1em;
274
- }
275
-
276
- div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
277
- margin-top: 0;
278
- margin-bottom: 0;
279
- }
280
- div.toclevel2 {
281
- margin-left: 2em;
282
- font-size: 0.9em;
283
- }
284
- div.toclevel3 {
285
- margin-left: 4em;
286
- font-size: 0.9em;
287
- }
288
- div.toclevel4 {
289
- margin-left: 6em;
290
- font-size: 0.9em;
291
- }
292
- /* Workarounds for IE6's broken and incomplete CSS2. */
293
-
294
- div.sidebar-content {
295
- background: #ffffee;
296
- border: 1px solid silver;
297
- padding: 0.5em;
298
- }
299
- div.sidebar-title, div.image-title {
300
- color: #527bbd;
301
- font-family: sans-serif;
302
- font-weight: bold;
303
- margin-top: 0.0em;
304
- margin-bottom: 0.5em;
305
- }
306
-
307
- div.listingblock div.content {
308
- border: 1px solid silver;
309
- background: #f4f4f4;
310
- padding: 0.5em;
311
- }
312
-
313
- div.quoteblock-attribution {
314
- padding-top: 0.5em;
315
- text-align: right;
316
- }
317
-
318
- div.verseblock-content {
319
- white-space: pre;
320
- }
321
- div.verseblock-attribution {
322
- padding-top: 0.75em;
323
- text-align: left;
324
- }
325
-
326
- div.exampleblock-content {
327
- border-left: 2px solid silver;
328
- padding-left: 0.5em;
329
- }
330
-
331
- /* IE6 sets dynamically generated links as visited. */
332
- div#toc a:visited { color: blue; }
333
-
334
- /* Because IE6 child selector is broken. */
335
- div.olist2 ol {
336
- list-style-type: lower-alpha;
337
- }
338
- div.olist2 div.olist ol {
339
- list-style-type: decimal;
340
- }
341
- </style>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ <meta name="generator" content="AsciiDoc 8.3.2">
342
6
  <title>Source Code Highlight Filter</title>
343
7
  </head>
344
8
  <body>
345
- <div id="header">
346
9
  <h1>Source Code Highlight Filter</h1>
347
- </div>
348
- <div id="preamble">
349
- <div class="sectionbody">
350
- <div class="para"><p>The <em>AsciiDoc</em> distribution includes a source code syntax highlight
10
+ <p>
11
+ </p>
12
+ <p>The <em>AsciiDoc</em> distribution includes a source code syntax highlight
351
13
  filter (<tt>source-highlight-filter.conf</tt>). It uses
352
14
  <a href="http://www.gnu.org/software/src-highlite/">GNU source-highlight</a> to
353
15
  highlight HTML outputs; DocBook outputs are highlighted by toolchains
354
16
  that have <tt>programlisting</tt> element highlight support, for example
355
- <em>dblatex</em>.</p></div>
356
- <div class="admonitionblock">
357
- <table><tr>
358
- <td class="icon">
359
- <div class="title">Tip</div>
360
- </td>
361
- <td class="content">If the source <em>language</em> attribute has been set (using an
362
- <em>AttributeEntry</em> or from the command-line) you don't have to specify
363
- it in each source code block.</td>
364
- </tr></table>
365
- </div>
366
- </div>
367
- </div>
368
- <h2 id="_examples">Examples</h2>
369
- <div class="sectionbody">
370
- <h3 id="_source_code_paragraphs">Source code paragraphs</h3><div style="clear:left"></div>
371
- <div class="para"><p>The <tt>source</tt> paragraph style will highlight a paragraph of source
372
- code. These three code paragraphs:</p></div>
373
- <div class="listingblock">
374
- <div class="content">
375
- <pre><tt>[source,python]
17
+ <em>dblatex</em>.</p>
18
+ <p><b>Tip:</b> If the source <em>language</em> attribute has been set (using an
19
+ <em>AttributeEntry</em> or from the command-line) you don&#8217;t have to specify
20
+ it in each source code block.</p>
21
+ <hr />
22
+ <h2><a name="_examples"></a>Examples</h2>
23
+ <h3><a name="_source_code_paragraphs"></a>Source code paragraphs</h3>
24
+ <p>The <tt>source</tt> paragraph style will highlight a paragraph of source
25
+ code. These three code paragraphs:</p>
26
+ <table border="0" bgcolor="#e8e8e8" width="100%" cellpadding="10"><tr><td>
27
+ <pre>[source,python]
376
28
  if n &lt; 0: print 'Hello World!'
377
29
 
378
30
  :language: python
@@ -382,36 +34,29 @@ if n &lt; 0: print 'Hello World!'
382
34
 
383
35
  [source,ruby,numbered]
384
36
  [true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
385
- puts "#{a.inspect} =&gt; #{b.inspect}"</tt></pre>
386
- </div></div>
387
- <div class="para"><p>Render this highlighted source code:</p></div>
388
- <div class="exampleblock">
389
- <div class="exampleblock-content"><!-- Generator: GNU source-highlight 2.4
37
+ puts "#{a.inspect} =&gt; #{b.inspect}"</pre>
38
+ </td></tr></table>
39
+ <p>Render this highlighted source code:</p>
40
+ <!-- Generator: GNU source-highlight 2.4
390
41
  by Lorenzo Bettini
391
42
  http://www.lorenzobettini.it
392
43
  http://www.gnu.org/software/src-highlite -->
393
- <pre><tt><span style="font-weight: bold"><span style="color: #0000FF">if</span></span> n <span style="color: #990000">&lt;</span> <span style="color: #993399">0</span><span style="color: #990000">:</span> <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">'Hello World!'</span>
394
- </tt></pre></div></div>
395
- <div class="exampleblock">
396
- <div class="exampleblock-content"><!-- Generator: GNU source-highlight 2.4
44
+ <pre><tt><b><font color="#0000FF">if</font></b> n <font color="#990000">&lt;</font> <font color="#993399">0</font><font color="#990000">:</font> <b><font color="#0000FF">print</font></b> <font color="#FF0000">'Hello World!'</font></tt></pre>
45
+ <!-- Generator: GNU source-highlight 2.4
397
46
  by Lorenzo Bettini
398
47
  http://www.lorenzobettini.it
399
48
  http://www.gnu.org/software/src-highlite -->
400
- <pre><tt><span style="font-weight: bold"><span style="color: #0000FF">if</span></span> n <span style="color: #990000">&lt;</span> <span style="color: #993399">0</span><span style="color: #990000">:</span> <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">'Hello World!'</span>
401
- </tt></pre></div></div>
402
- <div class="exampleblock">
403
- <div class="exampleblock-content"><!-- Generator: GNU source-highlight 2.4
49
+ <pre><tt><b><font color="#0000FF">if</font></b> n <font color="#990000">&lt;</font> <font color="#993399">0</font><font color="#990000">:</font> <b><font color="#0000FF">print</font></b> <font color="#FF0000">'Hello World!'</font></tt></pre>
50
+ <!-- Generator: GNU source-highlight 2.4
404
51
  by Lorenzo Bettini
405
52
  http://www.lorenzobettini.it
406
53
  http://www.gnu.org/software/src-highlite -->
407
- <pre><tt><span style="color: #000000">00001:</span> <span style="color: #990000">[</span><span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">].</span><span style="font-weight: bold"><span style="color: #000000">cycle</span></span><span style="color: #990000">([</span><span style="color: #993399">0</span><span style="color: #990000">,</span> <span style="color: #993399">1</span><span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">,</span> <span style="color: #993399">3</span><span style="color: #990000">,</span> <span style="color: #993399">4</span><span style="color: #990000">])</span> <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>a<span style="color: #990000">,</span> b<span style="color: #990000">|</span>
408
- <span style="color: #000000">00002:</span> puts <span style="color: #FF0000">"#{a.inspect} =&gt; #{b.inspect}"</span>
409
- </tt></pre></div></div>
410
- <h3 id="_unnumbered_source_code_listing">Unnumbered source code listing</h3><div style="clear:left"></div>
411
- <div class="para"><p>This source-highlight filtered block:</p></div>
412
- <div class="listingblock">
413
- <div class="content">
414
- <pre><tt> [source,python]
54
+ <pre><tt><font color="#000000">00001:</font> <font color="#990000">[</font><b><font color="#0000FF">true</font></b><font color="#990000">,</font> <b><font color="#0000FF">false</font></b><font color="#990000">].</font><b><font color="#000000">cycle</font></b><font color="#990000">([</font><font color="#993399">0</font><font color="#990000">,</font> <font color="#993399">1</font><font color="#990000">,</font> <font color="#993399">2</font><font color="#990000">,</font> <font color="#993399">3</font><font color="#990000">,</font> <font color="#993399">4</font><font color="#990000">])</font> <b><font color="#0000FF">do</font></b> <font color="#990000">|</font>a<font color="#990000">,</font> b<font color="#990000">|</font>
55
+ <font color="#000000">00002:</font> puts <font color="#FF0000">"#{a.inspect} =&gt; #{b.inspect}"</font></tt></pre>
56
+ <h3><a name="_unnumbered_source_code_listing"></a>Unnumbered source code listing</h3>
57
+ <p>This source-highlight filtered block:</p>
58
+ <table border="0" bgcolor="#e8e8e8" width="100%" cellpadding="10"><tr><td>
59
+ <pre> [source,python]
415
60
  ---------------------------------------------------------------------
416
61
  ''' A multi-line
417
62
  comment.'''
@@ -422,29 +67,26 @@ http://www.gnu.org/software/src-highlite -->
422
67
  return quote + word + quote
423
68
  else:
424
69
  return word
425
- ---------------------------------------------------------------------</tt></pre>
426
- </div></div>
427
- <div class="para"><p>Renders this highlighted source code:</p></div>
428
- <div class="listingblock">
429
- <div class="content"><!-- Generator: GNU source-highlight 2.4
70
+ ---------------------------------------------------------------------</pre>
71
+ </td></tr></table>
72
+ <p>Renders this highlighted source code:</p>
73
+ <table border="0" bgcolor="#e8e8e8" width="100%" cellpadding="10"><tr><td><!-- Generator: GNU source-highlight 2.4
430
74
  by Lorenzo Bettini
431
75
  http://www.lorenzobettini.it
432
76
  http://www.gnu.org/software/src-highlite -->
433
- <pre><tt><span style="font-style: italic"><span style="color: #9A1900">''' A multi-line</span></span>
434
- <span style="font-style: italic"><span style="color: #9A1900"> comment.'''</span></span>
435
- <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> <span style="font-weight: bold"><span style="color: #000000">sub_word</span></span><span style="color: #990000">(</span>mo<span style="color: #990000">):</span>
436
- <span style="font-style: italic"><span style="color: #9A1900"> ''' Single line comment.'''</span></span>
437
- word <span style="color: #990000">=</span> mo<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">group</span></span><span style="color: #990000">(</span><span style="color: #FF0000">'word'</span><span style="color: #990000">)</span> <span style="font-style: italic"><span style="color: #9A1900"># Inline comment</span></span>
438
- <span style="font-weight: bold"><span style="color: #0000FF">if</span></span> word <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> keywords<span style="color: #990000">[</span>language<span style="color: #990000">]:</span>
439
- <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> quote <span style="color: #990000">+</span> word <span style="color: #990000">+</span> quote
440
- <span style="font-weight: bold"><span style="color: #0000FF">else</span></span><span style="color: #990000">:</span>
441
- <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> word
442
- </tt></pre></div></div>
443
- <h3 id="_numbered_source_code_listing_with_callouts">Numbered source code listing with callouts</h3><div style="clear:left"></div>
444
- <div class="para"><p>This source-highlight filtered block:</p></div>
445
- <div class="listingblock">
446
- <div class="content">
447
- <pre><tt> [source,ruby,numbered]
77
+ <pre><tt><i><font color="#9A1900">''' A multi-line</font></i>
78
+ <i><font color="#9A1900"> comment.'''</font></i>
79
+ <b><font color="#0000FF">def</font></b> <b><font color="#000000">sub_word</font></b><font color="#990000">(</font>mo<font color="#990000">):</font>
80
+ <i><font color="#9A1900"> ''' Single line comment.'''</font></i>
81
+ word <font color="#990000">=</font> mo<font color="#990000">.</font><b><font color="#000000">group</font></b><font color="#990000">(</font><font color="#FF0000">'word'</font><font color="#990000">)</font> <i><font color="#9A1900"># Inline comment</font></i>
82
+ <b><font color="#0000FF">if</font></b> word <b><font color="#0000FF">in</font></b> keywords<font color="#990000">[</font>language<font color="#990000">]:</font>
83
+ <b><font color="#0000FF">return</font></b> quote <font color="#990000">+</font> word <font color="#990000">+</font> quote
84
+ <b><font color="#0000FF">else</font></b><font color="#990000">:</font>
85
+ <b><font color="#0000FF">return</font></b> word</tt></pre></td></tr></table>
86
+ <h3><a name="_numbered_source_code_listing_with_callouts"></a>Numbered source code listing with callouts</h3>
87
+ <p>This source-highlight filtered block:</p>
88
+ <table border="0" bgcolor="#e8e8e8" width="100%" cellpadding="10"><tr><td>
89
+ <pre> [source,ruby,numbered]
448
90
  ---------------------------------------------------------------------
449
91
  #
450
92
  # Useful Ruby base class extensions.
@@ -479,46 +121,44 @@ http://www.gnu.org/software/src-highlite -->
479
121
  ---------------------------------------------------------------------
480
122
 
481
123
  &lt;1&gt; First callout.
482
- &lt;2&gt; Second call out.</tt></pre>
483
- </div></div>
484
- <div class="para"><p>Renders this highlighted source code:</p></div>
485
- <div class="listingblock">
486
- <div class="content"><!-- Generator: GNU source-highlight 2.4
124
+ &lt;2&gt; Second callout.</pre>
125
+ </td></tr></table>
126
+ <p>Renders this highlighted source code:</p>
127
+ <table border="0" bgcolor="#e8e8e8" width="100%" cellpadding="10"><tr><td><!-- Generator: GNU source-highlight 2.4
487
128
  by Lorenzo Bettini
488
129
  http://www.lorenzobettini.it
489
130
  http://www.gnu.org/software/src-highlite -->
490
- <pre><tt><span style="color: #000000">00001:</span> <span style="font-style: italic"><span style="color: #9A1900">#</span></span>
491
- <span style="color: #000000">00002:</span> <span style="font-style: italic"><span style="color: #9A1900"># Useful Ruby base class extensions.</span></span>
492
- <span style="color: #000000">00003:</span> <span style="font-style: italic"><span style="color: #9A1900">#</span></span>
493
- <span style="color: #000000">00004:</span>
494
- <span style="color: #000000">00005:</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> Array
495
- <span style="color: #000000">00006:</span>
496
- <span style="color: #000000">00007:</span> <span style="font-style: italic"><span style="color: #9A1900"># Execute a block passing it corresponding items in</span></span>
497
- <span style="color: #000000">00008:</span> <span style="font-style: italic"><span style="color: #9A1900"># +self+ and +other_array+.</span></span>
498
- <span style="color: #000000">00009:</span> <span style="font-style: italic"><span style="color: #9A1900"># If self has less items than other_array it is repeated.</span></span>
499
- <span style="color: #000000">00010:</span>
500
- <span style="color: #000000">00011:</span> <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> <span style="font-weight: bold"><span style="color: #000000">cycle</span></span><span style="color: #990000">(</span>other_array<span style="color: #990000">)</span> <span style="font-style: italic"><span style="color: #9A1900"># :yields: item, other_item</span></span>
501
- <span style="color: #000000">00012:</span> other_array<span style="color: #990000">.</span>each_with_index <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>item<span style="color: #990000">,</span> index<span style="color: #990000">|</span>
502
- <span style="color: #000000">00013:</span> <span style="font-weight: bold"><span style="color: #0000FF">yield</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">self</span></span><span style="color: #990000">[</span>index <span style="color: #990000">%</span> <span style="font-weight: bold"><span style="color: #0000FF">self</span></span><span style="color: #990000">.</span>length<span style="color: #990000">],</span> item<span style="color: #990000">)</span>
503
- <span style="color: #000000">00014:</span> <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
504
- <span style="color: #000000">00015:</span> <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
505
- <span style="color: #000000">00016:</span>
506
- <span style="color: #000000">00017:</span> <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
507
- <span style="color: #000000">00018:</span>
508
- <span style="color: #000000">00019:</span> <span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="color: #009900">$0</span> <span style="color: #990000">==</span> <span style="font-weight: bold"><span style="color: #0000FF">__FILE__</span></span> <span style="color: #FF0000"><b>&lt;1&gt;</b></span>
509
- <span style="color: #000000">00020:</span> <span style="font-style: italic"><span style="color: #9A1900"># Array#cycle test</span></span>
510
- <span style="color: #000000">00021:</span> <span style="font-style: italic"><span style="color: #9A1900"># true =&gt; 0</span></span>
511
- <span style="color: #000000">00022:</span> <span style="font-style: italic"><span style="color: #9A1900"># false =&gt; 1</span></span>
512
- <span style="color: #000000">00023:</span> <span style="font-style: italic"><span style="color: #9A1900"># true =&gt; 2</span></span>
513
- <span style="color: #000000">00024:</span> <span style="font-style: italic"><span style="color: #9A1900"># false =&gt; 3</span></span>
514
- <span style="color: #000000">00025:</span> <span style="font-style: italic"><span style="color: #9A1900"># true =&gt; 4</span></span>
515
- <span style="color: #000000">00026:</span> puts <span style="color: #FF0000">'Array#cycle test'</span> <span style="color: #FF0000"><b>&lt;2&gt;</b></span>
516
- <span style="color: #000000">00027:</span> <span style="color: #990000">[</span><span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">].</span><span style="font-weight: bold"><span style="color: #000000">cycle</span></span><span style="color: #990000">([</span><span style="color: #993399">0</span><span style="color: #990000">,</span> <span style="color: #993399">1</span><span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">,</span> <span style="color: #993399">3</span><span style="color: #990000">,</span> <span style="color: #993399">4</span><span style="color: #990000">])</span> <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>a<span style="color: #990000">,</span> b<span style="color: #990000">|</span>
517
- <span style="color: #000000">00028:</span> puts <span style="color: #FF0000">"#{a.inspect} =&gt; #{b.inspect}"</span>
518
- <span style="color: #000000">00029:</span> <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
519
- <span style="color: #000000">00030:</span> <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
520
- </tt></pre></div></div>
521
- <div class="colist"><ol>
131
+ <pre><tt><font color="#000000">00001:</font> <i><font color="#9A1900">#</font></i>
132
+ <font color="#000000">00002:</font> <i><font color="#9A1900"># Useful Ruby base class extensions.</font></i>
133
+ <font color="#000000">00003:</font> <i><font color="#9A1900">#</font></i>
134
+ <font color="#000000">00004:</font>
135
+ <font color="#000000">00005:</font> <b><font color="#0000FF">class</font></b> Array
136
+ <font color="#000000">00006:</font>
137
+ <font color="#000000">00007:</font> <i><font color="#9A1900"># Execute a block passing it corresponding items in</font></i>
138
+ <font color="#000000">00008:</font> <i><font color="#9A1900"># +self+ and +other_array+.</font></i>
139
+ <font color="#000000">00009:</font> <i><font color="#9A1900"># If self has less items than other_array it is repeated.</font></i>
140
+ <font color="#000000">00010:</font>
141
+ <font color="#000000">00011:</font> <b><font color="#0000FF">def</font></b> <b><font color="#000000">cycle</font></b><font color="#990000">(</font>other_array<font color="#990000">)</font> <i><font color="#9A1900"># :yields: item, other_item</font></i>
142
+ <font color="#000000">00012:</font> other_array<font color="#990000">.</font>each_with_index <b><font color="#0000FF">do</font></b> <font color="#990000">|</font>item<font color="#990000">,</font> index<font color="#990000">|</font>
143
+ <font color="#000000">00013:</font> <b><font color="#0000FF">yield</font></b><font color="#990000">(</font><b><font color="#0000FF">self</font></b><font color="#990000">[</font>index <font color="#990000">%</font> <b><font color="#0000FF">self</font></b><font color="#990000">.</font>length<font color="#990000">],</font> item<font color="#990000">)</font>
144
+ <font color="#000000">00014:</font> <b><font color="#0000FF">end</font></b>
145
+ <font color="#000000">00015:</font> <b><font color="#0000FF">end</font></b>
146
+ <font color="#000000">00016:</font>
147
+ <font color="#000000">00017:</font> <b><font color="#0000FF">end</font></b>
148
+ <font color="#000000">00018:</font>
149
+ <font color="#000000">00019:</font> <b><font color="#0000FF">if</font></b> <font color="#009900">$0</font> <font color="#990000">==</font> <b><font color="#0000FF">__FILE__</font></b> <font color="#FF0000"><b>&lt;1&gt;</b></font>
150
+ <font color="#000000">00020:</font> <i><font color="#9A1900"># Array#cycle test</font></i>
151
+ <font color="#000000">00021:</font> <i><font color="#9A1900"># true =&gt; 0</font></i>
152
+ <font color="#000000">00022:</font> <i><font color="#9A1900"># false =&gt; 1</font></i>
153
+ <font color="#000000">00023:</font> <i><font color="#9A1900"># true =&gt; 2</font></i>
154
+ <font color="#000000">00024:</font> <i><font color="#9A1900"># false =&gt; 3</font></i>
155
+ <font color="#000000">00025:</font> <i><font color="#9A1900"># true =&gt; 4</font></i>
156
+ <font color="#000000">00026:</font> puts <font color="#FF0000">'Array#cycle test'</font> <font color="#FF0000"><b>&lt;2&gt;</b></font>
157
+ <font color="#000000">00027:</font> <font color="#990000">[</font><b><font color="#0000FF">true</font></b><font color="#990000">,</font> <b><font color="#0000FF">false</font></b><font color="#990000">].</font><b><font color="#000000">cycle</font></b><font color="#990000">([</font><font color="#993399">0</font><font color="#990000">,</font> <font color="#993399">1</font><font color="#990000">,</font> <font color="#993399">2</font><font color="#990000">,</font> <font color="#993399">3</font><font color="#990000">,</font> <font color="#993399">4</font><font color="#990000">])</font> <b><font color="#0000FF">do</font></b> <font color="#990000">|</font>a<font color="#990000">,</font> b<font color="#990000">|</font>
158
+ <font color="#000000">00028:</font> puts <font color="#FF0000">"#{a.inspect} =&gt; #{b.inspect}"</font>
159
+ <font color="#000000">00029:</font> <b><font color="#0000FF">end</font></b>
160
+ <font color="#000000">00030:</font> <b><font color="#0000FF">end</font></b></tt></pre></td></tr></table>
161
+ <ol>
522
162
  <li>
523
163
  <p>
524
164
  First callout.
@@ -526,29 +166,49 @@ First callout.
526
166
  </li>
527
167
  <li>
528
168
  <p>
529
- Second call out.
169
+ Second callout.
530
170
  </p>
531
171
  </li>
532
- </ol></div>
533
- </div>
534
- <h2 id="_installation">Installation</h2>
535
- <div class="sectionbody">
536
- <div class="para"><p>If you want to syntax highlight <em>AsciiDoc</em> HTML outputs you need to
172
+ </ol>
173
+ <hr />
174
+ <h2><a name="_installation"></a>Installation</h2>
175
+ <h3><a name="_html"></a>HTML</h3>
176
+ <p>If you want to syntax highlight <em>AsciiDoc</em> HTML outputs (<tt>html4</tt> and
177
+ <tt>xhtml11</tt> backends) you need to
537
178
  install <a href="http://www.gnu.org/software/src-highlite/">GNU
538
- source-highlight</a> (most distributions have this package). It's not
539
- required if you are generating DocBook output (DocBook syntax
540
- highlighting is handled by the DocBook toolchain).</p></div>
541
- <div class="para"><p>Test the filter by converting the test file to HTML with <em>AsciiDoc</em>:</p></div>
542
- <div class="literalblock">
543
- <div class="content">
544
- <pre><tt>$ asciidoc -v ./filters/source-highlight-filter-test.txt
545
- $ firefox ./filters/source-highlight-filter-test.html &amp;</tt></pre>
546
- </div></div>
547
- </div>
548
- <div id="footer">
549
- <div id="footer-text">
550
- Last updated 2008-07-06 13:37:16 NZDT
551
- </div>
552
- </div>
179
+ source-highlight</a> (most distributions have this package).</p>
180
+ <h3><a name="_docbook"></a>DocBook</h3>
181
+ <p><em>AsciiDoc</em> encloses the source code in a DocBook <em>programlisting</em>
182
+ element and leaves source code highlighting to the DocBook toolchain
183
+ (dblatex has a particularly nice programlisting highlighter). The
184
+ DocBook programlisting element is assigned two attributes:</p>
185
+ <ol type="1">
186
+ <li>
187
+ <p>
188
+ The <em>language</em> attribute is set to the <em>AsciiDoc</em> <em>language</em>
189
+ attribute.
190
+ </p>
191
+ </li>
192
+ <li>
193
+ <p>
194
+ The <em>linenumbering</em> attribute is set to the <em>AsciiDoc</em> <em>src_numbered</em>
195
+ attribute (<em>numbered</em> or <em>unnumbered</em>).
196
+ </p>
197
+ </li>
198
+ </ol>
199
+ <p>If you use <tt><tt>a2x(1)</tt></tt> to generate PDF you need to include the
200
+ <tt>--no-xmllint</tt> option to suppress <tt>xmllint(1)</tt> checking&#8201;&#8212;&#8201;the
201
+ programlisting <em>language</em> attribute (required by the dblatex source
202
+ highlighter) is not part of the DocBook 4 specification (but it is in
203
+ the newer DocBook 5 specification).</p>
204
+ <h3><a name="_testing"></a>Testing</h3>
205
+ <p>Test the filter by converting the test file to HTML with <em>AsciiDoc</em>:</p>
206
+ <pre>$ asciidoc -v ./filters/source-highlight-filter-test.txt
207
+ $ firefox ./filters/source-highlight-filter-test.html &amp;</pre>
208
+ <p></p>
209
+ <p></p>
210
+ <hr /><p><small>
211
+ Last updated 2009-01-01 12:22:58 NZDT
212
+ </small></p>
553
213
  </body>
554
214
  </html>