mizuho 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. data/LICENSE.txt +20 -0
  2. data/README.markdown +61 -0
  3. data/Rakefile +41 -0
  4. data/asciidoc/BUGS +39 -0
  5. data/asciidoc/BUGS.txt +32 -0
  6. data/asciidoc/CHANGELOG +1796 -0
  7. data/asciidoc/CHANGELOG.txt +1810 -0
  8. data/asciidoc/COPYING +339 -0
  9. data/asciidoc/COPYRIGHT +18 -0
  10. data/asciidoc/INSTALL +76 -0
  11. data/asciidoc/INSTALL.txt +71 -0
  12. data/asciidoc/Makefile.in +161 -0
  13. data/asciidoc/README +46 -0
  14. data/asciidoc/README.txt +36 -0
  15. data/asciidoc/a2x +674 -0
  16. data/asciidoc/asciidoc.conf +455 -0
  17. data/asciidoc/asciidoc.py +4998 -0
  18. data/asciidoc/common.aap +9 -0
  19. data/asciidoc/configure +2840 -0
  20. data/asciidoc/configure.ac +11 -0
  21. data/asciidoc/dblatex/asciidoc-dblatex.sty +20 -0
  22. data/asciidoc/dblatex/asciidoc-dblatex.xsl +32 -0
  23. data/asciidoc/dblatex/dblatex-readme.txt +39 -0
  24. data/asciidoc/doc/a2x.1 +257 -0
  25. data/asciidoc/doc/a2x.1.txt +204 -0
  26. data/asciidoc/doc/article.css-embedded.html +602 -0
  27. data/asciidoc/doc/article.html +46 -0
  28. data/asciidoc/doc/article.pdf +0 -0
  29. data/asciidoc/doc/article.txt +122 -0
  30. data/asciidoc/doc/asciidoc-revhistory.xml +27 -0
  31. data/asciidoc/doc/asciidoc.1 +155 -0
  32. data/asciidoc/doc/asciidoc.1.css-embedded.html +598 -0
  33. data/asciidoc/doc/asciidoc.1.css.html +212 -0
  34. data/asciidoc/doc/asciidoc.1.html +190 -0
  35. data/asciidoc/doc/asciidoc.1.txt +118 -0
  36. data/asciidoc/doc/asciidoc.conf +8 -0
  37. data/asciidoc/doc/asciidoc.css-embedded.html +7853 -0
  38. data/asciidoc/doc/asciidoc.css.html +7416 -0
  39. data/asciidoc/doc/asciidoc.dict +733 -0
  40. data/asciidoc/doc/asciidoc.html +3339 -0
  41. data/asciidoc/doc/asciidoc.txt +4979 -0
  42. data/asciidoc/doc/asciimathml.txt +64 -0
  43. data/asciidoc/doc/book-multi.css-embedded.html +575 -0
  44. data/asciidoc/doc/book-multi.html +55 -0
  45. data/asciidoc/doc/book-multi.txt +155 -0
  46. data/asciidoc/doc/book.css-embedded.html +607 -0
  47. data/asciidoc/doc/book.html +43 -0
  48. data/asciidoc/doc/book.txt +131 -0
  49. data/asciidoc/doc/customers.csv +18 -0
  50. data/asciidoc/doc/docbook-xsl.css +272 -0
  51. data/asciidoc/doc/faq.txt +547 -0
  52. data/asciidoc/doc/latex-backend.html +117 -0
  53. data/asciidoc/doc/latex-backend.txt +191 -0
  54. data/asciidoc/doc/latexmath.txt +244 -0
  55. data/asciidoc/doc/latexmathml.txt +41 -0
  56. data/asciidoc/doc/main.aap +297 -0
  57. data/asciidoc/doc/music-filter.html +566 -0
  58. data/asciidoc/doc/music-filter.pdf +0 -0
  59. data/asciidoc/doc/music-filter.txt +158 -0
  60. data/asciidoc/doc/source-highlight-filter.html +214 -0
  61. data/asciidoc/doc/source-highlight-filter.pdf +0 -0
  62. data/asciidoc/doc/source-highlight-filter.txt +203 -0
  63. data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +43 -0
  64. data/asciidoc/docbook-xsl/chunked.xsl +19 -0
  65. data/asciidoc/docbook-xsl/common.xsl +67 -0
  66. data/asciidoc/docbook-xsl/fo.xsl +149 -0
  67. data/asciidoc/docbook-xsl/htmlhelp.xsl +17 -0
  68. data/asciidoc/docbook-xsl/manpage.xsl +31 -0
  69. data/asciidoc/docbook-xsl/text.xsl +50 -0
  70. data/asciidoc/docbook-xsl/xhtml.xsl +14 -0
  71. data/asciidoc/docbook.conf +721 -0
  72. data/asciidoc/examples/website/ASCIIMathML.js +938 -0
  73. data/asciidoc/examples/website/CHANGELOG.html +4389 -0
  74. data/asciidoc/examples/website/CHANGELOG.txt +1810 -0
  75. data/asciidoc/examples/website/INSTALL.html +161 -0
  76. data/asciidoc/examples/website/INSTALL.txt +71 -0
  77. data/asciidoc/examples/website/LaTeXMathML.js +1223 -0
  78. data/asciidoc/examples/website/README-website.html +118 -0
  79. data/asciidoc/examples/website/README-website.txt +29 -0
  80. data/asciidoc/examples/website/README.html +125 -0
  81. data/asciidoc/examples/website/README.txt +36 -0
  82. data/asciidoc/examples/website/a2x.1.html +419 -0
  83. data/asciidoc/examples/website/a2x.1.txt +204 -0
  84. data/asciidoc/examples/website/asciidoc-docbook-xsl.html +130 -0
  85. data/asciidoc/examples/website/asciidoc-docbook-xsl.txt +43 -0
  86. data/asciidoc/examples/website/asciidoc-graphviz-sample.txt +130 -0
  87. data/asciidoc/examples/website/asciimathml.txt +64 -0
  88. data/asciidoc/examples/website/build-website.sh +25 -0
  89. data/asciidoc/examples/website/customers.csv +18 -0
  90. data/asciidoc/examples/website/downloads.html +257 -0
  91. data/asciidoc/examples/website/downloads.txt +121 -0
  92. data/asciidoc/examples/website/faq.html +673 -0
  93. data/asciidoc/examples/website/faq.txt +547 -0
  94. data/asciidoc/examples/website/index.html +419 -0
  95. data/asciidoc/examples/website/index.txt +245 -0
  96. data/asciidoc/examples/website/latex-backend.html +535 -0
  97. data/asciidoc/examples/website/latex-backend.txt +191 -0
  98. data/asciidoc/examples/website/latexmathml.txt +41 -0
  99. data/asciidoc/examples/website/layout1.conf +161 -0
  100. data/asciidoc/examples/website/layout1.css +65 -0
  101. data/asciidoc/examples/website/layout2.conf +158 -0
  102. data/asciidoc/examples/website/layout2.css +93 -0
  103. data/asciidoc/examples/website/manpage.html +266 -0
  104. data/asciidoc/examples/website/manpage.txt +118 -0
  105. data/asciidoc/examples/website/music-filter.html +242 -0
  106. data/asciidoc/examples/website/music-filter.txt +158 -0
  107. data/asciidoc/examples/website/music1.abc +12 -0
  108. data/asciidoc/examples/website/music1.png +0 -0
  109. data/asciidoc/examples/website/music2.ly +9 -0
  110. data/asciidoc/examples/website/music2.png +0 -0
  111. data/asciidoc/examples/website/newlists.txt +40 -0
  112. data/asciidoc/examples/website/newtables.txt +397 -0
  113. data/asciidoc/examples/website/sample1.png +0 -0
  114. data/asciidoc/examples/website/sample3.png +0 -0
  115. data/asciidoc/examples/website/sample4.png +0 -0
  116. data/asciidoc/examples/website/source-highlight-filter.html +286 -0
  117. data/asciidoc/examples/website/source-highlight-filter.txt +203 -0
  118. data/asciidoc/examples/website/support.html +78 -0
  119. data/asciidoc/examples/website/support.txt +5 -0
  120. data/asciidoc/examples/website/toc.js +69 -0
  121. data/asciidoc/examples/website/userguide.html +7460 -0
  122. data/asciidoc/examples/website/userguide.txt +4979 -0
  123. data/asciidoc/examples/website/version83.txt +37 -0
  124. data/asciidoc/examples/website/version9.html +143 -0
  125. data/asciidoc/examples/website/version9.txt +48 -0
  126. data/asciidoc/examples/website/xhtml11-manpage.css +18 -0
  127. data/asciidoc/examples/website/xhtml11-quirks.css +41 -0
  128. data/asciidoc/examples/website/xhtml11.css +328 -0
  129. data/asciidoc/filters/code/code-filter-readme.txt +37 -0
  130. data/asciidoc/filters/code/code-filter-test.txt +15 -0
  131. data/asciidoc/filters/code/code-filter.conf +8 -0
  132. data/asciidoc/filters/code/code-filter.py +239 -0
  133. data/asciidoc/filters/graphviz/asciidoc-graphviz-sample.txt +130 -0
  134. data/asciidoc/filters/graphviz/graphviz-filter.conf +39 -0
  135. data/asciidoc/filters/graphviz/graphviz2png.py +154 -0
  136. data/asciidoc/filters/music/music-filter-test.txt +40 -0
  137. data/asciidoc/filters/music/music-filter.conf +40 -0
  138. data/asciidoc/filters/music/music2png.py +189 -0
  139. data/asciidoc/filters/source/source-highlight-filter-test.txt +19 -0
  140. data/asciidoc/filters/source/source-highlight-filter.conf +108 -0
  141. data/asciidoc/help.conf +213 -0
  142. data/asciidoc/html4.conf +460 -0
  143. data/asciidoc/images/highlighter.png +0 -0
  144. data/asciidoc/images/icons/README +5 -0
  145. data/asciidoc/images/icons/callouts/1.png +0 -0
  146. data/asciidoc/images/icons/callouts/10.png +0 -0
  147. data/asciidoc/images/icons/callouts/11.png +0 -0
  148. data/asciidoc/images/icons/callouts/12.png +0 -0
  149. data/asciidoc/images/icons/callouts/13.png +0 -0
  150. data/asciidoc/images/icons/callouts/14.png +0 -0
  151. data/asciidoc/images/icons/callouts/15.png +0 -0
  152. data/asciidoc/images/icons/callouts/2.png +0 -0
  153. data/asciidoc/images/icons/callouts/3.png +0 -0
  154. data/asciidoc/images/icons/callouts/4.png +0 -0
  155. data/asciidoc/images/icons/callouts/5.png +0 -0
  156. data/asciidoc/images/icons/callouts/6.png +0 -0
  157. data/asciidoc/images/icons/callouts/7.png +0 -0
  158. data/asciidoc/images/icons/callouts/8.png +0 -0
  159. data/asciidoc/images/icons/callouts/9.png +0 -0
  160. data/asciidoc/images/icons/caution.png +0 -0
  161. data/asciidoc/images/icons/example.png +0 -0
  162. data/asciidoc/images/icons/home.png +0 -0
  163. data/asciidoc/images/icons/important.png +0 -0
  164. data/asciidoc/images/icons/next.png +0 -0
  165. data/asciidoc/images/icons/note.png +0 -0
  166. data/asciidoc/images/icons/prev.png +0 -0
  167. data/asciidoc/images/icons/tip.png +0 -0
  168. data/asciidoc/images/icons/up.png +0 -0
  169. data/asciidoc/images/icons/warning.png +0 -0
  170. data/asciidoc/images/smallnew.png +0 -0
  171. data/asciidoc/images/tiger.png +0 -0
  172. data/asciidoc/install-sh +201 -0
  173. data/asciidoc/javascripts/ASCIIMathML.js +938 -0
  174. data/asciidoc/javascripts/LaTeXMathML.js +1223 -0
  175. data/asciidoc/javascripts/toc.js +69 -0
  176. data/asciidoc/lang-es.conf +15 -0
  177. data/asciidoc/latex.conf +663 -0
  178. data/asciidoc/stylesheets/docbook-xsl.css +272 -0
  179. data/asciidoc/stylesheets/xhtml11-manpage.css +18 -0
  180. data/asciidoc/stylesheets/xhtml11-quirks.css +41 -0
  181. data/asciidoc/stylesheets/xhtml11.css +328 -0
  182. data/asciidoc/text.conf +16 -0
  183. data/asciidoc/vim/ftdetect/asciidoc_filetype.vim +53 -0
  184. data/asciidoc/vim/syntax/asciidoc.vim +165 -0
  185. data/asciidoc/wordpress.conf +48 -0
  186. data/asciidoc/xhtml11-quirks.conf +57 -0
  187. data/asciidoc/xhtml11.conf +645 -0
  188. data/bin/mizuho +47 -0
  189. data/bin/mizuho-asciidoc +4 -0
  190. data/lib/mizuho.rb +10 -0
  191. data/lib/mizuho/chapter.rb +54 -0
  192. data/lib/mizuho/generator.rb +134 -0
  193. data/lib/mizuho/heading.rb +46 -0
  194. data/lib/mizuho/parser.rb +103 -0
  195. data/lib/mizuho/source_highlight.rb +2 -0
  196. data/lib/mizuho/template.rb +50 -0
  197. data/source-highlight/ada.lang +38 -0
  198. data/source-highlight/bib.lang +6 -0
  199. data/source-highlight/bison.lang +3 -0
  200. data/source-highlight/c.lang +41 -0
  201. data/source-highlight/c_comment.lang +27 -0
  202. data/source-highlight/c_string.lang +9 -0
  203. data/source-highlight/caml.lang +16 -0
  204. data/source-highlight/changelog.lang +8 -0
  205. data/source-highlight/clike_vardeclaration.lang +4 -0
  206. data/source-highlight/cpp.lang +15 -0
  207. data/source-highlight/csharp.lang +36 -0
  208. data/source-highlight/css.lang +14 -0
  209. data/source-highlight/css_common.outlang +26 -0
  210. data/source-highlight/darwin/source-highlight +0 -0
  211. data/source-highlight/default.css +51 -0
  212. data/source-highlight/default.lang +8 -0
  213. data/source-highlight/default.style +57 -0
  214. data/source-highlight/desktop.lang +7 -0
  215. data/source-highlight/diff.lang +32 -0
  216. data/source-highlight/docbook.outlang +36 -0
  217. data/source-highlight/esc.outlang +46 -0
  218. data/source-highlight/esc.style +35 -0
  219. data/source-highlight/extreme_comment.lang +5 -0
  220. data/source-highlight/extreme_comment2.lang +5 -0
  221. data/source-highlight/extreme_comment3.lang +15 -0
  222. data/source-highlight/fixed-fortran.lang +5 -0
  223. data/source-highlight/flex.lang +37 -0
  224. data/source-highlight/fortran.lang +57 -0
  225. data/source-highlight/function.lang +2 -0
  226. data/source-highlight/glsl.lang +86 -0
  227. data/source-highlight/haxe.lang +7 -0
  228. data/source-highlight/html.lang +7 -0
  229. data/source-highlight/html.outlang +25 -0
  230. data/source-highlight/html_common.outlang +35 -0
  231. data/source-highlight/html_notfixed.outlang +22 -0
  232. data/source-highlight/html_ref.outlang +6 -0
  233. data/source-highlight/htmlcss.outlang +28 -0
  234. data/source-highlight/htmltable.outlang +14 -0
  235. data/source-highlight/htmltablelinenum.outlang +26 -0
  236. data/source-highlight/java.lang +26 -0
  237. data/source-highlight/javadoc.outlang +24 -0
  238. data/source-highlight/javascript.lang +27 -0
  239. data/source-highlight/key_string.lang +4 -0
  240. data/source-highlight/lang.map +108 -0
  241. data/source-highlight/langdef.lang +21 -0
  242. data/source-highlight/latex.lang +52 -0
  243. data/source-highlight/latex.outlang +59 -0
  244. data/source-highlight/latexcolor.outlang +44 -0
  245. data/source-highlight/ldap.lang +10 -0
  246. data/source-highlight/log.lang +53 -0
  247. data/source-highlight/logtalk.lang +85 -0
  248. data/source-highlight/lsm.lang +7 -0
  249. data/source-highlight/lua.lang +27 -0
  250. data/source-highlight/m4.lang +27 -0
  251. data/source-highlight/makefile.lang +42 -0
  252. data/source-highlight/nohilite.lang +2 -0
  253. data/source-highlight/number.lang +3 -0
  254. data/source-highlight/outlang.lang +16 -0
  255. data/source-highlight/outlang.map +12 -0
  256. data/source-highlight/pascal.lang +20 -0
  257. data/source-highlight/perl.lang +134 -0
  258. data/source-highlight/php.lang +25 -0
  259. data/source-highlight/postscript.lang +42 -0
  260. data/source-highlight/prolog.lang +37 -0
  261. data/source-highlight/properties.lang +7 -0
  262. data/source-highlight/python.lang +26 -0
  263. data/source-highlight/ruby.lang +32 -0
  264. data/source-highlight/scala.lang +31 -0
  265. data/source-highlight/script_comment.lang +3 -0
  266. data/source-highlight/sh.lang +38 -0
  267. data/source-highlight/slang.lang +25 -0
  268. data/source-highlight/sml.lang +5 -0
  269. data/source-highlight/source-highlight +24 -0
  270. data/source-highlight/spec.lang +12 -0
  271. data/source-highlight/sql.lang +46 -0
  272. data/source-highlight/style.defaults +15 -0
  273. data/source-highlight/style.lang +16 -0
  274. data/source-highlight/style2.style +10 -0
  275. data/source-highlight/style3.style +10 -0
  276. data/source-highlight/symbols.lang +2 -0
  277. data/source-highlight/tcl.lang +35 -0
  278. data/source-highlight/texinfo.outlang +34 -0
  279. data/source-highlight/texinfo.style +20 -0
  280. data/source-highlight/url.lang +3 -0
  281. data/source-highlight/xhtml.outlang +25 -0
  282. data/source-highlight/xhtml_common.outlang +8 -0
  283. data/source-highlight/xhtml_notfixed.outlang +16 -0
  284. data/source-highlight/xhtmlcss.outlang +19 -0
  285. data/source-highlight/xhtmltable.outlang +7 -0
  286. data/source-highlight/xml.lang +17 -0
  287. data/source-highlight/xorg.lang +10 -0
  288. data/templates/asciidoc.css +358 -0
  289. data/templates/asciidoc.html.erb +86 -0
  290. data/templates/manualsonrails.css +165 -0
  291. data/templates/manualsonrails.html.erb +97 -0
  292. data/test/generator_spec.rb +60 -0
  293. data/test/parser_spec.rb +239 -0
  294. data/test/spec_helper.rb +51 -0
  295. metadata +358 -0
@@ -0,0 +1,41 @@
1
+ LaTeXMathML Formulae
2
+ ====================
3
+
4
+ http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML]
5
+ capability has been added to AsciiDoc for users who are more familar
6
+ with or prefer LaTeX math formulas to the
7
+ http://www.methods.co.nz/asciidoc/asciimathml.html[ASCIIMathML]
8
+ notation.
9
+
10
+ 'LaTeXMathML' is a derivative of
11
+ http://www.methods.co.nz/asciidoc/asciimathml.html[ASCIIMathML] -- in
12
+ terms of usage the only difference it that you use the `latexmath`
13
+ attribute instead of the `asciimath` attribute.
14
+
15
+ 'LaTeXMathML' processes LaTeX math formulas not arbitrary LaTeX (as
16
+ `dblatex(1)` does). See the
17
+ http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML]
18
+ website for details.
19
+
20
+ Here's the link:latexmath.txt[AsciiDoc source] that generated this
21
+ page.
22
+
23
+ Some example 'LaTeXMathML' formulas:
24
+
25
+ - latexmath:[$R_x = 10.0 \times \sin(R_\phi)$]
26
+
27
+ - [,,2]##latexmath:[$\sum_{n=1}^\infty \frac{1}{2^n}$]##
28
+
29
+ - latexmath:[$\lim_{x\to\infty} f(x) = k \choose r + \frac ab
30
+ \sum_{n=1}^\infty a_n + \displaystyle{ \left\{ \frac{1}{13}
31
+ \sum_{n=1}^\infty b_n \right\} }$]
32
+
33
+ - latexmath:[$\$\alpha + \$\beta = \$(\alpha + \beta)$]
34
+
35
+ - latexmath:[$\begin{eqnarray} x & = & \frac{-7 \pm
36
+ \sqrt{49 - 24}}{6} \\ & = & -2 \textrm{ or } -\frac13.
37
+ \end{eqnarray}$]
38
+
39
+ - latexmath:[$\displaystyle{ V_i = C_0 - C_3
40
+ \frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }$]
41
+
@@ -0,0 +1,297 @@
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
+ latexmath.pdf \
64
+ source-highlight-filter.pdf \
65
+ music-filter.pdf
66
+
67
+ TEST_FILES = $*(ROOT).css-embedded.html
68
+ article.css-embedded.html book.css-embedded.html \
69
+ article.xml book.xml book-multi.xml asciidoc.xml asciidoc.1.xml \
70
+ asciidoc.1.html a2x.1.xml music-filter.xml \
71
+ ../examples/oldtables.xml ../examples/oldtables.html
72
+
73
+
74
+ #####################################################################
75
+ # Filetype build rules.
76
+ #####################################################################
77
+
78
+ :rule %.text : %.txt
79
+ # Convert AsciiDoc to HTML then use lynx(1) to convert HTML to text.
80
+ @if _no.OSTYPE != 'posix':
81
+ :print WARNING: non-POSIX environment: skipping $target file generation
82
+ @elif not _no.LYNX:
83
+ :print WARNING: lynx(1) unavailable: skipping $target file generation
84
+ @else:
85
+ opt = -f ../text.conf
86
+ @if source_list[0] == 'asciidoc.1.txt':
87
+ opt += -d manpage
88
+ @else:
89
+ opt += -n
90
+ :sys $ASCIIDOC $opt -b html4 -o - $source | \
91
+ lynx -dump -stdin > $target
92
+
93
+ ## The preceding rule makes a better job of producing plain text.
94
+ #:rule %.text : %.xml
95
+ # :sys $XMLTO txt $source
96
+
97
+ :rule %.css.html : %.txt
98
+ opt =
99
+ @if source_list[0] == 'asciidoc.1.txt':
100
+ opt += -d manpage
101
+ @else:
102
+ opt += -n
103
+ opt += -a toc -a toclevels=2 -a scriptsdir=../javascripts
104
+ :sys $ASCIIDOC $opt -b xhtml11 -a linkcss -a icons -a stylesdir=../stylesheets -o $target $(source[0])
105
+ @if _no.XMLLINT:
106
+ :sys $XMLLINT --nonet --noout --valid $target
107
+ @else:
108
+ :print WARNING: xmllint(1) unavailable: skipping validation
109
+
110
+ :rule %.css-embedded.html : %.txt
111
+ opt =
112
+ @if source_list[0] == 'asciidoc.1.txt':
113
+ opt += -d manpage
114
+ @else:
115
+ opt += -n
116
+ opt += -a toc -a toclevels=2
117
+ :sys $ASCIIDOC -b xhtml11 $opt -o $target $(source[0])
118
+ @if _no.XMLLINT:
119
+ :sys $XMLLINT --nonet --noout --valid $target
120
+ @else:
121
+ :print WARNING: xmllint(1) unavailable: skipping validation
122
+
123
+ :rule %.xml : %.txt
124
+ opt =
125
+ @if source_list[0] in ('asciidoc.1.txt','a2x.1.txt'):
126
+ opt += -d manpage
127
+ @else:
128
+ opt += -n
129
+ ##
130
+ # @if source_list[0] == 'asciidoc.txt':
131
+ # # User Guide is a book.
132
+ # opt += -d book
133
+ :sys $ASCIIDOC $opt -b docbook $(source[0])
134
+ @if _no.XMLLINT:
135
+ # Don't validate against DTD (using --valid option) because of
136
+ # non-standard dblatex <programlisting> 'linenumbering' attribute.
137
+ #:sys $XMLLINT --nonet --noout --valid $target
138
+ :sys $XMLLINT --nonet --noout $target
139
+ @else:
140
+ :print WARNING: xmllint(1) unavailable: skipping validation
141
+
142
+ :rule %.sgml : %.txt
143
+ opt =
144
+ @if source_list[0] in ('asciidoc.1.txt','a2x.1.txt'):
145
+ opt += -d manpage
146
+ :sys $ASCIIDOC $opt -b docbook-sgml $(source[0])
147
+
148
+ :rule %.html: %.xml
149
+ # :sys $XMLTO xhtml-nochunks $source
150
+ :sys $XSLTPROC --nonet --stringparam admon.textlabel 0 --stringparam html.stylesheet ./docbook-xsl.css ../docbook-xsl/xhtml.xsl $source >$target
151
+
152
+ ## Generate plain HTML from DocBook XML using the preceeding rule.
153
+ #:rule %.html : %.txt
154
+ # opt =
155
+ # @if source_list[0] == 'asciidoc.1.txt':
156
+ # opt += -d manpage
157
+ # @else:
158
+ # opt += -n
159
+ # :sys $ASCIIDOC $opt -b xhtml $(source[0])
160
+
161
+ :rule %.man : %.xml
162
+ :sys $XSLTPROC --nonet ../docbook-xsl/manpage.xsl $source
163
+ :sys touch $target # Dummy target.
164
+
165
+ ## Generate manpage from XML using preceeding rule.
166
+ #:rule %.man : %.sgml
167
+ # :sys $JW -b man $(match).sgml
168
+ # :sys touch $target # Dummy target.
169
+
170
+ :rule %.fo: %.xml
171
+ :sys $XSLTPROC --nonet --stringparam admon.textlabel 0 ../docbook-xsl/fo.xsl $source >$target
172
+
173
+ # This kludge forces the User Guide and LaTeX Math PDFs to be generated using
174
+ # dblatex so we include a dblatex example in the distribution.
175
+ @if _no.DBLATEX:
176
+ asciidoc.pdf: asciidoc.xml
177
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
178
+ latexmath.pdf: latexmath.xml
179
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
180
+
181
+ # Force the Source Highlighter PDF to be generated using dblatex
182
+ # because dblatex has builtin source code highlighting.
183
+ @if _no.DBLATEX:
184
+ source-highlight-filter.pdf: source-highlight-filter.xml
185
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
186
+
187
+ # Try PDF generators in order of preference.
188
+ @if _no.DBLATEX and _no.get('PDF_PROCESSOR') and _no.PDF_PROCESSOR == 'dblatex':
189
+ :rule %.pdf: %.xml
190
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
191
+ @elif _no.FOP:
192
+ :rule %.pdf: %.fo
193
+ :sys $FOP $source $target
194
+ @elif _no.JW:
195
+ :rule %.pdf: %.sgml
196
+ :sys $JW -b pdf $source
197
+ @else:
198
+ :rule %.pdf:
199
+ :print WARNING: PDF processor unavailable: skipping $target file generation
200
+
201
+ ## jw(1) renders better PDF than xmlto(1) (see preceeding rule).
202
+ #:rule %.pdf : %.xml
203
+ # :sys $XMLTO pdf $source
204
+
205
+
206
+ #####################################################################
207
+ # Explicit file generation (cases that don't fit the rules).
208
+ #####################################################################
209
+
210
+ asciidoc.1.html: asciidoc.1.txt
211
+ :sys $ASCIIDOC -d manpage -b html4 $source
212
+ @if _no.XMLLINT:
213
+ :sys $XMLLINT --nonet --noout --valid --html $target
214
+ @else:
215
+ :print WARNING: xmllint(1) unavailable: skipping validation
216
+
217
+ # User Guide 'chunked' into linked HTML pages.
218
+ $CHUNK_DIR/index.html: asciidoc.xml
219
+ :mkdir {f} $CHUNK_DIR
220
+ :del {f} {q} $CHUNK_DIR/*.html
221
+ :sys $XSLTPROC --nonet --stringparam base.dir $CHUNK_DIR/ --stringparam html.stylesheet ../docbook-xsl.css ../docbook-xsl/chunked.xsl $source
222
+
223
+ # HTML Help formatted User Guide.
224
+ $HTMLHELP_DIR/index.html: asciidoc.xml
225
+ :mkdir {f} $HTMLHELP_DIR
226
+ :del {f} {q} $HTMLHELP_DIR/*.html
227
+ :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
228
+
229
+ ${HTMLHELP_FILE}.chm: $HTMLHELP_DIR/index.html
230
+ @if _no.HHC:
231
+ :sys {f} "$HHC" ${HTMLHELP_FILE}.hhp
232
+ @else:
233
+ :print WARNING: HTMLHelp compiler unavailable: skipping asciidoc.chm file generation
234
+
235
+ # Book template.
236
+ book.xml: book.txt
237
+ :sys $ASCIIDOC -d book -b docbook $source
238
+ @if _no.XMLLINT:
239
+ :sys $XMLLINT --nonet --noout --valid $target
240
+ @else:
241
+ :print WARNING: xmllint(1) unavailable: skipping validation
242
+
243
+ # Multi-part book template.
244
+ book-multi.xml: book-multi.txt
245
+ :sys $ASCIIDOC -d book -b docbook $source
246
+ @if _no.XMLLINT:
247
+ :sys $XMLLINT --nonet --noout --valid $target
248
+ @else:
249
+ :print WARNING: xmllint(1) unavailable: skipping validation
250
+
251
+ ../BUGS: ../BUGS.text
252
+ # Make BUGS.text and copy to BUGS.
253
+ :copy ../BUGS.text ../BUGS
254
+
255
+ ../CHANGELOG: ../CHANGELOG.text
256
+ # Make CHANGELOG.text and copy to CHANGELOG.
257
+ :copy ../CHANGELOG.text ../CHANGELOG
258
+
259
+ ../README: ../README.text
260
+ # Make README.text and copy to README.
261
+ :copy ../README.text ../README
262
+
263
+ ../INSTALL: ../INSTALL.text
264
+ # Make INSTALL.text and copy to INSTALL.
265
+ :copy ../INSTALL.text ../INSTALL
266
+
267
+ asciimathml.html: asciimathml.txt
268
+ :sys $ASCIIDOC -a asciimath $source
269
+ # No xmllint(1) checking -- fails on embedded JavaScript.
270
+
271
+ latexmathml.html: latexmathml.txt
272
+ :sys $ASCIIDOC -a latexmath $source
273
+ # No xmllint(1) checking -- fails on embedded JavaScript.
274
+
275
+
276
+ #####################################################################
277
+ # Build commands.
278
+ #####################################################################
279
+
280
+ all: $OUTFILES
281
+
282
+ clean:
283
+ :del {f} $OUTFILES $TEST_FILES
284
+ :del {f} *.bak # Remove aspell backups.
285
+
286
+ spell: $INFILES ../CHANGELOG.txt ../README.txt ../BUGS.txt ../INSTALL.txt \
287
+ a2x.1.txt
288
+ # Interactively spell check all files.
289
+ @for s in source_list:
290
+ :sys {i} $ASPELL check -p ./asciidoc.dict $s
291
+
292
+ clean_testfiles:
293
+ :del {f} $TEST_FILES
294
+ :del {f} music*.png # Force Lilypond to run.
295
+
296
+ test: clean_testfiles $TEST_FILES
297
+ # Force generation and validation of .html and Docbook (.xml) files.
@@ -0,0 +1,566 @@
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.3.1" />
7
+ <title>Music Filter</title>
8
+ <style type="text/css">
9
+ /* Debug borders */
10
+ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
11
+ /*
12
+ border: 1px solid red;
13
+ */
14
+ }
15
+
16
+ body {
17
+ margin: 1em 5% 1em 5%;
18
+ }
19
+
20
+ a {
21
+ color: blue;
22
+ text-decoration: underline;
23
+ }
24
+ a:visited {
25
+ color: fuchsia;
26
+ }
27
+
28
+ em {
29
+ font-style: italic;
30
+ color: navy;
31
+ }
32
+
33
+ strong {
34
+ font-weight: bold;
35
+ color: #083194;
36
+ }
37
+
38
+ tt {
39
+ color: navy;
40
+ }
41
+
42
+ h1, h2, h3, h4, h5, h6 {
43
+ color: #527bbd;
44
+ font-family: sans-serif;
45
+ margin-top: 1.2em;
46
+ margin-bottom: 0.5em;
47
+ line-height: 1.3;
48
+ }
49
+
50
+ h1, h2, h3 {
51
+ border-bottom: 2px solid silver;
52
+ }
53
+ h2 {
54
+ padding-top: 0.5em;
55
+ }
56
+ h3 {
57
+ float: left;
58
+ }
59
+ h3 + * {
60
+ clear: left;
61
+ }
62
+
63
+ div.sectionbody {
64
+ font-family: serif;
65
+ margin-left: 0;
66
+ }
67
+
68
+ hr {
69
+ border: 1px solid silver;
70
+ }
71
+
72
+ p {
73
+ margin-top: 0.5em;
74
+ margin-bottom: 0.5em;
75
+ }
76
+
77
+ ul, ol, li > p {
78
+ margin-top: 0;
79
+ }
80
+
81
+ pre {
82
+ padding: 0;
83
+ margin: 0;
84
+ }
85
+
86
+ span#author {
87
+ color: #527bbd;
88
+ font-family: sans-serif;
89
+ font-weight: bold;
90
+ font-size: 1.1em;
91
+ }
92
+ span#email {
93
+ }
94
+ span#revision {
95
+ font-family: sans-serif;
96
+ }
97
+
98
+ div#footer {
99
+ font-family: sans-serif;
100
+ font-size: small;
101
+ border-top: 2px solid silver;
102
+ padding-top: 0.5em;
103
+ margin-top: 4.0em;
104
+ }
105
+ div#footer-text {
106
+ float: left;
107
+ padding-bottom: 0.5em;
108
+ }
109
+ div#footer-badges {
110
+ float: right;
111
+ padding-bottom: 0.5em;
112
+ }
113
+
114
+ div#preamble,
115
+ div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
116
+ div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
117
+ div.admonitionblock {
118
+ margin-right: 10%;
119
+ margin-top: 1.5em;
120
+ margin-bottom: 1.5em;
121
+ }
122
+ div.admonitionblock {
123
+ margin-top: 2.5em;
124
+ margin-bottom: 2.5em;
125
+ }
126
+
127
+ div.content { /* Block element content. */
128
+ padding: 0;
129
+ }
130
+
131
+ /* Block element titles. */
132
+ div.title, caption.title {
133
+ color: #527bbd;
134
+ font-family: sans-serif;
135
+ font-weight: bold;
136
+ text-align: left;
137
+ margin-top: 1.0em;
138
+ margin-bottom: 0.5em;
139
+ }
140
+ div.title + * {
141
+ margin-top: 0;
142
+ }
143
+
144
+ td div.title:first-child {
145
+ margin-top: 0.0em;
146
+ }
147
+ div.content div.title:first-child {
148
+ margin-top: 0.0em;
149
+ }
150
+ div.content + div.title {
151
+ margin-top: 0.0em;
152
+ }
153
+
154
+ div.sidebarblock > div.content {
155
+ background: #ffffee;
156
+ border: 1px solid silver;
157
+ padding: 0.5em;
158
+ }
159
+
160
+ div.listingblock {
161
+ margin-right: 0%;
162
+ }
163
+ div.listingblock > div.content {
164
+ border: 1px solid silver;
165
+ background: #f4f4f4;
166
+ padding: 0.5em;
167
+ }
168
+
169
+ div.quoteblock {
170
+ padding-left: 2.0em;
171
+ }
172
+ div.quoteblock > div.attribution {
173
+ padding-top: 0.5em;
174
+ text-align: right;
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. */
188
+ div.verseblock + div.attribution {
189
+ text-align: left;
190
+ }
191
+
192
+ div.admonitionblock .icon {
193
+ vertical-align: top;
194
+ font-size: 1.1em;
195
+ font-weight: bold;
196
+ text-decoration: underline;
197
+ color: #527bbd;
198
+ padding-right: 0.5em;
199
+ }
200
+ div.admonitionblock td.content {
201
+ padding-left: 0.5em;
202
+ border-left: 2px solid silver;
203
+ }
204
+
205
+ div.exampleblock > div.content {
206
+ border-left: 2px solid silver;
207
+ padding: 0.5em;
208
+ }
209
+
210
+ div.imageblock div.content { padding-left: 0; }
211
+ div.imageblock img { border: 1px solid silver; }
212
+ span.image img { border-style: none; }
213
+
214
+ dl {
215
+ margin-top: 0.8em;
216
+ margin-bottom: 0.8em;
217
+ }
218
+ dt {
219
+ margin-top: 0.5em;
220
+ margin-bottom: 0;
221
+ font-style: normal;
222
+ color: navy;
223
+ }
224
+ dd > *:first-child {
225
+ margin-top: 0.1em;
226
+ }
227
+
228
+ ul, ol {
229
+ list-style-position: outside;
230
+ }
231
+ ol.arabic {
232
+ list-style-type: decimal;
233
+ }
234
+ ol.loweralpha {
235
+ list-style-type: lower-alpha;
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
+ }
253
+
254
+ div.tableblock > table {
255
+ border: 3px solid #527bbd;
256
+ }
257
+ thead {
258
+ font-family: sans-serif;
259
+ font-weight: bold;
260
+ }
261
+ tfoot {
262
+ font-weight: bold;
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
+
283
+
284
+ div.hdlist {
285
+ margin-top: 0.8em;
286
+ margin-bottom: 0.8em;
287
+ }
288
+ div.hdlist tr {
289
+ padding-bottom: 15px;
290
+ }
291
+ dt.hdlist1.strong, td.hdlist1.strong {
292
+ font-weight: bold;
293
+ }
294
+ td.hdlist1 {
295
+ vertical-align: top;
296
+ font-style: normal;
297
+ padding-right: 0.8em;
298
+ color: navy;
299
+ }
300
+ td.hdlist2 {
301
+ vertical-align: top;
302
+ }
303
+ div.hdlist.compact tr {
304
+ margin: 0;
305
+ padding-bottom: 0;
306
+ }
307
+
308
+ @media print {
309
+ div#footer-badges { display: none; }
310
+ }
311
+
312
+ div#toctitle {
313
+ color: #527bbd;
314
+ font-family: sans-serif;
315
+ font-size: 1.1em;
316
+ font-weight: bold;
317
+ margin-top: 1.0em;
318
+ margin-bottom: 0.1em;
319
+ }
320
+
321
+ div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
322
+ margin-top: 0;
323
+ margin-bottom: 0;
324
+ }
325
+ div.toclevel2 {
326
+ margin-left: 2em;
327
+ font-size: 0.9em;
328
+ }
329
+ div.toclevel3 {
330
+ margin-left: 4em;
331
+ font-size: 0.9em;
332
+ }
333
+ div.toclevel4 {
334
+ margin-left: 6em;
335
+ font-size: 0.9em;
336
+ }
337
+ /* Workarounds for IE6's broken and incomplete CSS2. */
338
+
339
+ div.sidebar-content {
340
+ background: #ffffee;
341
+ border: 1px solid silver;
342
+ padding: 0.5em;
343
+ }
344
+ div.sidebar-title, div.image-title {
345
+ color: #527bbd;
346
+ font-family: sans-serif;
347
+ font-weight: bold;
348
+ margin-top: 0.0em;
349
+ margin-bottom: 0.5em;
350
+ }
351
+
352
+ div.listingblock div.content {
353
+ border: 1px solid silver;
354
+ background: #f4f4f4;
355
+ padding: 0.5em;
356
+ }
357
+
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;
369
+ }
370
+
371
+ div.exampleblock-content {
372
+ border-left: 2px solid silver;
373
+ padding-left: 0.5em;
374
+ }
375
+
376
+ /* IE6 sets dynamically generated links as visited. */
377
+ div#toc a:visited { color: blue; }
378
+ </style>
379
+ </head>
380
+ <body>
381
+ <div id="header">
382
+ <h1>Music Filter</h1>
383
+ </div>
384
+ <div id="preamble">
385
+ <div class="sectionbody">
386
+ <div class="paragraph"><p>The <em>AsciiDoc</em> distribution includes a Music Block filter that
387
+ translates music in <a href="http://lilypond.org/">LilyPond</a> or
388
+ <a href="http://abcnotation.org.uk/">ABC</a> notation to standard classical
389
+ notation in the form of a trimmed PNG image which is automatically
390
+ inserted into the <em>AsciiDoc</em> output document (see the <a href="#X1">examples below</a>).</p></div>
391
+ <div class="paragraph"><p>Actually the filter (<tt>./filters/music2png.py</tt>) can be used outside
392
+ <em>AsciiDoc</em> to convert LilyPond or ABC music files to PNG images.
393
+ Execute the following command to see how to use it:</p></div>
394
+ <div class="literalblock">
395
+ <div class="content">
396
+ <pre><tt>$ ./filters/music2png.py --help</tt></pre>
397
+ </div></div>
398
+ <div class="paragraph"><p>The Music Filter can be used as a model for filters that convert a
399
+ block of text into a file that is linked or embedded into the <em>AsciiDoc</em>
400
+ output document.</p></div>
401
+ <div class="exampleblock" id="X1">
402
+ <div class="title">Example 1: Music Block containing ABC notation</div>
403
+ <div class="exampleblock-content">
404
+ <div class="paragraph"><p>This Music Block:</p></div>
405
+ <div class="listingblock">
406
+ <div class="content">
407
+ <pre><tt> ["music","music1.png",scaledwidth="100%"]
408
+ ---------------------------------------------------------------------
409
+ T:The Butterfly
410
+ R:slip jig
411
+ C:Tommy Potts
412
+ H:Fiddle player Tommy Potts made this tune from two older slip jigs,
413
+ H:one of which is called "Skin the Peelers" in Roche's collection.
414
+ H:This version by Peter Cooper.
415
+ D:Bothy Band: 1975.
416
+ M:9/8
417
+ K:Em
418
+ vB2(E G2)(E F3)|B2(E G2)(E F)ED|vB2(E G2)(E F3)|(B2d) d2(uB A)FD:|
419
+ |:(vB2c) (e2f) g3|(uB2d) (g2e) (dBA)|(B2c) (e2f) g2(ua|b2a) (g2e) (dBA):|
420
+ |:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):|
421
+ ---------------------------------------------------------------------</tt></pre>
422
+ </div></div>
423
+ <div class="paragraph"><p>Renders:</p></div>
424
+ <div class="musicblock">
425
+ <div class="content">
426
+ <img style="border-width: 0;" src="music1.png" alt="music1.png" />
427
+ </div></div>
428
+ </div></div>
429
+ <div class="exampleblock" id="X2">
430
+ <div class="title">Example 2: Music Block containing LilyPond notation</div>
431
+ <div class="exampleblock-content">
432
+ <div class="paragraph"><p>This example contains LilyPond musical markup, it uses the <em>link</em>
433
+ attribute so you can click on the music image to display the source
434
+ notation. The <tt>music2.ly</tt> source file is automatically created and
435
+ retained by the <tt>music2png.py</tt> filter when the <tt>-m</tt> option is used.</p></div>
436
+ <div class="listingblock">
437
+ <div class="content">
438
+ <pre><tt> ["music", "music2.png", "ly", link="music2.ly"]
439
+ ---------------------------------------------------------------------
440
+ \version "2.10.0"
441
+ \paper {
442
+ ragged-right = ##t
443
+ }
444
+ {
445
+ \time 3/4
446
+ \clef bass
447
+ c2 e4 g2. f4 e d c2 r4
448
+ }
449
+ ---------------------------------------------------------------------</tt></pre>
450
+ </div></div>
451
+ <div class="paragraph"><p>Renders:</p></div>
452
+ <div class="musicblock">
453
+ <div class="content">
454
+ <a href="music2.ly">
455
+ <img style="border-width: 0;" src="music2.png" alt="music2.png" />
456
+ </a>
457
+ </div></div>
458
+ </div></div>
459
+ <div class="admonitionblock">
460
+ <table><tr>
461
+ <td class="icon">
462
+ <div class="title">Note</div>
463
+ </td>
464
+ <td class="content">If you get an error processing the above example it may be that
465
+ it is not compatible with your version of LilyPond. Use the LilyPond
466
+ <tt>convert-ly(1)</tt> utility to update the source to the version that you
467
+ are using.</td>
468
+ </tr></table>
469
+ </div>
470
+ </div>
471
+ </div>
472
+ <h2 id="_using_the_filter">Using the Filter</h2>
473
+ <div class="sectionbody">
474
+ <div class="paragraph"><p>Insert a delimited Music Block containing valid ABC notation into your
475
+ <em>AsciiDoc</em> document:</p></div>
476
+ <div class="ulist"><ul>
477
+ <li>
478
+ <p>
479
+ The Music Block delimiter is the word <tt>music</tt> followed by four or
480
+ more tilde characters.
481
+ </p>
482
+ </li>
483
+ <li>
484
+ <p>
485
+ The Music Block attribute list must contain a file name for the PNG
486
+ output image file followed by the input format (either <em>abc</em> for ABC
487
+ or <em>ly</em> for LilyPond). If the format is omitted ABC notation is
488
+ assumed.
489
+ </p>
490
+ </li>
491
+ <li>
492
+ <p>
493
+ The filter invokes <tt>music2png</tt> with the <tt>-m</tt> option so that music
494
+ images will only be regenerated if the block content has changed.
495
+ </p>
496
+ </li>
497
+ <li>
498
+ <p>
499
+ The optional named block attributes <em>link</em>, <em>width</em> and <em>height</em> are
500
+ also available (see <a href="userguide.html#X55">Image macro attributes</a>
501
+ in the <em>AsciiDoc</em> User Guide).
502
+ </p>
503
+ </li>
504
+ </ul></div>
505
+ </div>
506
+ <h2 id="_limitations">Limitations</h2>
507
+ <div class="sectionbody">
508
+ <div class="ulist"><ul>
509
+ <li>
510
+ <p>
511
+ The <tt><tt>asciidoc(1)</tt></tt> output file cannot be <tt>-</tt> (stdout), you must
512
+ output to a named file.
513
+ </p>
514
+ </li>
515
+ <li>
516
+ <p>
517
+ If the music image file is linked to the output document then the
518
+ image file name in the Music Block attribute list should be a
519
+ relative path name relative to the <em>AsciiDoc</em> output file.
520
+ </p>
521
+ </li>
522
+ </ul></div>
523
+ </div>
524
+ <h2 id="_installation">Installation</h2>
525
+ <div class="sectionbody">
526
+ <div class="paragraph"><p>In addition to <em>AsciiDoc</em> you will need to have installed:</p></div>
527
+ <div class="ulist"><ul>
528
+ <li>
529
+ <p>
530
+ <a href="http://lilypond.org/web/">LilyPond</a> (most Linux distributions include
531
+ this package).
532
+ </p>
533
+ </li>
534
+ <li>
535
+ <p>
536
+ <a href="http://www.imagemagick.org">ImageMagick</a> (most Linux distributions
537
+ include this package).
538
+ </p>
539
+ </li>
540
+ </ul></div>
541
+ <div class="paragraph"><p>Test the music filter it 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/music-filter-test.txt
545
+ $ firefox ./filters/music-filter-test.html &amp;</tt></pre>
546
+ </div></div>
547
+ <div class="paragraph"><p>The filter was developed and tested on Xubuntu Linux using LilyPond
548
+ 2.10.5 and ImageMagick 6.2.4.</p></div>
549
+ <div class="admonitionblock">
550
+ <table><tr>
551
+ <td class="icon">
552
+ <div class="title">Note</div>
553
+ </td>
554
+ <td class="content">The filter does not work with LilyPond 2.2.6 because it did not
555
+ generate the requested output file name correctly (2.6.3 does not have
556
+ a problem).</td>
557
+ </tr></table>
558
+ </div>
559
+ </div>
560
+ <div id="footer">
561
+ <div id="footer-text">
562
+ Last updated 2008-12-31 14:47:04 NZDT
563
+ </div>
564
+ </div>
565
+ </body>
566
+ </html>