mizuho 0.9.6 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +4 -2
- data/Rakefile +0 -37
- data/asciidoc/BUGS +9 -18
- data/asciidoc/BUGS.txt +5 -14
- data/asciidoc/CHANGELOG +1433 -266
- data/asciidoc/CHANGELOG.txt +2821 -1810
- data/asciidoc/COPYING +339 -339
- data/asciidoc/COPYRIGHT +18 -18
- data/asciidoc/INSTALL +189 -30
- data/asciidoc/INSTALL.txt +175 -19
- data/asciidoc/MANIFEST +88 -0
- data/asciidoc/Makefile.in +29 -13
- data/asciidoc/README +16 -17
- data/asciidoc/README.txt +35 -36
- data/asciidoc/a2x.py +902 -0
- data/asciidoc/asciidoc.conf +610 -455
- data/asciidoc/asciidoc.py +1965 -1061
- data/asciidoc/asciidocapi.py +257 -0
- data/asciidoc/common.aap +2 -2
- data/asciidoc/configure +1170 -1023
- data/asciidoc/configure.ac +1 -1
- data/asciidoc/dblatex/asciidoc-dblatex.xsl +42 -0
- data/asciidoc/doc/a2x.1 +559 -102
- data/asciidoc/doc/a2x.1.txt +233 -91
- data/asciidoc/doc/article-docinfo.xml +87 -0
- data/asciidoc/doc/article.pdf +0 -0
- data/asciidoc/doc/article.txt +139 -122
- data/asciidoc/doc/asciidoc.1 +157 -46
- data/asciidoc/doc/asciidoc.1.txt +171 -118
- data/asciidoc/doc/asciidoc.conf +7 -8
- data/asciidoc/doc/asciidoc.dict +960 -635
- data/asciidoc/doc/asciidoc.txt +2335 -1464
- data/asciidoc/doc/asciidocapi.txt +189 -0
- data/asciidoc/doc/asciimathml.txt +14 -17
- data/asciidoc/doc/book-multi.txt +181 -155
- data/asciidoc/doc/book.epub +0 -0
- data/asciidoc/doc/book.txt +156 -131
- data/asciidoc/doc/customers.csv +18 -18
- data/asciidoc/doc/epub-notes.txt +210 -0
- data/asciidoc/doc/faq.txt +1122 -547
- data/asciidoc/doc/latex-backend.txt +192 -191
- data/asciidoc/doc/latex-bugs.txt +134 -0
- data/asciidoc/doc/latex-filter.pdf +0 -0
- data/asciidoc/doc/latex-filter.txt +196 -0
- data/asciidoc/doc/latexmath.txt +13 -136
- data/asciidoc/doc/latexmathml.txt +2 -2
- data/asciidoc/doc/main.aap +233 -297
- data/asciidoc/doc/music-filter.pdf +0 -0
- data/asciidoc/doc/music-filter.txt +55 -65
- data/asciidoc/doc/publishing-ebooks-with-asciidoc.txt +398 -0
- data/asciidoc/doc/slidy-example.txt +167 -0
- data/asciidoc/doc/slidy.txt +113 -0
- data/asciidoc/doc/source-highlight-filter.pdf +0 -0
- data/asciidoc/doc/source-highlight-filter.txt +45 -20
- data/asciidoc/doc/testasciidoc.txt +231 -0
- data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +30 -8
- data/asciidoc/docbook-xsl/chunked.xsl +17 -19
- data/asciidoc/docbook-xsl/common.xsl +106 -67
- data/asciidoc/docbook-xsl/epub.xsl +35 -0
- data/asciidoc/docbook-xsl/fo.xsl +3 -0
- data/asciidoc/docbook-xsl/htmlhelp.xsl +16 -17
- data/asciidoc/docbook-xsl/manpage.xsl +31 -31
- data/asciidoc/docbook-xsl/text.xsl +6 -1
- data/asciidoc/docbook-xsl/xhtml.xsl +14 -14
- data/asciidoc/docbook45.conf +759 -0
- data/asciidoc/filters/code/code-filter-readme.txt +37 -37
- data/asciidoc/filters/code/code-filter-test.txt +15 -15
- data/asciidoc/filters/code/code-filter.conf +8 -8
- data/asciidoc/filters/graphviz/asciidoc-graphviz-sample.txt +104 -64
- data/asciidoc/filters/graphviz/graphviz-filter.conf +20 -16
- data/asciidoc/filters/graphviz/graphviz2png.py +54 -39
- data/asciidoc/filters/latex/latex-filter.conf +18 -0
- data/asciidoc/filters/latex/latex2png.py +216 -0
- data/asciidoc/filters/music/music-filter.conf +8 -17
- data/asciidoc/filters/music/music2png.py +40 -32
- data/asciidoc/filters/source/source-highlight-filter.conf +40 -34
- data/asciidoc/help.conf +261 -96
- data/asciidoc/html4.conf +505 -460
- data/asciidoc/html5.conf +686 -0
- data/asciidoc/images/highlighter.png +0 -0
- data/asciidoc/images/icons/caution.png +0 -0
- data/asciidoc/images/icons/example.png +0 -0
- data/asciidoc/images/icons/important.png +0 -0
- data/asciidoc/images/icons/note.png +0 -0
- data/asciidoc/images/icons/tip.png +0 -0
- data/asciidoc/images/icons/warning.png +0 -0
- data/asciidoc/images/smallnew.png +0 -0
- data/asciidoc/javascripts/asciidoc.js +189 -0
- data/asciidoc/javascripts/slidy.js +2845 -0
- data/asciidoc/javascripts/toc.js +8 -0
- data/asciidoc/lang-de.conf +57 -0
- data/asciidoc/lang-en.conf +54 -0
- data/asciidoc/lang-es.conf +49 -9
- data/asciidoc/lang-fr.conf +59 -0
- data/asciidoc/lang-hu.conf +55 -0
- data/asciidoc/lang-it.conf +55 -0
- data/asciidoc/lang-nl.conf +57 -0
- data/asciidoc/lang-pt-BR.conf +56 -0
- data/asciidoc/lang-ru.conf +60 -0
- data/asciidoc/lang-uk.conf +60 -0
- data/asciidoc/latex.conf +700 -663
- data/asciidoc/main.aap +77 -0
- data/asciidoc/slidy.conf +136 -0
- data/asciidoc/{examples/website/xhtml11-manpage.css → stylesheets/asciidoc-manpage.css} +1 -1
- data/asciidoc/stylesheets/asciidoc.css +508 -0
- data/asciidoc/stylesheets/docbook-xsl.css +322 -272
- data/asciidoc/stylesheets/flask-manpage.css +1 -0
- data/asciidoc/stylesheets/flask.css +584 -0
- data/asciidoc/stylesheets/pygments.css +66 -0
- data/asciidoc/stylesheets/slidy.css +445 -0
- data/asciidoc/stylesheets/toc2.css +33 -0
- data/asciidoc/stylesheets/volnitsky-manpage.css +1 -0
- data/asciidoc/stylesheets/volnitsky.css +435 -0
- data/asciidoc/stylesheets/xhtml11-quirks.css +5 -3
- data/asciidoc/tests/asciidocapi.py +257 -0
- data/asciidoc/tests/data/deprecated-quotes.txt +12 -0
- data/asciidoc/tests/data/filters-test.txt +90 -0
- data/asciidoc/tests/data/lang-de-test.txt +106 -0
- data/asciidoc/tests/data/lang-en-test.txt +114 -0
- data/asciidoc/tests/data/lang-es-test.txt +106 -0
- data/asciidoc/tests/data/lang-fr-test.txt +106 -0
- data/asciidoc/tests/data/lang-hu-test.txt +106 -0
- data/asciidoc/tests/data/lang-nl-test.txt +94 -0
- data/asciidoc/tests/data/lang-pt-BR-test.txt +106 -0
- data/asciidoc/tests/data/lang-ru-test.txt +106 -0
- data/asciidoc/tests/data/lang-uk-test.txt +106 -0
- data/asciidoc/tests/data/oldtables.txt +64 -0
- data/asciidoc/tests/data/rcs-id-marker-test.txt +6 -0
- data/asciidoc/tests/data/testcases.conf +2 -0
- data/asciidoc/tests/data/testcases.txt +740 -0
- data/asciidoc/tests/data/utf8-bom-test.txt +9 -0
- data/asciidoc/tests/data/utf8-examples.txt +217 -0
- data/asciidoc/tests/testasciidoc.conf +520 -0
- data/asciidoc/tests/testasciidoc.py +411 -0
- data/asciidoc/text.conf +16 -16
- data/asciidoc/vim/syntax/asciidoc.vim +99 -91
- data/asciidoc/wordpress.conf +43 -3
- data/asciidoc/xhtml11-quirks.conf +61 -57
- data/asciidoc/xhtml11.conf +684 -645
- data/lib/mizuho.rb +2 -0
- data/lib/mizuho/generator.rb +2 -2
- data/test/generator_spec.rb +1 -1
- data/test/parser_spec.rb +1 -1
- data/test/spec_helper.rb +3 -4
- metadata +87 -88
- data/asciidoc/a2x +0 -674
- data/asciidoc/doc/article.css-embedded.html +0 -602
- data/asciidoc/doc/article.html +0 -46
- data/asciidoc/doc/asciidoc-revhistory.xml +0 -27
- data/asciidoc/doc/asciidoc.1.css-embedded.html +0 -598
- data/asciidoc/doc/asciidoc.1.css.html +0 -212
- data/asciidoc/doc/asciidoc.1.html +0 -190
- data/asciidoc/doc/asciidoc.css-embedded.html +0 -7853
- data/asciidoc/doc/asciidoc.css.html +0 -7416
- data/asciidoc/doc/asciidoc.html +0 -3339
- data/asciidoc/doc/book-multi.css-embedded.html +0 -575
- data/asciidoc/doc/book-multi.html +0 -55
- data/asciidoc/doc/book.css-embedded.html +0 -607
- data/asciidoc/doc/book.html +0 -43
- data/asciidoc/doc/docbook-xsl.css +0 -272
- data/asciidoc/doc/latex-backend.html +0 -117
- data/asciidoc/doc/music-filter.html +0 -566
- data/asciidoc/doc/source-highlight-filter.html +0 -214
- data/asciidoc/docbook.conf +0 -721
- data/asciidoc/examples/website/ASCIIMathML.js +0 -938
- data/asciidoc/examples/website/CHANGELOG.html +0 -4389
- data/asciidoc/examples/website/CHANGELOG.txt +0 -1810
- data/asciidoc/examples/website/INSTALL.html +0 -161
- data/asciidoc/examples/website/INSTALL.txt +0 -71
- data/asciidoc/examples/website/LaTeXMathML.js +0 -1223
- data/asciidoc/examples/website/README-website.html +0 -118
- data/asciidoc/examples/website/README-website.txt +0 -29
- data/asciidoc/examples/website/README.html +0 -125
- data/asciidoc/examples/website/README.txt +0 -36
- data/asciidoc/examples/website/a2x.1.html +0 -419
- data/asciidoc/examples/website/a2x.1.txt +0 -204
- data/asciidoc/examples/website/asciidoc-docbook-xsl.html +0 -130
- data/asciidoc/examples/website/asciidoc-docbook-xsl.txt +0 -43
- data/asciidoc/examples/website/asciidoc-graphviz-sample.txt +0 -130
- data/asciidoc/examples/website/asciimathml.txt +0 -64
- data/asciidoc/examples/website/build-website.sh +0 -25
- data/asciidoc/examples/website/customers.csv +0 -18
- data/asciidoc/examples/website/downloads.html +0 -257
- data/asciidoc/examples/website/downloads.txt +0 -121
- data/asciidoc/examples/website/faq.html +0 -673
- data/asciidoc/examples/website/faq.txt +0 -547
- data/asciidoc/examples/website/index.html +0 -419
- data/asciidoc/examples/website/index.txt +0 -245
- data/asciidoc/examples/website/latex-backend.html +0 -535
- data/asciidoc/examples/website/latex-backend.txt +0 -191
- data/asciidoc/examples/website/latexmathml.txt +0 -41
- data/asciidoc/examples/website/layout1.conf +0 -161
- data/asciidoc/examples/website/layout1.css +0 -65
- data/asciidoc/examples/website/layout2.conf +0 -158
- data/asciidoc/examples/website/layout2.css +0 -93
- data/asciidoc/examples/website/manpage.html +0 -266
- data/asciidoc/examples/website/manpage.txt +0 -118
- data/asciidoc/examples/website/music-filter.html +0 -242
- data/asciidoc/examples/website/music-filter.txt +0 -158
- data/asciidoc/examples/website/music1.abc +0 -12
- data/asciidoc/examples/website/music1.png +0 -0
- data/asciidoc/examples/website/music2.ly +0 -9
- data/asciidoc/examples/website/music2.png +0 -0
- data/asciidoc/examples/website/newlists.txt +0 -40
- data/asciidoc/examples/website/newtables.txt +0 -397
- data/asciidoc/examples/website/sample1.png +0 -0
- data/asciidoc/examples/website/sample3.png +0 -0
- data/asciidoc/examples/website/sample4.png +0 -0
- data/asciidoc/examples/website/source-highlight-filter.html +0 -286
- data/asciidoc/examples/website/source-highlight-filter.txt +0 -203
- data/asciidoc/examples/website/support.html +0 -78
- data/asciidoc/examples/website/support.txt +0 -5
- data/asciidoc/examples/website/toc.js +0 -69
- data/asciidoc/examples/website/userguide.html +0 -7460
- data/asciidoc/examples/website/userguide.txt +0 -4979
- data/asciidoc/examples/website/version83.txt +0 -37
- data/asciidoc/examples/website/version9.html +0 -143
- data/asciidoc/examples/website/version9.txt +0 -48
- data/asciidoc/examples/website/xhtml11-quirks.css +0 -41
- data/asciidoc/examples/website/xhtml11.css +0 -328
- data/asciidoc/stylesheets/xhtml11-manpage.css +0 -18
- data/asciidoc/stylesheets/xhtml11.css +0 -328
Binary file
|
@@ -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.
|
data/asciidoc/doc/latexmath.txt
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
Embedding LaTeX Math in AsciiDoc dblatex documents
|
2
2
|
==================================================
|
3
3
|
|
4
|
-
You can include
|
5
|
-
|
6
|
-
|
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 '
|
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 '
|
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 '
|
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 '
|
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
|
-
.
|
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
|
-
.
|
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:
|
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
|
-
-
|
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}
|
data/asciidoc/doc/main.aap
CHANGED
@@ -1,297 +1,233 @@
|
|
1
|
-
#####################################################################
|
2
|
-
#
|
3
|
-
# A-A-P file for making AsciiDoc distribution
|
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
@if _no.
|
81
|
-
:
|
82
|
-
@
|
83
|
-
:print WARNING:
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
opt += -
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
@
|
108
|
-
:
|
109
|
-
|
110
|
-
:
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
@
|
115
|
-
opt += -
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
:rule %.
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
#
|
131
|
-
#
|
132
|
-
|
133
|
-
:
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
:rule %.
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
:
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
:
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
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.
|