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,196 @@
1
+ LaTeX Filter
2
+ ============
3
+
4
+ :blogpost-status: published
5
+ :blogpost-doctype: article
6
+ :blogpost-posttype: page
7
+ :blogpost-categories: AsciiDoc,LaTeX,python
8
+
9
+ The AsciiDoc distribution includes a LaTeX filter that translates
10
+ LaTeX source to PNG image which is automatically inserted into the
11
+ AsciiDoc output document. Although it can accept any LaTeX source, the
12
+ primary use is to render mathematical formulae (see the examples
13
+ below). The filter implements the 'latex' Listing block and Paragraph
14
+ styles.
15
+
16
+ This LaTeX paragraph:
17
+
18
+ [listing]
19
+ .....................................................................
20
+ [latex]
21
+ $y = \int_0^\infty \gamma^2 \cos(x) dx$
22
+ .....................................................................
23
+
24
+ Renders:
25
+
26
+ [latex]
27
+ $y = \int_0^\infty \gamma^2 \cos(x) dx$
28
+
29
+ This LaTeX block:
30
+
31
+ [listing]
32
+ .....................................................................
33
+ ["latex","latex1.png",align="center"]
34
+ ---------------------------------------------------------------------
35
+ $\displaystyle{ V_i = C_0 - C_3
36
+ \frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }$
37
+ ---------------------------------------------------------------------
38
+ .....................................................................
39
+
40
+ Renders:
41
+
42
+ ["latex","latex1.png",align="center"]
43
+ ---------------------------------------------------------------------
44
+ $\displaystyle{ V_i = C_0 - C_3
45
+ \frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }$
46
+ ---------------------------------------------------------------------
47
+
48
+ This LaTeX block:
49
+
50
+ [listing]
51
+ .....................................................................
52
+ .LaTeX filter example
53
+ [latex]
54
+ ["latex","latex3.png"]
55
+ ---------------------------------------------------------------------
56
+ \begin{equation}
57
+ \Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{
58
+ \left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2}
59
+ \log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}.
60
+ \end{equation}
61
+
62
+ \begin{equation}
63
+ \boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))}
64
+ \end{equation}
65
+
66
+ \begin{equation}\label{first}
67
+ a=b+c
68
+ \end{equation}
69
+
70
+ \begin{subequations}\label{grp}
71
+ \begin{align}
72
+ a&=b+c\label{second}\\
73
+ d&=e+f+g\label{third}\\
74
+ h&=i+j\label{fourth}
75
+ \end{align}
76
+ \end{subequations}
77
+ ---------------------------------------------------------------------
78
+ .....................................................................
79
+
80
+ Renders:
81
+
82
+ .LaTeX filter example
83
+ [latex]
84
+ ---------------------------------------------------------------------
85
+ \begin{equation}
86
+ \Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{
87
+ \left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2}
88
+ \log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}.
89
+ \end{equation}
90
+
91
+ \begin{equation}
92
+ \boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))}
93
+ \end{equation}
94
+
95
+ \begin{equation}\label{first}
96
+ a=b+c
97
+ \end{equation}
98
+
99
+ \begin{subequations}\label{grp}
100
+ \begin{align}
101
+ a&=b+c\label{second}\\
102
+ d&=e+f+g\label{third}\\
103
+ h&=i+j\label{fourth}
104
+ \end{align}
105
+ \end{subequations}
106
+ ---------------------------------------------------------------------
107
+
108
+ This LaTeX paragraph:
109
+
110
+ [listing]
111
+ .....................................................................
112
+ .A LaTeX table
113
+ [latex]
114
+ \begin{tabular}{c r @{.} l}
115
+ Pi expression &
116
+ \multicolumn{2}{c}{Value} \\
117
+ \hline
118
+ $\pi$ & 3&1416 \\
119
+ $\pi^{\pi}$ & 36&46 \\
120
+ $(\pi^{\pi})^{\pi}$ & 80662&7 \\
121
+ \end{tabular}
122
+ .....................................................................
123
+
124
+ Renders:
125
+
126
+ .A LaTeX table
127
+ [latex]
128
+ \begin{tabular}{c r @{.} l}
129
+ Pi expression &
130
+ \multicolumn{2}{c}{Value} \\
131
+ \hline
132
+ $\pi$ & 3&1416 \\
133
+ $\pi^{\pi}$ & 36&46 \\
134
+ $(\pi^{\pi})^{\pi}$ & 80662&7 \\
135
+ \end{tabular}
136
+
137
+
138
+ Using the Filter
139
+ ----------------
140
+ - The LaTeX filter is invoked by setting the Listing block or
141
+ Paragraph style (the first positional block attribute) to 'latex'.
142
+ - The second positional attribute (named 'target' is optional, it sets
143
+ the name of the generated PNG image file. If this is not supplied a
144
+ file name like `{docname}__{target-number}.png` is synthesised
145
+ (where `{docname}` is the document file name and `{target-number}`
146
+ is an integer number.
147
+ - The third positional attribute, named 'dpi', is also optional; it is
148
+ an integer number that sets the output resolution in dots per inch.
149
+
150
+ Because the LaTeX images are rendered using the image block templates
151
+ you can also use the optional named image block attributes (see
152
+ link:userguide.html#X55[Image macro attributes] in the AsciiDoc User
153
+ Guide).
154
+
155
+ [TIP]
156
+ =====================================================================
157
+ You can also change the image size using the following LaTeX commands:
158
+
159
+ \tiny
160
+ \scriptsize
161
+ \footnotesize
162
+ \small
163
+ \normalsize
164
+ \large
165
+ \Large
166
+ \LARGE
167
+ \huge
168
+
169
+ For example:
170
+
171
+ [latex]
172
+ \Large $y = \int_0^\infty \gamma^2 \cos(x) dx$
173
+
174
+ The `\Large` command is outside the `$` math delimiters.
175
+
176
+ =====================================================================
177
+
178
+ The filter (`./filters/latex/latex2png.py`) can be used outside
179
+ AsciiDoc to convert LaTeX source to PNG images.
180
+
181
+ Execute the following command to see how to use it:
182
+
183
+ $ ./filters/latex/latex2png.py --help
184
+
185
+
186
+ Limitations
187
+ -----------
188
+ - The `asciidoc(1)` input and output files cannot both be `-` (stdin
189
+ and stdout), either the input or output files (or both) must be a
190
+ named file.
191
+
192
+
193
+ Installation
194
+ ------------
195
+ In addition to AsciiDoc you will need to have `latex(1)` and
196
+ `dvipng(1)` installed.
@@ -1,9 +1,11 @@
1
1
  Embedding LaTeX Math in AsciiDoc dblatex documents
2
2
  ==================================================
3
3
 
4
- You can include
5
- ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf[LaTeX math]
6
- equations in AsciiDoc documents that are processed by 'dblatex'.
4
+ You can include LaTeX math equations in AsciiDoc documents that are
5
+ processed by http://dblatex.sourceforge.net/[dblatex]. The AsciiDoc
6
+ 'latexmath' macros and passthrough blocks generate DocBook
7
+ 'inlineequation', 'informalequation' and 'equation' elements
8
+ containing the LaTeX markup which is processed by 'dblatex'.
7
9
 
8
10
 
9
11
  Inline equations
@@ -12,24 +14,18 @@ This markup:
12
14
 
13
15
  ---------------------------------------------------------------------
14
16
  An inline equation latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$]
15
- using the 'math' inline macro.
16
-
17
- You can use the same 'math' macro to inject arbitrary latexmath:[\LaTeX] markup
18
- (but beware, this is an undocumented trick).
17
+ using the 'latexmath' inline macro.
19
18
  ---------------------------------------------------------------------
20
19
 
21
20
  Renders:
22
21
 
23
22
  An inline equation latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$]
24
- using the 'math' inline macro.
25
-
26
- You can use the same 'math' macro to inject arbitrary latexmath:[\LaTeX] markup
27
- (but beware, this is an undocumented trick).
23
+ using the 'latexmath' inline macro.
28
24
 
29
25
 
30
26
  Informal equations
31
27
  ------------------
32
- Informal (untitled) equations are generated with a 'math' style
28
+ Informal (untitled) equations are generated with a 'latexmath' style
33
29
  passthrough delimited block. This markup:
34
30
 
35
31
  ---------------------------------------------------------------------
@@ -59,13 +55,13 @@ latexmath::[\[C = \alpha + \beta Y^{\gamma} + \epsilon\]]
59
55
 
60
56
  Formal equations
61
57
  ----------------
62
- Formal equations are titled and are generated with a 'math' style
58
+ Formal equations are titled and are generated with a 'latexmath' style
63
59
  passthrough delimited block.
64
60
 
65
61
  This markup:
66
62
 
67
63
  ---------------------------------------------------------------------
68
- .Unnumbered
64
+ .First equation
69
65
  [latexmath]
70
66
  ++++++++++++++++++++++++++++++++++++++++++++
71
67
  \[C = \alpha + \beta Y^{\gamma} + \epsilon\]
@@ -74,7 +70,7 @@ This markup:
74
70
 
75
71
  Renders:
76
72
 
77
- .Unnumbered
73
+ .First equation
78
74
  [latexmath]
79
75
  ++++++++++++++++++++++++++++++++++++++++++++
80
76
  \[C = \alpha + \beta Y^{\gamma} + \epsilon\]
@@ -82,127 +78,6 @@ Renders:
82
78
 
83
79
  This markup:
84
80
 
85
- ---------------------------------------------------------------------
86
- .Aligned
87
- [latexmath]
88
- ++++++++++++++++++++++++++++++++++++++++++++
89
- \begin{align*}
90
- 2x^2 + 3(x-1)(x-2) & = 2x^2 + 3(x^2-3x+2) \\
91
- &= 2x^2 + 3x^2 - 9x + 6 \\
92
- &= 5x^2 - 9x + 6
93
- \end{align*}
94
- ++++++++++++++++++++++++++++++++++++++++++++
95
- ---------------------------------------------------------------------
96
-
97
- Renders:
98
-
99
- .Unnumbered
100
- .Aligned
101
- [latexmath]
102
- ++++++++++++++++++++++++++++++++++++++++++++
103
- \begin{align*}
104
- 2x^2 + 3(x-1)(x-2) & = 2x^2 + 3(x^2-3x+2) \\
105
- &= 2x^2 + 3x^2 - 9x + 6 \\
106
- &= 5x^2 - 9x + 6
107
- \end{align*}
108
- ++++++++++++++++++++++++++++++++++++++++++++
109
-
110
- This markup:
111
-
112
- ---------------------------------------------------------------------
113
- .Array
114
- [latexmath]
115
- ++++++++++++++++++++++++++++++++++++++++++++
116
- \begin{eqnarray}
117
- x & = & \frac{-7 \pm \sqrt{49 - 24}}{6} \\
118
- & = & -2 \textrm{ or } -\frac13
119
- \end{eqnarray}
120
- ++++++++++++++++++++++++++++++++++++++++++++
121
- ---------------------------------------------------------------------
122
-
123
- Renders:
124
-
125
- .Array
126
- [latexmath]
127
- ++++++++++++++++++++++++++++++++++++++++++++
128
- \begin{eqnarray}
129
- x & = & \frac{-7 \pm \sqrt{49 - 24}}{6} \\
130
- & = & -2 \textrm{ or } -\frac13
131
- \end{eqnarray}
132
- ++++++++++++++++++++++++++++++++++++++++++++
133
-
134
- This markup:
135
-
136
- ---------------------------------------------------------------------
137
- .Array
138
- [latexmath]
139
- ++++++++++++++++++++++++++++++++++++++++++++
140
- \begin{eqnarray*}
141
- 4r^2\int_0^{\pi/2} \cos^2 \theta\, d\theta
142
- &=& 4r^2\int_0^{\pi/2} \frac{1}{2}(1 + \cos 2\theta) \,d\theta\\
143
- & = & {2r^2\theta}\Bigg{|}_0^{\pi/2}
144
- + 2r^2\int_0^{\pi/2} \cos 2\theta \,d\theta\\
145
- & = & \pi r^2 + 2r^2(\sin2\theta)\Bigg{|}_0^{\pi/2}\\
146
- & = & \pi r^2
147
- \end{eqnarray*}
148
- ++++++++++++++++++++++++++++++++++++++++++++
149
- ---------------------------------------------------------------------
150
-
151
- Renders:
152
-
153
- .Array
154
- [latexmath]
155
- ++++++++++++++++++++++++++++++++++++++++++++
156
- \begin{eqnarray*}
157
- 4r^2\int_0^{\pi/2} \cos^2 \theta\, d\theta
158
- &=& 4r^2\int_0^{\pi/2} \frac{1}{2}(1 + \cos 2\theta) \,d\theta\\
159
- & = & {2r^2\theta}\Bigg{|}_0^{\pi/2}
160
- + 2r^2\int_0^{\pi/2} \cos 2\theta \,d\theta\\
161
- & = & \pi r^2 + 2r^2(\sin2\theta)\Bigg{|}_0^{\pi/2}\\
162
- & = & \pi r^2
163
- \end{eqnarray*}
164
- ++++++++++++++++++++++++++++++++++++++++++++
165
-
166
- This markup:
167
-
168
- ---------------------------------------------------------------------
169
- .List
170
- [latexmath]
171
- ++++++++++++++++++++++++++++++++++++++++++++
172
- \begin{enumerate}
173
- \item $\frac{da}{dx} = 0$
174
- \item $\frac{d}{dx} ax = a$
175
- \item $\frac{d}{dx} x^n = nx^{n-1}$
176
- \item $\displaystyle \frac{d}{dx} (f(x) + g(x))
177
- = \frac{d}{dx} f(x) + \frac{d}{dx} g(x)$
178
- \item $\displaystyle \frac{d}{dx} f(x)g(x)
179
- = g(x) \frac{d}{dx} f(x) + f(x) \frac{d}{dx} g(x)$
180
- \item $\displaystyle \frac{d}{dx} \frac{f(x)}{g(x)}
181
- = \frac{g(x) \frac{d}{dx} f(x) - f(x) \frac{d}{dx} g(x)}{(g(x))^2}$
182
- \end{enumerate}
183
- ++++++++++++++++++++++++++++++++++++++++++++
184
- ---------------------------------------------------------------------
185
-
186
- Renders:
187
-
188
- .List
189
- [latexmath]
190
- ++++++++++++++++++++++++++++++++++++++++++++
191
- \begin{enumerate}
192
- \item $\frac{da}{dx} = 0$
193
- \item $\frac{d}{dx} ax = a$
194
- \item $\frac{d}{dx} x^n = nx^{n-1}$
195
- \item $\displaystyle \frac{d}{dx} (f(x) + g(x))
196
- = \frac{d}{dx} f(x) + \frac{d}{dx} g(x)$
197
- \item $\displaystyle \frac{d}{dx} f(x)g(x)
198
- = g(x) \frac{d}{dx} f(x) + f(x) \frac{d}{dx} g(x)$
199
- \item $\displaystyle \frac{d}{dx} \frac{f(x)}{g(x)}
200
- = \frac{g(x) \frac{d}{dx} f(x) - f(x) \frac{d}{dx} g(x)}{(g(x))^2}$
201
- \end{enumerate}
202
- ++++++++++++++++++++++++++++++++++++++++++++
203
-
204
- This markup:
205
-
206
81
  ---------------------------------------------------------------------
207
82
  .Matrix
208
83
  [latexmath]
@@ -242,3 +117,5 @@ Renders:
242
117
  \end{array}
243
118
  \right] \]
244
119
  ++++++++++++++++++++++++++++++++++++++++++++
120
+
121
+
@@ -17,14 +17,14 @@ attribute instead of the `asciimath` attribute.
17
17
  http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML]
18
18
  website for details.
19
19
 
20
- Here's the link:latexmath.txt[AsciiDoc source] that generated this
20
+ Here's the link:latexmathml.txt[AsciiDoc source] that generated this
21
21
  page.
22
22
 
23
23
  Some example 'LaTeXMathML' formulas:
24
24
 
25
25
  - latexmath:[$R_x = 10.0 \times \sin(R_\phi)$]
26
26
 
27
- - [,,2]##latexmath:[$\sum_{n=1}^\infty \frac{1}{2^n}$]##
27
+ - latexmath:[$\sum_{n=1}^\infty \frac{1}{2^n}$]
28
28
 
29
29
  - latexmath:[$\lim_{x\to\infty} f(x) = k \choose r + \frac ab
30
30
  \sum_{n=1}^\infty a_n + \displaystyle{ \left\{ \frac{1}{13}
@@ -1,297 +1,233 @@
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.
1
+ #####################################################################
2
+ #
3
+ # A-A-P file for making AsciiDoc distribution documentation.
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
+ ASCIIDOC = python ../asciidoc.py -a revnumber=$(VERS)@ -a revdate="$(DATE)@"
12
+ A2X = python ../a2x.py
13
+
14
+ :syseval which fop | :assign FOP
15
+ @if not _no.FOP:
16
+ :syseval which fop.sh | :assign FOP
17
+ :syseval which lynx | :assign LYNX # Converts HTML to text.
18
+ :syseval which xmllint | :assign XMLLINT # Validates XML.
19
+ :syseval which dblatex | :assign DBLATEX # Converts DocBook XML to PDF.
20
+ :syseval which aspell | :assign ASPELL
21
+ :syseval which xsltproc | :assign XSLTPROC
22
+
23
+ ROOT = asciidoc asciidoc.1
24
+ INFILES = $*(ROOT).txt
25
+ CHUNK_DIR = ./asciidoc.chunked
26
+ HTMLHELP_DIR = ./asciidoc.htmlhelp
27
+ HTMLHELP_FILE = asciidoc
28
+
29
+ OUTFILES = $*(ROOT).html $*(ROOT).css.html $*(ROOT).css-embedded.html \
30
+ asciidoc.pdf asciidoc.1.man a2x.1.man \
31
+ article.html book.html book-multi.html asciidoc.xml asciidoc.1.xml \
32
+ ../BUGS ../CHANGELOG ../README ../INSTALL \
33
+ latex-backend.html \
34
+ $HTMLHELP_DIR/index.html \
35
+ $CHUNK_DIR/index.html \
36
+ article.pdf \
37
+ latexmath.pdf \
38
+ latex-filter.pdf \
39
+ source-highlight-filter.pdf \
40
+ music-filter.pdf \
41
+ book.epub \
42
+ article-standalone.html \
43
+ article-html5-toc2.html
44
+
45
+ TEST_FILES = $*(ROOT).css-embedded.html
46
+ article.css-embedded.html book.css-embedded.html \
47
+ article.xml book.xml book-multi.xml asciidoc.xml asciidoc.1.xml \
48
+ asciidoc.1.html a2x.1.xml music-filter.xml \
49
+ book.epub asciidoc.epub \
50
+
51
+
52
+ #####################################################################
53
+ # Filetype build rules.
54
+ #####################################################################
55
+
56
+ :rule %.epub : %.txt
57
+ :sys $A2X -f epub -d book --epubcheck --icons $source
58
+
59
+ :rule %.text : %.txt
60
+ # Convert AsciiDoc to HTML then use lynx(1) to convert HTML to text.
61
+ @if not _no.LYNX:
62
+ :print WARNING: lynx(1) unavailable: skipping $target file generation
63
+ @else:
64
+ opt = -f ../text.conf
65
+ @if source_list[0] == 'asciidoc.1.txt':
66
+ opt += -d manpage
67
+ @else:
68
+ opt += -n
69
+ :sys $ASCIIDOC $opt -b html4 -o - $source | \
70
+ lynx -dump -stdin > $target
71
+
72
+ :rule %.css.html : %.txt
73
+ opt =
74
+ @if source_list[0] == 'asciidoc.1.txt':
75
+ opt += -d manpage
76
+ @else:
77
+ opt += -n
78
+ opt += -a toc -a toclevels=2 -a scriptsdir=../javascripts
79
+ :sys $ASCIIDOC $opt -b xhtml11 -a linkcss -a icons -a stylesdir=../stylesheets -o $target $(source[0])
80
+ @if _no.XMLLINT:
81
+ :sys $XMLLINT --nonet --noout --valid $target
82
+ @else:
83
+ :print WARNING: xmllint(1) unavailable: skipping validation
84
+
85
+ :rule %.css-embedded.html : %.txt
86
+ opt =
87
+ @if source_list[0] == 'asciidoc.1.txt':
88
+ opt += -d manpage
89
+ @else:
90
+ opt += -n
91
+ opt += -a toc -a toclevels=2
92
+ :sys $ASCIIDOC -b xhtml11 $opt -o $target $(source[0])
93
+ @if _no.XMLLINT:
94
+ :sys $XMLLINT --nonet --noout --valid $target
95
+ @else:
96
+ :print WARNING: xmllint(1) unavailable: skipping validation
97
+
98
+ :rule %.xml : %.txt
99
+ opt =
100
+ @if source_list[0] in ('asciidoc.1.txt','a2x.1.txt'):
101
+ opt += -d manpage
102
+ @else:
103
+ opt += -n
104
+ @if source_list[0] == 'asciidoc.txt' or source_list[0].startswith('book'):
105
+ opt += -d book
106
+ :sys $ASCIIDOC $opt -b docbook $(source[0])
107
+ @if _no.XMLLINT:
108
+ :sys $XMLLINT --nonet --noout --valid $target
109
+ @else:
110
+ :print WARNING: xmllint(1) unavailable: skipping validation
111
+
112
+ :rule %.sgml : %.txt
113
+ opt =
114
+ @if source_list[0] in ('asciidoc.1.txt','a2x.1.txt'):
115
+ opt += -d manpage
116
+ @if source_list[0] == 'asciidoc.txt' or source_list[0].startswith('book'):
117
+ opt += -d book
118
+ :sys $ASCIIDOC $opt -b docbook-sgml $(source[0])
119
+
120
+ :rule %.html: %.xml
121
+ :sys $XSLTPROC --nonet --stringparam admon.textlabel 0 --stringparam html.stylesheet ./docbook-xsl.css ../docbook-xsl/xhtml.xsl $source >$target
122
+
123
+ :rule %.man : %.xml
124
+ :sys $XSLTPROC --nonet ../docbook-xsl/manpage.xsl $source
125
+ :sys touch $target # Dummy target.
126
+
127
+ :rule %.fo: %.xml
128
+ :sys $XSLTPROC --nonet --stringparam admon.textlabel 0 ../docbook-xsl/fo.xsl $source >$target
129
+
130
+ # This kludge forces the User Guide and LaTeX related PDFs to be generated
131
+ # using dblatex so we include a dblatex example in the distribution.
132
+ @if _no.DBLATEX:
133
+ asciidoc.pdf: asciidoc.txt
134
+ :sys $ASCIIDOC -b docbook $(source[0])
135
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target asciidoc.xml
136
+ latexmath.pdf: latexmath.xml
137
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
138
+ latex-filter.pdf: latex-filter.xml
139
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
140
+
141
+ # Force the Source Highlighter PDF to be generated using dblatex
142
+ # because dblatex has builtin source code highlighting.
143
+ @if _no.DBLATEX:
144
+ source-highlight-filter.pdf: source-highlight-filter.xml
145
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
146
+
147
+ @if _no.FOP:
148
+ :rule %.pdf: %.fo
149
+ :sys $FOP $source $target
150
+ @elif _no.DBLATEX:
151
+ # Fall back to dblatex if no FOP.
152
+ :rule %.pdf: %.xml
153
+ :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source
154
+ @else:
155
+ :rule %.pdf:
156
+ :print WARNING: PDF processor unavailable: skipping $target file generation
157
+
158
+
159
+ #####################################################################
160
+ # Explicit file generation (cases that don't fit the rules).
161
+ #####################################################################
162
+
163
+ article-standalone.html: article.txt
164
+ :sys $ASCIIDOC -a data-uri -a icons -a toc -a max-width=55em -o $target $source
165
+
166
+ article-html5-toc2.html: article.txt
167
+ :sys $ASCIIDOC -b html5 -a icons -a toc2 -a theme=flask -o $target $source
168
+
169
+ asciidoc.1.html: asciidoc.1.txt
170
+ :sys $ASCIIDOC -d manpage -b html4 $source
171
+ @if _no.XMLLINT:
172
+ :sys $XMLLINT --nonet --noout --valid --html $target
173
+ @else:
174
+ :print WARNING: xmllint(1) unavailable: skipping validation
175
+
176
+ # User Guide 'chunked' into linked HTML pages.
177
+ $CHUNK_DIR/index.html: asciidoc.txt
178
+ :sys $A2X -fchunked -dbook --icons -D ./ asciidoc.txt
179
+
180
+ # HTML Help formatted User Guide.
181
+ $HTMLHELP_DIR/index.html: asciidoc.xml
182
+ :sys $A2X -fhtmlhelp -dbook --icons -D ./ asciidoc.txt
183
+
184
+ ../BUGS: ../BUGS.text
185
+ # Make BUGS.text and copy to BUGS.
186
+ :copy ../BUGS.text ../BUGS
187
+
188
+ ../CHANGELOG: ../CHANGELOG.text
189
+ # Make CHANGELOG.text and copy to CHANGELOG.
190
+ :copy ../CHANGELOG.text ../CHANGELOG
191
+
192
+ ../README: ../README.text
193
+ # Make README.text and copy to README.
194
+ :copy ../README.text ../README
195
+
196
+ ../INSTALL: ../INSTALL.text
197
+ # Make INSTALL.text and copy to INSTALL.
198
+ :copy ../INSTALL.text ../INSTALL
199
+
200
+ asciimathml.html: asciimathml.txt
201
+ :sys $ASCIIDOC -a asciimath $source
202
+ # No xmllint(1) checking -- fails on embedded JavaScript.
203
+
204
+ latexmathml.html: latexmathml.txt
205
+ :sys $ASCIIDOC -a latexmath $source
206
+ # No xmllint(1) checking -- fails on embedded JavaScript.
207
+
208
+
209
+ #####################################################################
210
+ # Build commands.
211
+ #####################################################################
212
+
213
+ all: $OUTFILES
214
+
215
+ clean:
216
+ :del {f} $OUTFILES $TEST_FILES
217
+ :del {f} *.bak # Remove aspell backups.
218
+
219
+ spell: $INFILES ../CHANGELOG.txt ../README.txt ../BUGS.txt ../INSTALL.txt \
220
+ a2x.1.txt faq.txt asciidocapi.txt testasciidoc.txt \
221
+ epub-notes.txt publishing-ebooks-with-asciidoc.txt \
222
+ source-highlight-filter.txt \
223
+ slidy.txt slidy-example.txt
224
+ # Interactively spell check all files.
225
+ @for s in source_list:
226
+ :sys {i} $ASPELL check -p ./asciidoc.dict $s
227
+
228
+ clean_testfiles:
229
+ :del {f} $TEST_FILES
230
+ :del {f} music*.png # Force Lilypond to run.
231
+
232
+ test: clean_testfiles $TEST_FILES
233
+ # Force generation and validation of .html and Docbook (.xml) files.