mizuho 0.9.6 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (222) hide show
  1. data/README.markdown +4 -2
  2. data/Rakefile +0 -37
  3. data/asciidoc/BUGS +9 -18
  4. data/asciidoc/BUGS.txt +5 -14
  5. data/asciidoc/CHANGELOG +1433 -266
  6. data/asciidoc/CHANGELOG.txt +2821 -1810
  7. data/asciidoc/COPYING +339 -339
  8. data/asciidoc/COPYRIGHT +18 -18
  9. data/asciidoc/INSTALL +189 -30
  10. data/asciidoc/INSTALL.txt +175 -19
  11. data/asciidoc/MANIFEST +88 -0
  12. data/asciidoc/Makefile.in +29 -13
  13. data/asciidoc/README +16 -17
  14. data/asciidoc/README.txt +35 -36
  15. data/asciidoc/a2x.py +902 -0
  16. data/asciidoc/asciidoc.conf +610 -455
  17. data/asciidoc/asciidoc.py +1965 -1061
  18. data/asciidoc/asciidocapi.py +257 -0
  19. data/asciidoc/common.aap +2 -2
  20. data/asciidoc/configure +1170 -1023
  21. data/asciidoc/configure.ac +1 -1
  22. data/asciidoc/dblatex/asciidoc-dblatex.xsl +42 -0
  23. data/asciidoc/doc/a2x.1 +559 -102
  24. data/asciidoc/doc/a2x.1.txt +233 -91
  25. data/asciidoc/doc/article-docinfo.xml +87 -0
  26. data/asciidoc/doc/article.pdf +0 -0
  27. data/asciidoc/doc/article.txt +139 -122
  28. data/asciidoc/doc/asciidoc.1 +157 -46
  29. data/asciidoc/doc/asciidoc.1.txt +171 -118
  30. data/asciidoc/doc/asciidoc.conf +7 -8
  31. data/asciidoc/doc/asciidoc.dict +960 -635
  32. data/asciidoc/doc/asciidoc.txt +2335 -1464
  33. data/asciidoc/doc/asciidocapi.txt +189 -0
  34. data/asciidoc/doc/asciimathml.txt +14 -17
  35. data/asciidoc/doc/book-multi.txt +181 -155
  36. data/asciidoc/doc/book.epub +0 -0
  37. data/asciidoc/doc/book.txt +156 -131
  38. data/asciidoc/doc/customers.csv +18 -18
  39. data/asciidoc/doc/epub-notes.txt +210 -0
  40. data/asciidoc/doc/faq.txt +1122 -547
  41. data/asciidoc/doc/latex-backend.txt +192 -191
  42. data/asciidoc/doc/latex-bugs.txt +134 -0
  43. data/asciidoc/doc/latex-filter.pdf +0 -0
  44. data/asciidoc/doc/latex-filter.txt +196 -0
  45. data/asciidoc/doc/latexmath.txt +13 -136
  46. data/asciidoc/doc/latexmathml.txt +2 -2
  47. data/asciidoc/doc/main.aap +233 -297
  48. data/asciidoc/doc/music-filter.pdf +0 -0
  49. data/asciidoc/doc/music-filter.txt +55 -65
  50. data/asciidoc/doc/publishing-ebooks-with-asciidoc.txt +398 -0
  51. data/asciidoc/doc/slidy-example.txt +167 -0
  52. data/asciidoc/doc/slidy.txt +113 -0
  53. data/asciidoc/doc/source-highlight-filter.pdf +0 -0
  54. data/asciidoc/doc/source-highlight-filter.txt +45 -20
  55. data/asciidoc/doc/testasciidoc.txt +231 -0
  56. data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +30 -8
  57. data/asciidoc/docbook-xsl/chunked.xsl +17 -19
  58. data/asciidoc/docbook-xsl/common.xsl +106 -67
  59. data/asciidoc/docbook-xsl/epub.xsl +35 -0
  60. data/asciidoc/docbook-xsl/fo.xsl +3 -0
  61. data/asciidoc/docbook-xsl/htmlhelp.xsl +16 -17
  62. data/asciidoc/docbook-xsl/manpage.xsl +31 -31
  63. data/asciidoc/docbook-xsl/text.xsl +6 -1
  64. data/asciidoc/docbook-xsl/xhtml.xsl +14 -14
  65. data/asciidoc/docbook45.conf +759 -0
  66. data/asciidoc/filters/code/code-filter-readme.txt +37 -37
  67. data/asciidoc/filters/code/code-filter-test.txt +15 -15
  68. data/asciidoc/filters/code/code-filter.conf +8 -8
  69. data/asciidoc/filters/graphviz/asciidoc-graphviz-sample.txt +104 -64
  70. data/asciidoc/filters/graphviz/graphviz-filter.conf +20 -16
  71. data/asciidoc/filters/graphviz/graphviz2png.py +54 -39
  72. data/asciidoc/filters/latex/latex-filter.conf +18 -0
  73. data/asciidoc/filters/latex/latex2png.py +216 -0
  74. data/asciidoc/filters/music/music-filter.conf +8 -17
  75. data/asciidoc/filters/music/music2png.py +40 -32
  76. data/asciidoc/filters/source/source-highlight-filter.conf +40 -34
  77. data/asciidoc/help.conf +261 -96
  78. data/asciidoc/html4.conf +505 -460
  79. data/asciidoc/html5.conf +686 -0
  80. data/asciidoc/images/highlighter.png +0 -0
  81. data/asciidoc/images/icons/caution.png +0 -0
  82. data/asciidoc/images/icons/example.png +0 -0
  83. data/asciidoc/images/icons/important.png +0 -0
  84. data/asciidoc/images/icons/note.png +0 -0
  85. data/asciidoc/images/icons/tip.png +0 -0
  86. data/asciidoc/images/icons/warning.png +0 -0
  87. data/asciidoc/images/smallnew.png +0 -0
  88. data/asciidoc/javascripts/asciidoc.js +189 -0
  89. data/asciidoc/javascripts/slidy.js +2845 -0
  90. data/asciidoc/javascripts/toc.js +8 -0
  91. data/asciidoc/lang-de.conf +57 -0
  92. data/asciidoc/lang-en.conf +54 -0
  93. data/asciidoc/lang-es.conf +49 -9
  94. data/asciidoc/lang-fr.conf +59 -0
  95. data/asciidoc/lang-hu.conf +55 -0
  96. data/asciidoc/lang-it.conf +55 -0
  97. data/asciidoc/lang-nl.conf +57 -0
  98. data/asciidoc/lang-pt-BR.conf +56 -0
  99. data/asciidoc/lang-ru.conf +60 -0
  100. data/asciidoc/lang-uk.conf +60 -0
  101. data/asciidoc/latex.conf +700 -663
  102. data/asciidoc/main.aap +77 -0
  103. data/asciidoc/slidy.conf +136 -0
  104. data/asciidoc/{examples/website/xhtml11-manpage.css → stylesheets/asciidoc-manpage.css} +1 -1
  105. data/asciidoc/stylesheets/asciidoc.css +508 -0
  106. data/asciidoc/stylesheets/docbook-xsl.css +322 -272
  107. data/asciidoc/stylesheets/flask-manpage.css +1 -0
  108. data/asciidoc/stylesheets/flask.css +584 -0
  109. data/asciidoc/stylesheets/pygments.css +66 -0
  110. data/asciidoc/stylesheets/slidy.css +445 -0
  111. data/asciidoc/stylesheets/toc2.css +33 -0
  112. data/asciidoc/stylesheets/volnitsky-manpage.css +1 -0
  113. data/asciidoc/stylesheets/volnitsky.css +435 -0
  114. data/asciidoc/stylesheets/xhtml11-quirks.css +5 -3
  115. data/asciidoc/tests/asciidocapi.py +257 -0
  116. data/asciidoc/tests/data/deprecated-quotes.txt +12 -0
  117. data/asciidoc/tests/data/filters-test.txt +90 -0
  118. data/asciidoc/tests/data/lang-de-test.txt +106 -0
  119. data/asciidoc/tests/data/lang-en-test.txt +114 -0
  120. data/asciidoc/tests/data/lang-es-test.txt +106 -0
  121. data/asciidoc/tests/data/lang-fr-test.txt +106 -0
  122. data/asciidoc/tests/data/lang-hu-test.txt +106 -0
  123. data/asciidoc/tests/data/lang-nl-test.txt +94 -0
  124. data/asciidoc/tests/data/lang-pt-BR-test.txt +106 -0
  125. data/asciidoc/tests/data/lang-ru-test.txt +106 -0
  126. data/asciidoc/tests/data/lang-uk-test.txt +106 -0
  127. data/asciidoc/tests/data/oldtables.txt +64 -0
  128. data/asciidoc/tests/data/rcs-id-marker-test.txt +6 -0
  129. data/asciidoc/tests/data/testcases.conf +2 -0
  130. data/asciidoc/tests/data/testcases.txt +740 -0
  131. data/asciidoc/tests/data/utf8-bom-test.txt +9 -0
  132. data/asciidoc/tests/data/utf8-examples.txt +217 -0
  133. data/asciidoc/tests/testasciidoc.conf +520 -0
  134. data/asciidoc/tests/testasciidoc.py +411 -0
  135. data/asciidoc/text.conf +16 -16
  136. data/asciidoc/vim/syntax/asciidoc.vim +99 -91
  137. data/asciidoc/wordpress.conf +43 -3
  138. data/asciidoc/xhtml11-quirks.conf +61 -57
  139. data/asciidoc/xhtml11.conf +684 -645
  140. data/lib/mizuho.rb +2 -0
  141. data/lib/mizuho/generator.rb +2 -2
  142. data/test/generator_spec.rb +1 -1
  143. data/test/parser_spec.rb +1 -1
  144. data/test/spec_helper.rb +3 -4
  145. metadata +87 -88
  146. data/asciidoc/a2x +0 -674
  147. data/asciidoc/doc/article.css-embedded.html +0 -602
  148. data/asciidoc/doc/article.html +0 -46
  149. data/asciidoc/doc/asciidoc-revhistory.xml +0 -27
  150. data/asciidoc/doc/asciidoc.1.css-embedded.html +0 -598
  151. data/asciidoc/doc/asciidoc.1.css.html +0 -212
  152. data/asciidoc/doc/asciidoc.1.html +0 -190
  153. data/asciidoc/doc/asciidoc.css-embedded.html +0 -7853
  154. data/asciidoc/doc/asciidoc.css.html +0 -7416
  155. data/asciidoc/doc/asciidoc.html +0 -3339
  156. data/asciidoc/doc/book-multi.css-embedded.html +0 -575
  157. data/asciidoc/doc/book-multi.html +0 -55
  158. data/asciidoc/doc/book.css-embedded.html +0 -607
  159. data/asciidoc/doc/book.html +0 -43
  160. data/asciidoc/doc/docbook-xsl.css +0 -272
  161. data/asciidoc/doc/latex-backend.html +0 -117
  162. data/asciidoc/doc/music-filter.html +0 -566
  163. data/asciidoc/doc/source-highlight-filter.html +0 -214
  164. data/asciidoc/docbook.conf +0 -721
  165. data/asciidoc/examples/website/ASCIIMathML.js +0 -938
  166. data/asciidoc/examples/website/CHANGELOG.html +0 -4389
  167. data/asciidoc/examples/website/CHANGELOG.txt +0 -1810
  168. data/asciidoc/examples/website/INSTALL.html +0 -161
  169. data/asciidoc/examples/website/INSTALL.txt +0 -71
  170. data/asciidoc/examples/website/LaTeXMathML.js +0 -1223
  171. data/asciidoc/examples/website/README-website.html +0 -118
  172. data/asciidoc/examples/website/README-website.txt +0 -29
  173. data/asciidoc/examples/website/README.html +0 -125
  174. data/asciidoc/examples/website/README.txt +0 -36
  175. data/asciidoc/examples/website/a2x.1.html +0 -419
  176. data/asciidoc/examples/website/a2x.1.txt +0 -204
  177. data/asciidoc/examples/website/asciidoc-docbook-xsl.html +0 -130
  178. data/asciidoc/examples/website/asciidoc-docbook-xsl.txt +0 -43
  179. data/asciidoc/examples/website/asciidoc-graphviz-sample.txt +0 -130
  180. data/asciidoc/examples/website/asciimathml.txt +0 -64
  181. data/asciidoc/examples/website/build-website.sh +0 -25
  182. data/asciidoc/examples/website/customers.csv +0 -18
  183. data/asciidoc/examples/website/downloads.html +0 -257
  184. data/asciidoc/examples/website/downloads.txt +0 -121
  185. data/asciidoc/examples/website/faq.html +0 -673
  186. data/asciidoc/examples/website/faq.txt +0 -547
  187. data/asciidoc/examples/website/index.html +0 -419
  188. data/asciidoc/examples/website/index.txt +0 -245
  189. data/asciidoc/examples/website/latex-backend.html +0 -535
  190. data/asciidoc/examples/website/latex-backend.txt +0 -191
  191. data/asciidoc/examples/website/latexmathml.txt +0 -41
  192. data/asciidoc/examples/website/layout1.conf +0 -161
  193. data/asciidoc/examples/website/layout1.css +0 -65
  194. data/asciidoc/examples/website/layout2.conf +0 -158
  195. data/asciidoc/examples/website/layout2.css +0 -93
  196. data/asciidoc/examples/website/manpage.html +0 -266
  197. data/asciidoc/examples/website/manpage.txt +0 -118
  198. data/asciidoc/examples/website/music-filter.html +0 -242
  199. data/asciidoc/examples/website/music-filter.txt +0 -158
  200. data/asciidoc/examples/website/music1.abc +0 -12
  201. data/asciidoc/examples/website/music1.png +0 -0
  202. data/asciidoc/examples/website/music2.ly +0 -9
  203. data/asciidoc/examples/website/music2.png +0 -0
  204. data/asciidoc/examples/website/newlists.txt +0 -40
  205. data/asciidoc/examples/website/newtables.txt +0 -397
  206. data/asciidoc/examples/website/sample1.png +0 -0
  207. data/asciidoc/examples/website/sample3.png +0 -0
  208. data/asciidoc/examples/website/sample4.png +0 -0
  209. data/asciidoc/examples/website/source-highlight-filter.html +0 -286
  210. data/asciidoc/examples/website/source-highlight-filter.txt +0 -203
  211. data/asciidoc/examples/website/support.html +0 -78
  212. data/asciidoc/examples/website/support.txt +0 -5
  213. data/asciidoc/examples/website/toc.js +0 -69
  214. data/asciidoc/examples/website/userguide.html +0 -7460
  215. data/asciidoc/examples/website/userguide.txt +0 -4979
  216. data/asciidoc/examples/website/version83.txt +0 -37
  217. data/asciidoc/examples/website/version9.html +0 -143
  218. data/asciidoc/examples/website/version9.txt +0 -48
  219. data/asciidoc/examples/website/xhtml11-quirks.css +0 -41
  220. data/asciidoc/examples/website/xhtml11.css +0 -328
  221. data/asciidoc/stylesheets/xhtml11-manpage.css +0 -18
  222. data/asciidoc/stylesheets/xhtml11.css +0 -328
@@ -0,0 +1,167 @@
1
+ Slidy Example Slideshow
2
+ =======================
3
+ :author: Joe Bloggs
4
+ :copyright: Foobar Inc.
5
+ :backend: slidy
6
+ :max-width: 45em
7
+ :data-uri:
8
+ :icons:
9
+
10
+
11
+ This preamble will appear on a separate slide.
12
+
13
+
14
+ AsciiDoc Elements
15
+ -----------------
16
+ Sagittis in vestibulum. Habitasse ante nulla enim bibendum nulla. Odio
17
+ sed pede litora.
18
+
19
+ [float]
20
+ === Titles inside delimited blocks must be floated
21
+ Porta nisl metus. Justo porttitor vel. Cras consequat tincidunt id sed
22
+ conubia. Feugiat felis justo. Nunc amet nulla. Eu ac orci mollis.
23
+
24
+ .Tiger
25
+ image::images/tiger.png[]
26
+
27
+
28
+ Incremental Elements
29
+ --------------------
30
+ The remaining elements on this page are incremental, press the space
31
+ bar to reveal them.
32
+
33
+ [role="incremental"]
34
+ - Rhoncus pede justo.
35
+ - Velit pede dolor.
36
+ - Iaculis commodo et.
37
+ - Volutpat tristique nec.
38
+
39
+ [role="incremental"]
40
+ --
41
+ Sagittis in vestibulum. Habitasse ante nulla enim bibendum nulla. Odio
42
+ sed pede litora.
43
+ --
44
+
45
+ [role="incremental"]
46
+ . Rhoncus pede justo.
47
+ . Velit pede dolor.
48
+ . Iaculis commodo et.
49
+ . Volutpat tristique nec.
50
+
51
+
52
+ Outline Elements
53
+ ----------------
54
+ The following list is a Slidy 'outline' list -- nested bulleted or
55
+ numbered lists are expanded when the enclosing list item (the ones
56
+ with blue bullet points or numbers) are clicked.
57
+
58
+ [role="outline"]
59
+ - Rhoncus pede justo.
60
+ * Rhoncus pede justo.
61
+ * Velit pede dolor.
62
+
63
+ - Velit pede dolor.
64
+ * Iaculis commodo et.
65
+ +
66
+ NOTE: 'Note' admonition paragraph.
67
+
68
+ * Volutpat tristique nec.
69
+ +
70
+ image::images/tiger.png[]
71
+ * Iaculis commodo et.
72
+ * Volutpat tristique nec.
73
+
74
+ - Iaculis commodo et.
75
+ [role="outline"]
76
+ . Rhoncus pede justo.
77
+ ** Velit pede dolor.
78
+ ** Iaculis commodo et.
79
+ . Volutpat tristique nec.
80
+
81
+ - Volutpat tristique nec.
82
+
83
+
84
+ AsciiDoc Elements
85
+ -----------------
86
+ NOTE: 'Note' admonition paragraph.
87
+
88
+ IMPORTANT: 'Important' admonition paragraph.
89
+
90
+ .Sidebar
91
+ *********************************************************************
92
+ Faucibus sagittis commodo sed et eu. Quam nullam ornare. Sed vel est.
93
+ Mauris urna lobortis interdum placerat per id magnis enim.
94
+ *********************************************************************
95
+
96
+
97
+ AsciiDoc Elements
98
+ -----------------
99
+ A quote block:
100
+
101
+ [quote, Bertrand Russell, The World of Mathematics (1956)]
102
+ ____________________________________________________________________
103
+ A good notation has subtlety and suggestiveness which at times makes
104
+ it almost seem like a live teacher.
105
+ ____________________________________________________________________
106
+
107
+ A verse block:
108
+
109
+ [verse, William Blake, from Auguries of Innocence]
110
+ __________________________________________________
111
+ To see a world in a grain of sand,
112
+ And a heaven in a wild flower,
113
+ Hold infinity in the palm of your hand,
114
+ And eternity in an hour.
115
+ __________________________________________________
116
+
117
+
118
+ AsciiDoc Elements
119
+ -----------------
120
+ .Horizontal and vertical source data
121
+ [width="80%",cols="3,^2,^2,10",options="header"]
122
+ |=========================================================
123
+ |Date |Duration |Avg HR |Notes
124
+
125
+ |22-Aug-08 |10:24 | 157 |
126
+ Worked out MSHR (max sustainable heart rate) by going hard
127
+ for this interval.
128
+
129
+ |22-Aug-08 |23:03 | 152 |
130
+ Back-to-back with previous interval.
131
+
132
+ |24-Aug-08 |40:00 | 145 |
133
+ Moderately hard interspersed with 3x 3min intervals (2min
134
+ hard + 1min really hard taking the HR up to 160).
135
+
136
+ |=========================================================
137
+
138
+
139
+ Filters
140
+ -------
141
+ [source,python]
142
+ .Python source
143
+ ---------------------------------------------------------------------
144
+ ''' A multi-line
145
+ comment.'''
146
+ def sub_word(mo):
147
+ ''' Single line comment.'''
148
+ word = mo.group('word') # Inline comment
149
+ if word in keywords[language]:
150
+ return quote + word + quote
151
+ else:
152
+ return word
153
+ ---------------------------------------------------------------------
154
+
155
+ [music]
156
+ .Music
157
+ ---------------------------------------------------------------------
158
+ \version "2.10.0"
159
+ \paper {
160
+ ragged-right = ##t
161
+ }
162
+ {
163
+ \time 3/4
164
+ \clef bass
165
+ c2 e4 g2. f4 e d c2 r4
166
+ }
167
+ ---------------------------------------------------------------------
@@ -0,0 +1,113 @@
1
+ Slidy backend for AsciiDoc
2
+ ==========================
3
+ :author: Stuart Rackham
4
+ :backend: slidy
5
+ :max-width: 45em
6
+ :data-uri:
7
+ :icons:
8
+
9
+
10
+ Use the following command to create this document (`slidy.html`):
11
+
12
+ asciidoc slidy.txt
13
+
14
+ Press the 'Space' key or the 'Left Arrow' key to continue the
15
+ slideshow.
16
+
17
+
18
+ Overview
19
+ --------
20
+ AsciiDoc has a 'slidy' backend for generating self contained 'Slidy'
21
+ HTML slideshows.
22
+
23
+ - An overview of 'Slidy' can be found here:
24
+ http://www.w3.org/Talks/Tools/Slidy2/
25
+ - AsciiDoc ships with the Slidy JavaScript a customised Slidy CSS
26
+ file.
27
+ - Use the 'asciidoc' `--backend slidy` command-line option to generate
28
+ browser viewable HTML slideshow. Example:
29
+
30
+ asciidoc --backend slidy slidy-example.txt
31
+
32
+ - By default, 'asciidoc' creates a self contained distributable HTML
33
+ document which includes all necessary CSS and JavaScripts. Use the
34
+ 'asciidoc' `--attribute linkcss` command-line option if you prefer
35
+ to link (rather than embed) external CSS and JavaScript files.
36
+
37
+
38
+ How Slidy uses AsciiDoc markup
39
+ ------------------------------
40
+ - The document header is displayed as the first page of the slideshow.
41
+ - If the document has a 'preamble' (the content between the header and
42
+ the first section) it will be displayed on the second page.
43
+ - Each top level section is displayed as a separate slide.
44
+ - If the AsciiDoc 'incremental' attribute is defined then all lists
45
+ and OpenBlock elements are treated as 'incremental' i.e. Slidy
46
+ exposes their child elements one at a time as you progress through
47
+ the slideshow.
48
+ - You can explicitly set an element as incremental by setting its
49
+ 'role' attribute to 'incremental'. Example:
50
+
51
+ [role="incremental"]
52
+ Sagittis in vestibulum. Habitasse ante nulla enim bibendum nulla.
53
+ Odio sed pede litora.
54
+
55
+
56
+ Slidy Specific Attributes
57
+ -------------------------
58
+ incremental::
59
+ If this attribute is defined then all lists and OpenBlock elements are
60
+ classed as incremental i.e. Slidy will expose them one at a time as
61
+ you progress through the slideshow. The default behavior is for the
62
+ show to progress a full slide at at time. Elements that have been
63
+ explicitly classed as 'incremental' with the 'role' attribute are
64
+ always displayed incrementally.
65
+
66
+ duration::
67
+ Set this to the estimated number of minutes that your presentation
68
+ will take and Slidy will display a countdown timer at the bottom right
69
+ of the slideshow. For example, this 'asciidoc' command-line option
70
+ `--attribute duration=5` sets the duration to five minutes.
71
+
72
+ copyright::
73
+ If you set the 'copyright' attribute it will be displayed in the Slidy
74
+ menu bar at the bottom of the slide. If the 'copyright' attribute is
75
+ not define then the author name, if it is defined, will be displayed.
76
+
77
+ outline::
78
+ Setting the 'role' attribute to 'outline' in a bulleted or numbered
79
+ list allows nested lists to be expanded and collapsed using the mouse.
80
+ Nested lists are expanded when an enclosing list item (the ones with
81
+ blue bullet points or numbers) is clicked.
82
+
83
+
84
+ Stylesheets
85
+ -----------
86
+ - 'slidy' loads the 'asciidoc.css' stylesheet followed by 'slidy.css':
87
+ * `asciidoc.css` contains content presentational styles.
88
+ * The customized `slidy.css` stylesheet contains Slidy specific
89
+ styles (table of contents, menu and transition related).
90
+ - You can use AsciiDoc CSS themes. For example, the 'asciidoc'
91
+ `--attribute theme=volnitsky` command-line option will substitute
92
+ the `asciidoc.css` stylesheet for the distributed Volnitsky
93
+ `volnitsky.css` stylesheet.
94
+ - An additional stylesheet can be specified by setting the
95
+ 'stylesheet' attribute. For example, the `--attribute
96
+ stylesheet=myslidy.css` will load `myslidy.css` after the standard
97
+ CSS files.
98
+
99
+
100
+ Tips
101
+ ----
102
+ - The Slidy 'help?' and 'contents?' links at the bottom left are your
103
+ friends.
104
+ - Use the AsciiDoc 'data-uri' attribute to embed images in your
105
+ slideshow -- add this attribute entry to your document's header:
106
+
107
+ :data-uri:
108
+
109
+ - Use the AsciiDoc 'max-width' attribute to set the document display
110
+ width. For example, add this attribute entry to your document's
111
+ header:
112
+
113
+ :max-width: 45em
@@ -2,19 +2,41 @@ Source Code Highlight Filter
2
2
  ============================
3
3
 
4
4
  The AsciiDoc distribution includes a source code syntax highlight
5
- filter (`source-highlight-filter.conf`). It uses
6
- http://www.gnu.org/software/src-highlite/[GNU source-highlight] to
7
- highlight HTML outputs; DocBook outputs are highlighted by toolchains
8
- that have `programlisting` element highlight support, for example
9
- 'dblatex'.
5
+ filter (`source-highlight-filter.conf`).
10
6
 
11
- TIP: If the source 'language' attribute has been set (using an
12
- 'AttributeEntry' or from the command-line) you don't have to specify
13
- it in each source code block.
7
+
8
+ HTML Outputs
9
+ ------------
10
+ The highlighter uses http://www.gnu.org/software/src-highlite/[GNU
11
+ source-highlight] to highlight 'html4' and 'xhtml11' outputs. You also
12
+ have the option of using the http://pygments.org/[Pygments] syntax
13
+ highlighter for 'xhtml11' outputs.
14
+
15
+ To use Pygments you need to define an AsciiDoc attribute named
16
+ 'pygments' (either from the command-line or in the global
17
+ `asciidoc.conf` configuration file) and you will also need to have
18
+ Pygments installed and the 'pygmentize' command in your PATH.
19
+
20
+ - You can customize Pygments CSS styles by editing
21
+ `./stylesheets/pygments.css`.
22
+ - To make Pygments your default highlighter put the following line
23
+ your `~/.asciidoc/asciidoc.conf` file:
24
+
25
+ pygments=
26
+
27
+ - The AsciiDoc 'encoding' attribute is passed to Pygments as a `-O`
28
+ command-line option.
29
+
30
+
31
+ DocBook Outputs
32
+ ---------------
33
+ DocBook outputs are highlighted by toolchains that have
34
+ `programlisting` element highlight support, for example 'dblatex'.
14
35
 
15
36
 
16
37
  Examples
17
38
  --------
39
+
18
40
  Source code paragraphs
19
41
  ~~~~~~~~~~~~~~~~~~~~~~
20
42
  The `source` paragraph style will highlight a paragraph of source
@@ -166,15 +188,25 @@ end
166
188
  <1> First callout.
167
189
  <2> Second callout.
168
190
 
191
+ [TIP]
192
+ =====
193
+ - If the source 'language' attribute has been set (using an
194
+ 'AttributeEntry' or from the command-line) you don't have to specify
195
+ it in each source code block.
196
+ - You may need to place callout markers inside source code comments to
197
+ ensure they are not misinterpreted and mangled by the highlighter.
198
+ =====
199
+
169
200
 
170
201
  Installation
171
202
  ------------
172
203
  HTML
173
204
  ~~~~
174
205
  If you want to syntax highlight AsciiDoc HTML outputs (`html4` and
175
- `xhtml11` backends) you need to
176
- install http://www.gnu.org/software/src-highlite/[GNU
177
- source-highlight] (most distributions have this package).
206
+ `xhtml11` backends) you need to install
207
+ http://www.gnu.org/software/src-highlite/[GNU source-highlight] or
208
+ http://pygments.org/[Pygments] (most distributions have these
209
+ packages).
178
210
 
179
211
  DocBook
180
212
  ~~~~~~~
@@ -188,16 +220,9 @@ DocBook programlisting element is assigned two attributes:
188
220
  . The 'linenumbering' attribute is set to the AsciiDoc 'src_numbered'
189
221
  attribute ('numbered' or 'unnumbered').
190
222
 
191
- If you use `a2x(1)` to generate PDF you need to include the
192
- `--no-xmllint` option to suppress `xmllint(1)` checking -- the
193
- programlisting 'language' attribute (required by the dblatex source
194
- highlighter) is not part of the DocBook 4 specification (but it is in
195
- the newer DocBook 5 specification).
196
-
197
-
198
223
  Testing
199
224
  ~~~~~~~
200
225
  Test the filter by converting the test file to HTML with AsciiDoc:
201
226
 
202
- $ asciidoc -v ./filters/source-highlight-filter-test.txt
203
- $ firefox ./filters/source-highlight-filter-test.html &
227
+ $ asciidoc -v ./filters/source/source-highlight-filter-test.txt
228
+ $ firefox ./filters/source/source-highlight-filter-test.html &
@@ -0,0 +1,231 @@
1
+ AsciiDoc Tests
2
+ ==============
3
+
4
+ AsciiDoc includes 'testasciidoc', a Python script runs a set of
5
+ AsciiDoc conformance tests. 'testasciidoc' runs through a list of
6
+ AsciiDoc source files, generates backend outputs and then compares
7
+ them to expected result files. The whole process is driven by a
8
+ configuration file containing a list of user configurable test
9
+ specifications.
10
+
11
+
12
+ Rationale
13
+ ---------
14
+ When modifying AsciiDoc configuration files or source code it's very
15
+ easy to introduce regression errors. 'testasciidoc' is a tool for
16
+ writing many and varied test cases that can be run after changes have
17
+ been made in order to verify that existing behavior has not been
18
+ broken.
19
+
20
+ The 'testasciidoc' 'update' command automates the (re)generation of
21
+ expected test result data. Result data regeneration has to be
22
+ performed after changes to test case source files or after legitimate
23
+ changes to the AsciiDoc output formats -- doing this manually is
24
+ prohibitively tedious.
25
+
26
+
27
+ Running testasciidoc
28
+ --------------------
29
+ The `testasciidoc.py` script and the default `testasciidoc.conf`
30
+ configuration file are located in the AsciiDoc distribution `tests`
31
+ directory.
32
+
33
+ To view the command usage run:
34
+
35
+ ---------------------------------------------------------------------
36
+ $ python tests/testasciidoc.py
37
+ Usage: testasciidoc.py [OPTIONS] COMMAND
38
+
39
+ Run AsciiDoc conformance tests specified in configuration FILE.
40
+
41
+ Commands:
42
+ list List tests
43
+ run [NUMBER] [BACKEND] Execute tests
44
+ update [NUMBER] [BACKEND] Regenerate and update test data
45
+
46
+ Options:
47
+ -f, --conf-file=CONF_FILE
48
+ Use configuration file CONF_FILE (default configuration file is
49
+ testasciidoc.conf in testasciidoc.py directory)
50
+ --force
51
+ Update all test data overwriting existing data
52
+ ---------------------------------------------------------------------
53
+
54
+ To view the list of tests in the default `testasciidoc.conf`
55
+ configuration file run the 'list' command:
56
+
57
+ ---------------------------------------------------------------------
58
+ $ python tests/testasciidoc.py list
59
+ 1: Test cases
60
+ 2: Tables
61
+ 3: Source highlighter
62
+ 4: Example article
63
+ 5: Example book
64
+ 6: Example multi-part book
65
+ 7: !User Guide
66
+ ---------------------------------------------------------------------
67
+
68
+ The '!' prefix signals that a test is currently disabled.
69
+
70
+ Before running the tests you will need to regenerate the expected
71
+ outputs by running the 'update' command:
72
+
73
+ ---------------------------------------------------------------------
74
+ $ python tests/testasciidoc.py update
75
+ WRITING: tests/data/testcases-html4.html
76
+ WRITING: tests/data/testcases-xhtml11.html
77
+ WRITING: tests/data/testcases-docbook.xml
78
+ :
79
+ WRITING: tests/data/book-multi-docbook.xml
80
+ ---------------------------------------------------------------------
81
+
82
+ Now you can run the tests:
83
+
84
+ ---------------------------------------------------------------------
85
+ $ python tests/testasciidoc.py run
86
+ 1: Test cases
87
+ SOURCE: asciidoc: tests/data/testcases.txt
88
+ PASSED: html4: tests/data/testcases-html4.html
89
+ PASSED: xhtml11: tests/data/testcases-xhtml11.html
90
+ PASSED: docbook: tests/data/testcases-docbook.xml
91
+ :
92
+ 6: Example multi-part book
93
+ SOURCE: asciidoc: doc/book-multi.txt
94
+ PASSED: html4: tests/data/book-multi-html4.html
95
+ PASSED: xhtml11: tests/data/book-multi-xhtml11.html
96
+ PASSED: docbook: tests/data/book-multi-docbook.xml
97
+
98
+ TOTAL PASSED: 18
99
+ ---------------------------------------------------------------------
100
+
101
+ [NOTE]
102
+ =====================================================================
103
+ - 'testasciidoc' requires AsciiDoc is located in your environment
104
+ search path, if not you'll need to set the `ASCIIDOC_PY` environment
105
+ variable to point to `asciidoc.py`.
106
+ - If you don't have GNU source-highlight installed you should disable
107
+ the 'Tables' and 'Source highlighter' tests in the
108
+ `tests/testasciidoc.conf` configuration file.
109
+ =====================================================================
110
+
111
+
112
+ testasciidoc commands
113
+ ---------------------
114
+ 'list'::
115
+ List test numbers and titles. A '!' title prefix signals that a
116
+ test is currently disabled.
117
+
118
+ 'run'::
119
+ Read and execute tests from the test configuration file. A test
120
+ specifies AsciiDoc test case source file and command options. The
121
+ test compares generated outputs to expected outputs and any
122
+ differences displayed as a diff. You can run selected tests by
123
+ specifying the test number and/or backend after the `run` command.
124
+ Examples:
125
+
126
+ python tests/testasciidoc.py run
127
+ python tests/testasciidoc.py run 3
128
+ python tests/testasciidoc.py run html4
129
+ python tests/testasciidoc.py run 3 html4
130
+
131
+ 'update'::
132
+ Generates and updates missing and out of date test output data
133
+ files, this eliminates one of the most time consuming aspect of test
134
+ management. Use the `--force` option to force updates.
135
+ Examples:
136
+
137
+ python tests/testasciidoc.py update
138
+ python tests/testasciidoc.py --force update 4
139
+
140
+ NOTE: You can run or update disabled tests by explicitly specifying
141
+ the test number.
142
+
143
+
144
+ Test configuration file
145
+ -----------------------
146
+ The tests configuration file format consists of one or more test specs
147
+ separated by a line of one or more percent characters. Each test spec
148
+ consists of an optional test title and description followed by one or
149
+ more optional directives (a directive starts with a percent
150
+ character). A 'directive' consists begins with a line containing a '%'
151
+ character followed by a directive name followed by zero or more lines
152
+ of directive data.
153
+
154
+ Test spec format
155
+ ~~~~~~~~~~~~~~~~
156
+ ---------------------------------------------------------------------
157
+ Optional test title
158
+ Optional test description...
159
+
160
+ % name
161
+ Optional base output file name. Defaults to base source file name.
162
+
163
+ % source
164
+ AsciiDoc source file name.
165
+
166
+ % backends
167
+ Optional list of backends to be tested(default is all backends).
168
+ % options
169
+ Optional list of command-line option tuples.
170
+
171
+ % attributes
172
+ Optional dictionary of attribute values.
173
+
174
+ ---------------------------------------------------------------------
175
+
176
+ Example test spec:
177
+
178
+ ---------------------------------------------------------------------
179
+ Example book
180
+
181
+ % options
182
+ ['--section-numbers',('--doctype','book')]
183
+
184
+ % attributes
185
+ # Exclude date from document footer.
186
+ {'docdate':None}
187
+
188
+ % source
189
+ ../doc/book.txt
190
+ ---------------------------------------------------------------------
191
+
192
+ TIP: Take a look at the default `tests/testasciidoc.conf`
193
+ configuration file that comes with AsciiDoc.
194
+
195
+ - Tests can be disabled by prefixing the test title with an
196
+ exclamation '!' character.
197
+ - All relative file names are relative to the configuration file
198
+ directory.
199
+ - Multiple tests must by separated by a `%` separator line (one or
200
+ more percent characters).
201
+ - Lines starting with a percent character specify a test 'directive'
202
+ and may be followed by zero or more lines of directive data.
203
+ - Directive data lines cannot start with a percent character.
204
+ - Lines starting with a `#` hash character are ignored.
205
+ - The 'source' directive data is a single line containing the
206
+ AsciiDoc source file name.
207
+ - The 'options' directive data is a Python list of `(name,value)`
208
+ tuples specifying AsciiDoc command-line options. A string item is
209
+ equivalent to a `(name,None)` tuple.
210
+ - The 'attributes' directive data specifies a Python dictionary
211
+ containing AsciiDoc attributes to be passed to AsciiDoc.
212
+
213
+ globals directive
214
+ ~~~~~~~~~~~~~~~~~
215
+ An optional 'globals' directive can precede all test specs, the
216
+ globals directive data is a Python dictionary containing global
217
+ values. Currently the only global is 'datadir', the directory
218
+ containing expected output files (defaults to configuration file
219
+ directory). For example:
220
+
221
+ ---------------------------------------------------------------------
222
+ % globals
223
+ {'datadir': 'data'}
224
+ ---------------------------------------------------------------------
225
+
226
+ Expected output test data files are stored in the 'datadir' and are
227
+ named after the corresponding AsciiDoc input source file. For example
228
+ if the AsciiDoc file name is `article.txt` then the corresponding
229
+ backend output files will be `article-html4.html`,
230
+ `article-xhtml11.html`, `article-docbook.xml` (stored in the 'datadir'
231
+ directory).