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,293 @@
1
+ #####################################################################
2
+ #
3
+ # A-A-P file for making AsciiDoc distribution documents.
4
+ # (you can obtain A-A-P from http://www.a-a-p.org)
5
+ #
6
+ # Stuart Rackham <srackham@gmail.com>
7
+ #####################################################################
8
+
9
+ :execute ../common.aap
10
+
11
+ # Uncomment next line to use dblatex instead of FOP, or alternatively
12
+ # include PDF_PROCESSOR=dblatex on the command-line.
13
+ #PDF_PROCESSOR = dblatex
14
+
15
+ #####################################################################
16
+ # Programs used by this script.
17
+ #####################################################################
18
+
19
+ # If python is not in your executable search path you may have to
20
+ # tweak these locations. Note also that this script is in the distribution
21
+ # ./doc directory and a number of paths are relative.
22
+
23
+ ## Older or alternative rules and actions have been commented out but not
24
+ # deleted.
25
+
26
+ @if OSTYPE == 'mswin':
27
+ ASCIIDOC = python ..\asciidoc.py -a revision=$(VERS)@ -a date="$(DATE)@"
28
+ HHC = "C:\Program Files\HTML Help Workshop\hhc.exe"
29
+ FOP = fop.bat
30
+ @else:
31
+ ASCIIDOC = python ../asciidoc.py -a revision=$(VERS)@ -a date="$(DATE)@"
32
+ @if os.uname()[0][:6] == 'CYGWIN':
33
+ HHC = "c:/Program\ Files/HTML\ Help\ Workshop/hhc.exe"
34
+ :syseval which fop.bat | :assign FOP
35
+ @else:
36
+ HHC =
37
+ :syseval which fop.sh | :assign FOP
38
+
39
+ :syseval which jw | :assign JW # Converts DocBook SGML to PDF.
40
+ :syseval which lynx | :assign LYNX # Converts HTML to text.
41
+ :syseval which xmllint | :assign XMLLINT # Validates XML.
42
+ :syseval which dblatex | :assign DBLATEX # Converts DocBook XML to PDF.
43
+
44
+ ## xsltproc(1) is used instead of xmlto(1).
45
+ #XMLTO = xmlto
46
+ ASPELL = aspell
47
+ XSLTPROC = xsltproc
48
+
49
+ ROOT = asciidoc asciidoc.1
50
+ INFILES = $*(ROOT).txt
51
+ CHUNK_DIR = ./asciidoc.chunked
52
+ HTMLHELP_DIR = ./asciidoc.htmlhelp
53
+ HTMLHELP_FILE = asciidoc
54
+
55
+ OUTFILES = $*(ROOT).html $*(ROOT).css.html $*(ROOT).css-embedded.html \
56
+ asciidoc.pdf asciidoc.1.man a2x.1.man \
57
+ article.html book.html book-multi.html asciidoc.xml asciidoc.1.xml \
58
+ ../BUGS ../CHANGELOG ../README ../INSTALL \
59
+ latex-backend.html \
60
+ ${HTMLHELP_FILE}.chm \
61
+ $CHUNK_DIR/index.html \
62
+ article.pdf \
63
+ source-highlight-filter.pdf \
64
+ music-filter.pdf
65
+
66
+ TEST_FILES = $*(ROOT).css-embedded.html
67
+ article.css-embedded.html book.css-embedded.html \
68
+ article.xml book.xml book-multi.xml asciidoc.xml asciidoc.1.xml \
69
+ asciidoc.1.html a2x.1.xml music-filter.xml
70
+
71
+
72
+ #####################################################################
73
+ # Filetype build rules.
74
+ #####################################################################
75
+
76
+ :rule %.text : %.txt
77
+ # Convert AsciiDoc to HTML then use lynx(1) to convert HTML to text.
78
+ @if _no.OSTYPE != 'posix':
79
+ :print WARNING: non-POSIX environment: skipping $target file generation
80
+ @elif not _no.LYNX:
81
+ :print WARNING: lynx(1) unavailable: skipping $target file generation
82
+ @else:
83
+ opt = -f ../text.conf
84
+ @if source_list[0] == 'asciidoc.1.txt':
85
+ opt += -d manpage
86
+ @else:
87
+ opt += -n
88
+ :sys $ASCIIDOC $opt -b html4 -o - $source | \
89
+ lynx -dump -stdin > $target
90
+
91
+ ## The preceding rule makes a better job of producing plain text.
92
+ #:rule %.text : %.xml
93
+ # :sys $XMLTO txt $source
94
+
95
+ :rule %.css.html : %.txt
96
+ opt =
97
+ @if source_list[0] == 'asciidoc.1.txt':
98
+ opt += -d manpage
99
+ @else:
100
+ opt += -n
101
+ opt += -a toc -a toclevels=2 -a scriptsdir=../javascripts
102
+ :sys $ASCIIDOC $opt -b xhtml11 -a linkcss -a icons -a stylesdir=../stylesheets -o $target $(source[0])
103
+ @if _no.XMLLINT:
104
+ :sys $XMLLINT --nonet --noout --valid $target
105
+ @else:
106
+ :print WARNING: xmllint(1) unavailable: skipping validation
107
+
108
+ :rule %.css-embedded.html : %.txt
109
+ opt =
110
+ @if source_list[0] == 'asciidoc.1.txt':
111
+ opt += -d manpage
112
+ @else:
113
+ opt += -n
114
+ opt += -a toc -a toclevels=2
115
+ :sys $ASCIIDOC -b xhtml11 $opt -o $target $(source[0])
116
+ @if _no.XMLLINT:
117
+ :sys $XMLLINT --nonet --noout --valid $target
118
+ @else:
119
+ :print WARNING: xmllint(1) unavailable: skipping validation
120
+
121
+ :rule %.xml : %.txt
122
+ opt =
123
+ @if source_list[0] in ('asciidoc.1.txt','a2x.1.txt'):
124
+ opt += -d manpage
125
+ @else:
126
+ opt += -n
127
+ ##
128
+ # @if source_list[0] == 'asciidoc.txt':
129
+ # # User Guide is a book.
130
+ # opt += -d book
131
+ :sys $ASCIIDOC $opt -b docbook $(source[0])
132
+ @if _no.XMLLINT:
133
+ # Don't validate against DTD (using --valid option) because of
134
+ # non-standard dblatex <programlisting> 'linenumbering' attribute.
135
+ #:sys $XMLLINT --nonet --noout --valid $target
136
+ :sys $XMLLINT --nonet --noout $target
137
+ @else:
138
+ :print WARNING: xmllint(1) unavailable: skipping validation
139
+
140
+ :rule %.sgml : %.txt
141
+ opt =
142
+ @if source_list[0] in ('asciidoc.1.txt','a2x.1.txt'):
143
+ opt += -d manpage
144
+ :sys $ASCIIDOC $opt -b docbook-sgml $(source[0])
145
+
146
+ :rule %.html: %.xml
147
+ # :sys $XMLTO xhtml-nochunks $source
148
+ :sys $XSLTPROC --nonet --stringparam admon.textlabel 0 --stringparam html.stylesheet ./docbook-xsl.css ../docbook-xsl/xhtml.xsl $source >$target
149
+
150
+ ## Generate plain HTML from DocBook XML using the preceeding rule.
151
+ #:rule %.html : %.txt
152
+ # opt =
153
+ # @if source_list[0] == 'asciidoc.1.txt':
154
+ # opt += -d manpage
155
+ # @else:
156
+ # opt += -n
157
+ # :sys $ASCIIDOC $opt -b xhtml $(source[0])
158
+
159
+ :rule %.man : %.xml
160
+ :sys $XSLTPROC --nonet ../docbook-xsl/manpage.xsl $source
161
+ :sys touch $target # Dummy target.
162
+
163
+ ## Generate manpage from XML using preceeding rule.
164
+ #:rule %.man : %.sgml
165
+ # :sys $JW -b man $(match).sgml
166
+ # :sys touch $target # Dummy target.
167
+
168
+ :rule %.fo: %.xml
169
+ :sys $XSLTPROC --nonet --stringparam admon.textlabel 0 ../docbook-xsl/fo.xsl $source >$target
170
+
171
+ # This kludge forces the User Guide PDF to be generated using dblatex
172
+ # so we include a dblatex example in the distribution.
173
+ @if _no.DBLATEX:
174
+ asciidoc.pdf: asciidoc.xml
175
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
176
+
177
+ # Force the Source Highlighter PDF to be generated using dblatex
178
+ # because dblatex has builtin source code highlighting.
179
+ @if _no.DBLATEX:
180
+ source-highlight-filter.pdf: source-highlight-filter.xml
181
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
182
+
183
+ # Try PDF generators in order of preference.
184
+ @if _no.DBLATEX and _no.get('PDF_PROCESSOR') and _no.PDF_PROCESSOR == 'dblatex':
185
+ :rule %.pdf: %.xml
186
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
187
+ @elif _no.FOP:
188
+ :rule %.pdf: %.fo
189
+ :sys $FOP $source $target
190
+ @elif _no.JW:
191
+ :rule %.pdf: %.sgml
192
+ :sys $JW -b pdf $source
193
+ @else:
194
+ :rule %.pdf:
195
+ :print WARNING: PDF processor unavailable: skipping $target file generation
196
+
197
+ ## jw(1) renders better PDF than xmlto(1) (see preceeding rule).
198
+ #:rule %.pdf : %.xml
199
+ # :sys $XMLTO pdf $source
200
+
201
+
202
+ #####################################################################
203
+ # Explicit file generation (cases that don't fit the rules).
204
+ #####################################################################
205
+
206
+ asciidoc.1.html: asciidoc.1.txt
207
+ :sys $ASCIIDOC -d manpage -b html4 $source
208
+ @if _no.XMLLINT:
209
+ :sys $XMLLINT --nonet --noout --valid --html $target
210
+ @else:
211
+ :print WARNING: xmllint(1) unavailable: skipping validation
212
+
213
+ # User Guide 'chunked' into linked HTML pages.
214
+ $CHUNK_DIR/index.html: asciidoc.xml
215
+ :mkdir {f} $CHUNK_DIR
216
+ :del {f} {q} $CHUNK_DIR/*.html
217
+ :sys $XSLTPROC --nonet --stringparam base.dir $CHUNK_DIR/ --stringparam html.stylesheet ../docbook-xsl.css ../docbook-xsl/chunked.xsl $source
218
+
219
+ # HTML Help formatted User Guide.
220
+ $HTMLHELP_DIR/index.html: asciidoc.xml
221
+ :mkdir {f} $HTMLHELP_DIR
222
+ :del {f} {q} $HTMLHELP_DIR/*.html
223
+ :sys $XSLTPROC --nonet --stringparam admon.textlabel 0 --stringparam base.dir $HTMLHELP_DIR/ --stringparam html.stylesheet ../docbook-xsl.css --stringparam htmlhelp.hhp ${HTMLHELP_FILE}.hhp --stringparam htmlhelp.chm ${HTMLHELP_FILE}.chm ../docbook-xsl/htmlhelp.xsl $source
224
+
225
+ ${HTMLHELP_FILE}.chm: $HTMLHELP_DIR/index.html
226
+ @if _no.HHC:
227
+ :sys {f} "$HHC" ${HTMLHELP_FILE}.hhp
228
+ @else:
229
+ :print WARNING: HTMLHelp compiler unavailable: skipping asciidoc.chm file generation
230
+
231
+ # Book template.
232
+ book.xml: book.txt
233
+ :sys $ASCIIDOC -d book -b docbook $source
234
+ @if _no.XMLLINT:
235
+ :sys $XMLLINT --nonet --noout --valid $target
236
+ @else:
237
+ :print WARNING: xmllint(1) unavailable: skipping validation
238
+
239
+ # Multi-part book template.
240
+ book-multi.xml: book-multi.txt
241
+ :sys $ASCIIDOC -d book -b docbook $source
242
+ @if _no.XMLLINT:
243
+ :sys $XMLLINT --nonet --noout --valid $target
244
+ @else:
245
+ :print WARNING: xmllint(1) unavailable: skipping validation
246
+
247
+ ../BUGS: ../BUGS.text
248
+ # Make BUGS.text and copy to BUGS.
249
+ :copy ../BUGS.text ../BUGS
250
+
251
+ ../CHANGELOG: ../CHANGELOG.text
252
+ # Make CHANGELOG.text and copy to CHANGELOG.
253
+ :copy ../CHANGELOG.text ../CHANGELOG
254
+
255
+ ../README: ../README.text
256
+ # Make README.text and copy to README.
257
+ :copy ../README.text ../README
258
+
259
+ ../INSTALL: ../INSTALL.text
260
+ # Make INSTALL.text and copy to INSTALL.
261
+ :copy ../INSTALL.text ../INSTALL
262
+
263
+ asciimath.html: asciimath.txt
264
+ :sys $ASCIIDOC -a asciimath $source
265
+ # No xmllint(1) checking -- fails on embedded JavaScript.
266
+
267
+ latexmath.html: latexmath.txt
268
+ :sys $ASCIIDOC -a latexmath $source
269
+ # No xmllint(1) checking -- fails on embedded JavaScript.
270
+
271
+
272
+ #####################################################################
273
+ # Build commands.
274
+ #####################################################################
275
+
276
+ all: $OUTFILES
277
+
278
+ clean:
279
+ :del {f} $OUTFILES $TEST_FILES
280
+ :del {f} *.bak # Remove aspell backups.
281
+
282
+ spell: $INFILES ../CHANGELOG.txt ../README.txt ../BUGS.txt ../INSTALL.txt \
283
+ a2x.1.txt
284
+ # Interactively spell check all files.
285
+ @for s in source_list:
286
+ :sys {i} $ASPELL check -p ./asciidoc.dict $s
287
+
288
+ clean_testfiles:
289
+ :del {f} $TEST_FILES
290
+ :del {f} music*.png # Force Lilypond to run.
291
+
292
+ test: clean_testfiles $TEST_FILES
293
+ # Force generation and validation of .html and Docbook (.xml) files.
@@ -0,0 +1,513 @@
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.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 > div.content {
169
+ padding-left: 2.0em;
170
+ }
171
+
172
+ div.attribution {
173
+ text-align: right;
174
+ }
175
+ div.verseblock + div.attribution {
176
+ text-align: left;
177
+ }
178
+
179
+ div.admonitionblock .icon {
180
+ vertical-align: top;
181
+ font-size: 1.1em;
182
+ font-weight: bold;
183
+ text-decoration: underline;
184
+ color: #527bbd;
185
+ padding-right: 0.5em;
186
+ }
187
+ div.admonitionblock td.content {
188
+ padding-left: 0.5em;
189
+ border-left: 2px solid silver;
190
+ }
191
+
192
+ div.exampleblock > div.content {
193
+ border-left: 2px solid silver;
194
+ padding: 0.5em;
195
+ }
196
+
197
+ div.verseblock div.content {
198
+ white-space: pre;
199
+ }
200
+
201
+ div.imageblock div.content { padding-left: 0; }
202
+ div.imageblock img { border: 1px solid silver; }
203
+ span.image img { border-style: none; }
204
+
205
+ dl {
206
+ margin-top: 0.8em;
207
+ margin-bottom: 0.8em;
208
+ }
209
+ dt {
210
+ margin-top: 0.5em;
211
+ margin-bottom: 0;
212
+ font-style: normal;
213
+ }
214
+ dd > *:first-child {
215
+ margin-top: 0.1em;
216
+ }
217
+
218
+ ul, ol {
219
+ list-style-position: outside;
220
+ }
221
+ div.olist > ol {
222
+ list-style-type: decimal;
223
+ }
224
+ div.olist2 > ol {
225
+ list-style-type: lower-alpha;
226
+ }
227
+
228
+ div.tableblock > table {
229
+ border: 3px solid #527bbd;
230
+ }
231
+ thead {
232
+ font-family: sans-serif;
233
+ font-weight: bold;
234
+ }
235
+ tfoot {
236
+ font-weight: bold;
237
+ }
238
+
239
+ div.hlist {
240
+ margin-top: 0.8em;
241
+ margin-bottom: 0.8em;
242
+ }
243
+ div.hlist td {
244
+ padding-bottom: 15px;
245
+ }
246
+ td.hlist1 {
247
+ vertical-align: top;
248
+ font-style: normal;
249
+ padding-right: 0.8em;
250
+ }
251
+ td.hlist2 {
252
+ vertical-align: top;
253
+ }
254
+
255
+ @media print {
256
+ div#footer-badges { display: none; }
257
+ }
258
+
259
+ div#toctitle {
260
+ color: #527bbd;
261
+ font-family: sans-serif;
262
+ font-size: 1.1em;
263
+ font-weight: bold;
264
+ margin-top: 1.0em;
265
+ margin-bottom: 0.1em;
266
+ }
267
+
268
+ div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
269
+ margin-top: 0;
270
+ margin-bottom: 0;
271
+ }
272
+ div.toclevel2 {
273
+ margin-left: 2em;
274
+ font-size: 0.9em;
275
+ }
276
+ div.toclevel3 {
277
+ margin-left: 4em;
278
+ font-size: 0.9em;
279
+ }
280
+ div.toclevel4 {
281
+ margin-left: 6em;
282
+ font-size: 0.9em;
283
+ }
284
+ /* Workarounds for IE6's broken and incomplete CSS2. */
285
+
286
+ div.sidebar-content {
287
+ background: #ffffee;
288
+ border: 1px solid silver;
289
+ padding: 0.5em;
290
+ }
291
+ div.sidebar-title, div.image-title {
292
+ color: #527bbd;
293
+ font-family: sans-serif;
294
+ font-weight: bold;
295
+ margin-top: 0.0em;
296
+ margin-bottom: 0.5em;
297
+ }
298
+
299
+ div.listingblock div.content {
300
+ border: 1px solid silver;
301
+ background: #f4f4f4;
302
+ padding: 0.5em;
303
+ }
304
+
305
+ div.quoteblock-content {
306
+ padding-left: 2.0em;
307
+ }
308
+
309
+ div.exampleblock-content {
310
+ border-left: 2px solid silver;
311
+ padding-left: 0.5em;
312
+ }
313
+
314
+ /* IE6 sets dynamically generated links as visited. */
315
+ 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
+ </style>
325
+ <title>Music Filter</title>
326
+ </head>
327
+ <body>
328
+ <div id="header">
329
+ <h1>Music Filter</h1>
330
+ </div>
331
+ <div id="preamble">
332
+ <div class="sectionbody">
333
+ <div class="para"><p>The <em>AsciiDoc</em> distribution includes a Music Block filter that
334
+ translates music in <a href="http://lilypond.org/">LilyPond</a> or
335
+ <a href="http://abcnotation.org.uk/">ABC</a> notation to standard classical
336
+ notation in the form of a trimmed PNG image which is automatically
337
+ 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
339
+ <em>AsciiDoc</em> to convert LilyPond or ABC music files to PNG images.
340
+ Execute the following command to see how to use it:</p></div>
341
+ <div class="literalblock">
342
+ <div class="content">
343
+ <pre><tt>$ ./filters/music2png.py --help</tt></pre>
344
+ </div></div>
345
+ <div class="para"><p>The Music Filter can be used as a model for filters that convert a
346
+ block of text into a file that is linked or embedded into the <em>AsciiDoc</em>
347
+ output document.</p></div>
348
+ <div class="exampleblock" id="X1">
349
+ <div class="title">Example 1: Music Block containing ABC notation</div>
350
+ <div class="exampleblock-content">
351
+ <div class="para"><p>This Music Block:</p></div>
352
+ <div class="listingblock">
353
+ <div class="content">
354
+ <pre><tt> [music,music1.png]
355
+ ---------------------------------------------------------------------
356
+ T:The Butterfly
357
+ R:slip jig
358
+ C:Tommy Potts
359
+ H:Fiddle player Tommy Potts made this tune from two older slip jigs,
360
+ H:one of which is called "Skin the Peelers" in Roche's collection.
361
+ H:This version by Peter Cooper.
362
+ D:Bothy Band: 1975.
363
+ M:9/8
364
+ K:Em
365
+ vB2(E G2)(E F3)|B2(E G2)(E F)ED|vB2(E G2)(E F3)|(B2d) d2(uB A)FD:|
366
+ |:(vB2c) (e2f) g3|(uB2d) (g2e) (dBA)|(B2c) (e2f) g2(ua|b2a) (g2e) (dBA):|
367
+ |:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):|
368
+ ---------------------------------------------------------------------</tt></pre>
369
+ </div></div>
370
+ <div class="para"><p>Renders:</p></div>
371
+ <div class="musicblock">
372
+ <div class="content">
373
+ <img style="border-width: 0;" src="music1.png" alt="music1.png" />
374
+ </div></div>
375
+ </div></div>
376
+ <div class="exampleblock" id="X2">
377
+ <div class="title">Example 2: Music Block containing LilyPond notation</div>
378
+ <div class="exampleblock-content">
379
+ <div class="para"><p>This example contains LilyPond musical markup, it uses the <em>link</em>
380
+ attribute so you can click on the music image to display the source
381
+ notation. The <tt>music2.ly</tt> source file is automatically created and
382
+ retained by the <tt>music2png.py</tt> filter when the <tt>-m</tt> option is used.</p></div>
383
+ <div class="listingblock">
384
+ <div class="content">
385
+ <pre><tt> ["music", "music2.png", "ly", link="music2.ly"]
386
+ ---------------------------------------------------------------------
387
+ \version "2.10.0"
388
+ \paper {
389
+ ragged-right = ##t
390
+ }
391
+ {
392
+ \time 3/4
393
+ \clef bass
394
+ c2 e4 g2. f4 e d c2 r4
395
+ }
396
+ ---------------------------------------------------------------------</tt></pre>
397
+ </div></div>
398
+ <div class="para"><p>Renders:</p></div>
399
+ <div class="musicblock">
400
+ <div class="content">
401
+ <a href="music2.ly">
402
+ <img style="border-width: 0;" src="music2.png" alt="music2.png" />
403
+ </a>
404
+ </div></div>
405
+ </div></div>
406
+ <div class="admonitionblock">
407
+ <table><tr>
408
+ <td class="icon">
409
+ <div class="title">Note</div>
410
+ </td>
411
+ <td class="content">If you get an error processing the above example it may be that
412
+ it is not compatible with your version of LilyPond. Use the LilyPond
413
+ <tt>convert-ly(1)</tt> utility to update the source to the version that you
414
+ are using.</td>
415
+ </tr></table>
416
+ </div>
417
+ </div>
418
+ </div>
419
+ <h2 id="_using_the_filter">Using the Filter</h2>
420
+ <div class="sectionbody">
421
+ <div class="para"><p>Insert a delimited Music Block containing valid ABC notation into your
422
+ <em>AsciiDoc</em> document:</p></div>
423
+ <div class="ilist"><ul>
424
+ <li>
425
+ <p>
426
+ The Music Block delimiter is the word <tt>music</tt> followed by four or
427
+ more tilde characters.
428
+ </p>
429
+ </li>
430
+ <li>
431
+ <p>
432
+ The Music Block attribute list must contain a file name for the PNG
433
+ output image file followed by the input format (either <em>abc</em> for ABC
434
+ or <em>ly</em> for LilyPond). If the format is omitted ABC notation is
435
+ assumed.
436
+ </p>
437
+ </li>
438
+ <li>
439
+ <p>
440
+ The filter invokes <tt>music2png</tt> with the <tt>-m</tt> option so that music
441
+ images will only be regenerated if the block content has changed.
442
+ </p>
443
+ </li>
444
+ <li>
445
+ <p>
446
+ The optional named block attributes <em>link</em>, <em>width</em> and <em>height</em> are
447
+ also available (see <a href="userguide.html#X55">Image macro attributes</a>
448
+ in the <em>AsciiDoc</em> User Guide).
449
+ </p>
450
+ </li>
451
+ </ul></div>
452
+ </div>
453
+ <h2 id="_limitations">Limitations</h2>
454
+ <div class="sectionbody">
455
+ <div class="ilist"><ul>
456
+ <li>
457
+ <p>
458
+ The <tt><tt>asciidoc(1)</tt></tt> output file cannot be <tt>-</tt> (stdout), you must
459
+ output to a named file.
460
+ </p>
461
+ </li>
462
+ <li>
463
+ <p>
464
+ If the music image file is linked to the output document then the
465
+ image file name in the Music Block attribute list should be a
466
+ relative path name relative to the <em>AsciiDoc</em> output file.
467
+ </p>
468
+ </li>
469
+ </ul></div>
470
+ </div>
471
+ <h2 id="_installation">Installation</h2>
472
+ <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>
475
+ <li>
476
+ <p>
477
+ <a href="http://lilypond.org/web/">LilyPond</a> (most Linux distributions include
478
+ this package).
479
+ </p>
480
+ </li>
481
+ <li>
482
+ <p>
483
+ <a href="http://www.imagemagick.org">ImageMagick</a> (most Linux distributions
484
+ include this package).
485
+ </p>
486
+ </li>
487
+ </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>
489
+ <div class="literalblock">
490
+ <div class="content">
491
+ <pre><tt>$ asciidoc -v ./filters/music-filter-test.txt
492
+ $ firefox ./filters/music-filter-test.html &amp;</tt></pre>
493
+ </div></div>
494
+ <div class="para"><p>The filter was developed and tested on Xubuntu Linux using LilyPond
495
+ 2.10.5 and ImageMagick 6.2.4.</p></div>
496
+ <div class="admonitionblock">
497
+ <table><tr>
498
+ <td class="icon">
499
+ <div class="title">Note</div>
500
+ </td>
501
+ <td class="content">The filter does not work with LilyPond 2.2.6 because it did not
502
+ generate the requested output file name correctly (2.6.3 does not have
503
+ a problem).</td>
504
+ </tr></table>
505
+ </div>
506
+ </div>
507
+ <div id="footer">
508
+ <div id="footer-text">
509
+ Last updated 2008-07-02 21:36:40 NZDT
510
+ </div>
511
+ </div>
512
+ </body>
513
+ </html>