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
@@ -0,0 +1,189 @@
|
|
1
|
+
AsciiDoc API
|
2
|
+
============
|
3
|
+
|
4
|
+
'asciidocapi' -- a Python API module for 'AsciiDoc'.
|
5
|
+
|
6
|
+
|
7
|
+
Introduction
|
8
|
+
------------
|
9
|
+
The 'asciidocapi' module implements a Python API for AsciiDoc. It
|
10
|
+
allows you to set `asciidoc(1)` program options, compile an AsciiDoc
|
11
|
+
source file and then interrogate the results. The `asciidocapi.py`
|
12
|
+
module file contains the `AsciiDocAPI` wrapper class for
|
13
|
+
`asciidoc.py`.
|
14
|
+
|
15
|
+
.Benefits
|
16
|
+
- Stable API Shields the user from the undocumented and possibly
|
17
|
+
volatile `asciidoc.py` internals.
|
18
|
+
- Easier to use and more flexible than the alternative of running
|
19
|
+
`asciidoc(1)` as a separate process.
|
20
|
+
- Executes inside your application (better performance than running
|
21
|
+
separate `asciidoc(1)` command processes).
|
22
|
+
|
23
|
+
|
24
|
+
Using asciidocapi
|
25
|
+
-----------------
|
26
|
+
To use the API just drop the `asciidocapi.py` file into your
|
27
|
+
application directory, import it and use the `AsciiDocAPI` class. The
|
28
|
+
only requirement is that a compatible version of 'AsciiDoc' is already
|
29
|
+
installed -- simple, no setuptools to run, no Eggs to install, no
|
30
|
+
non-standard library dependencies.
|
31
|
+
|
32
|
+
You can find `asciidocapi.py` in the AsciiDoc
|
33
|
+
http://www.methods.co.nz/asciidoc/INSTALL.html#X1[distribution
|
34
|
+
archives] (version 8.4.1 or better).
|
35
|
+
|
36
|
+
Once you have `asciidocapi.py` Verify everything is working by running
|
37
|
+
the module doctests:
|
38
|
+
|
39
|
+
python asciidocapi.py
|
40
|
+
|
41
|
+
If there are no messages then all is well.
|
42
|
+
|
43
|
+
The following minimal example compiles `mydoc.txt` to `mydoc.html`:
|
44
|
+
|
45
|
+
[source,python]
|
46
|
+
-------------------------------------------------------------------------------
|
47
|
+
from asciidocapi import AsciiDocAPI
|
48
|
+
asciidoc = AsciiDocAPI()
|
49
|
+
asciidoc.execute('mydoc.txt')
|
50
|
+
-------------------------------------------------------------------------------
|
51
|
+
|
52
|
+
The next interactive example uses file-like objects for input and output:
|
53
|
+
|
54
|
+
-------------------------------------------------------------------------------
|
55
|
+
$ python
|
56
|
+
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
|
57
|
+
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
|
58
|
+
Type "help", "copyright", "credits" or "license" for more information.
|
59
|
+
>>> from asciidocapi import AsciiDocAPI
|
60
|
+
>>> import StringIO
|
61
|
+
>>> infile = StringIO.StringIO('Hello *{author}*')
|
62
|
+
>>> outfile = StringIO.StringIO()
|
63
|
+
>>> asciidoc = AsciiDocAPI()
|
64
|
+
>>> asciidoc.options('--no-header-footer')
|
65
|
+
>>> asciidoc.attributes['author'] = 'Joe Bloggs'
|
66
|
+
>>> asciidoc.execute(infile, outfile, backend='html4')
|
67
|
+
>>> print outfile.getvalue()
|
68
|
+
<p>Hello <strong>Joe Bloggs</strong></p>
|
69
|
+
|
70
|
+
>>>
|
71
|
+
-------------------------------------------------------------------------------
|
72
|
+
|
73
|
+
|
74
|
+
Implementation Rationale
|
75
|
+
------------------------
|
76
|
+
.Leverage existing knowledge
|
77
|
+
The API maps directly onto the `asciidoc(1)` command -- this is
|
78
|
+
deliberate -- if you know the `asciidoc(1)` command learning the API
|
79
|
+
will be trivial. A nice side effect of this goal is that API and
|
80
|
+
command-line modes share the same code -- virtually no `asciidoc(1)`
|
81
|
+
code is specific to API usage.
|
82
|
+
|
83
|
+
.Simplicity
|
84
|
+
Implemented with a single Python module file (`asciidocapi.py`)
|
85
|
+
containing the 'AsciiDocAPI' API class. 'AsciiDocAPI' contains just
|
86
|
+
one method plus a few attributes for processing options and result
|
87
|
+
messages. No external setup tools and no non-standard library
|
88
|
+
dependencies are used or required.
|
89
|
+
|
90
|
+
.Loose coupling
|
91
|
+
The dependency between `asciidocapi.py` and `asciidoc.py` is minimal
|
92
|
+
-- the current `asciidocapi.py` module uses only two attributes and
|
93
|
+
one function from the `asciidoc.py` module.
|
94
|
+
|
95
|
+
.Why isn't the API baked right into the asciidoc.py command script?
|
96
|
+
1. You can't just drop `asciidoc.py` into your application because it
|
97
|
+
requires all the related config files and filters -- complex and
|
98
|
+
unnecessary since all this was already done when you installed
|
99
|
+
AsciiDoc.
|
100
|
+
2. This scheme separates the API from the AsciiDoc application -- the
|
101
|
+
API implementation can be extended or replaced independently of
|
102
|
+
AsciiDoc.
|
103
|
+
|
104
|
+
|
105
|
+
API reference
|
106
|
+
-------------
|
107
|
+
|
108
|
+
[[X2]]
|
109
|
+
Class `AsciiDocAPI(object)`
|
110
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
111
|
+
This is the 'AsciiDoc' API class.
|
112
|
+
|
113
|
+
Instance attributes
|
114
|
+
^^^^^^^^^^^^^^^^^^^
|
115
|
+
`asciidoc`::
|
116
|
+
The imported `asciidoc.py` module.
|
117
|
+
|
118
|
+
`attributes`::
|
119
|
+
A dictionary of AsciiDoc attribute values passed to AsciiDoc.
|
120
|
+
|
121
|
+
- Setting an attribute value to `None` (`name: None`) will undefine
|
122
|
+
(delete) the attribute (this in addition to the `name!` attribute
|
123
|
+
name format that the `asciidoc(1)` command uses).
|
124
|
+
- To simply define an attribute set the attribute value to a blank
|
125
|
+
string (`name: ''`)
|
126
|
+
|
127
|
+
`cmd`::
|
128
|
+
The file path of the `asciidoc.py` script. Set by the `__init__`
|
129
|
+
method.
|
130
|
+
|
131
|
+
`messages`::
|
132
|
+
A chronologically ordered list of message strings generated during
|
133
|
+
AsciiDoc execution (last message at the end of the list).
|
134
|
+
|
135
|
+
`options`::
|
136
|
+
An instance of the <<X1,Options class>>. Contains a list of command
|
137
|
+
options passed to AsciiDoc.
|
138
|
+
|
139
|
+
Instance methods
|
140
|
+
^^^^^^^^^^^^^^^^
|
141
|
+
`__init__(self, asciidoc_py=None)`::
|
142
|
+
Locate and import `asciidoc.py` module and verify API compatibility.
|
143
|
+
Initialize instance attributes. A search for the `asciidoc` module is
|
144
|
+
made in the following order:
|
145
|
+
|
146
|
+
. Use the `ASCIIDOC_PY` environment variable if it is set.
|
147
|
+
. Use the `asciidoc_py` argument if it is set.
|
148
|
+
. Search the environment 'PATH' for `asciidoc.py`, `asciidoc.pyc` and
|
149
|
+
`asciidoc` (in that order).
|
150
|
+
. Finally repeat the previous search in the current working directory.
|
151
|
+
|
152
|
+
`execute(self, infile, outfile=None, backend=None)`::
|
153
|
+
Compile `infile` to `outfile` using `backend` format. `infile` and
|
154
|
+
`outfile` can be file path strings or file-like objects. `backend` is
|
155
|
+
name of 'AsciiDoc' backend (takes same values as `asciidoc(1)` command
|
156
|
+
`--backend` option). If `outfile` or `backend` are `None` then their
|
157
|
+
respective `asciidoc(1)` defaults are used.
|
158
|
+
|
159
|
+
|
160
|
+
[[X1]]
|
161
|
+
Class `Options(object)`
|
162
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
163
|
+
Stores `asciidoc(1)` command options. You can use any `asciidoc(1)`
|
164
|
+
options with the exception of the `--doctest` and `--filter` options.
|
165
|
+
|
166
|
+
Instance attributes
|
167
|
+
^^^^^^^^^^^^^^^^^^^
|
168
|
+
`values`::
|
169
|
+
The list of `(name,value)` command option tuples.
|
170
|
+
|
171
|
+
Instance methods
|
172
|
+
^^^^^^^^^^^^^^^^
|
173
|
+
`__call__(self, name, value=None)`::
|
174
|
+
A shortcut for the `append` method. Example:
|
175
|
+
|
176
|
+
opts = Options()
|
177
|
+
opts('--verbose')
|
178
|
+
|
179
|
+
`append(self, name, value=None)`::
|
180
|
+
Append `(name,value)` to the options list. Example:
|
181
|
+
|
182
|
+
opts = Options()
|
183
|
+
opts.append('--conf-file', 'blog.conf')
|
184
|
+
|
185
|
+
|
186
|
+
Class `AsciiDocError(Exception)`
|
187
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
188
|
+
Thrown by the <<X2,AsciiDocAPI class>> when an 'AsciiDoc' execution
|
189
|
+
error occurs.
|
@@ -17,14 +17,14 @@ characters to yield valid XHTML. To use ASCIIMathML:
|
|
17
17
|
2. Enclose ASCIIMathML formulas inside math or double-dollar
|
18
18
|
passthroughs or in math passthrough blocks.
|
19
19
|
|
20
|
-
Here's the link:
|
20
|
+
Here's the link:asciimathml.txt[AsciiDoc source] that generated this
|
21
21
|
page.
|
22
22
|
|
23
23
|
.NOTE
|
24
|
-
- When you use the
|
24
|
+
- When you use the `asciimath:[]` inline macro you need to escape `]`
|
25
25
|
characters in the formulas with a backslash, escaping is unnecessary
|
26
|
-
if you use the double-dollar macro (for examples see the
|
27
|
-
|
26
|
+
if you use the double-dollar macro (for examples see the second
|
27
|
+
formula below).
|
28
28
|
- See the
|
29
29
|
http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML]
|
30
30
|
website for ASCIIMathML documentation and the latest version.
|
@@ -35,30 +35,27 @@ page.
|
|
35
35
|
- See the link:latexmathml.html[LaTeXMathML page] if you prefer to use
|
36
36
|
LaTeX math formulas.
|
37
37
|
|
38
|
-
A list of formulas
|
38
|
+
A list of example formulas:
|
39
39
|
|
40
|
-
- asciimath:[[[a,b\],[c,d\]\]((n),(k))]
|
41
40
|
- $$`[[a,b],[c,d]]((n),(k))`$$
|
42
41
|
- asciimath:[x/x={(1,if x!=0),(text{undefined},if x=0):}]
|
43
42
|
- asciimath:[d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h]
|
44
|
-
-
|
43
|
+
- +++`sum_(i=1)\^n i=(n(n+1))/2`$+++ and *bold
|
45
44
|
asciimath:[int_0\^(pi/2) sinx\ dx=1]*
|
46
|
-
-
|
47
|
-
-
|
48
|
-
[blue,,2]##asciimath:[x^2+y_1+z_12^34]##.
|
49
|
-
- [green,yellow,4]##asciimath:[x^2+y_1+z_12^34]##
|
45
|
+
- asciimath:[(a,b\]={x in RR : a < x <= b}]
|
46
|
+
- asciimath:[x^2+y_1+z_12^34]
|
50
47
|
|
51
48
|
*********************************************************************
|
52
49
|
The first three terms factor to give
|
53
|
-
|
50
|
+
asciimath:[(x+b/(2a))^2=(b^2)/(4a^2)-c/a].
|
54
51
|
|
55
|
-
|
52
|
+
asciimath:[x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)].
|
56
53
|
|
57
54
|
Now we take square roots on both sides and get
|
58
|
-
|
59
|
-
move the
|
60
|
-
the two solutions:
|
61
|
-
|
55
|
+
asciimath:[x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)].
|
56
|
+
Finally we move the asciimath:[b/(2a)] to the right and simplify to
|
57
|
+
get the two solutions:
|
58
|
+
*asciimath:[x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)]*.
|
62
59
|
|
63
60
|
*********************************************************************
|
64
61
|
|
data/asciidoc/doc/book-multi.txt
CHANGED
@@ -1,155 +1,181 @@
|
|
1
|
-
Multi-Part Book Title Goes Here
|
2
|
-
===============================
|
3
|
-
Author's Name
|
4
|
-
v1.0,
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
The First
|
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
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
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
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
1
|
+
Multi-Part Book Title Goes Here
|
2
|
+
===============================
|
3
|
+
Author's Name
|
4
|
+
v1.0, 2003-12
|
5
|
+
:doctype: book
|
6
|
+
|
7
|
+
|
8
|
+
[dedication]
|
9
|
+
Example Dedication
|
10
|
+
==================
|
11
|
+
The optional dedication goes here.
|
12
|
+
|
13
|
+
This document is an AsciiDoc multi-part book skeleton containing
|
14
|
+
briefly annotated element placeholders plus a couple of example index
|
15
|
+
entries and footnotes. Books are normally used to generate DocBook
|
16
|
+
markup and the preface, appendix, bibliography, glossary and index
|
17
|
+
section titles are significant ('specialsections').
|
18
|
+
|
19
|
+
NOTE: Multi-part books differ from all other AsciiDoc document formats
|
20
|
+
in that top level sections (dedication, preface, book parts,
|
21
|
+
appendices, bibliography, glossary, index) must be level zero headings
|
22
|
+
(not level one).
|
23
|
+
|
24
|
+
|
25
|
+
[preface]
|
26
|
+
Example Preface
|
27
|
+
================
|
28
|
+
The optional book preface goes here at section level zero.
|
29
|
+
|
30
|
+
Preface Sub-section
|
31
|
+
~~~~~~~~~~~~~~~~~~~
|
32
|
+
NOTE: Preface and appendix subsections start out of sequence at level
|
33
|
+
2 (level 1 is skipped). This only applies to multi-part book
|
34
|
+
documents.
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
The First Part of the Book
|
39
|
+
==========================
|
40
|
+
|
41
|
+
[partintro]
|
42
|
+
.Optional part introduction title
|
43
|
+
--
|
44
|
+
Optional part introduction goes here.
|
45
|
+
--
|
46
|
+
|
47
|
+
The First Chapter
|
48
|
+
-----------------
|
49
|
+
Chapters can be grouped by preceeding them with a level 0 Book Part
|
50
|
+
title.
|
51
|
+
|
52
|
+
Book chapters are at level 1 and can contain sub-sections nested up to
|
53
|
+
three deep.
|
54
|
+
footnote:[An example footnote.]
|
55
|
+
indexterm:[Example index entry]
|
56
|
+
|
57
|
+
It's also worth noting that a book part can have it's own preface,
|
58
|
+
bibliography, glossary and index. Chapters can have their own
|
59
|
+
bibliography, glossary and index.
|
60
|
+
|
61
|
+
And now for something completely different: ((monkeys)), lions and
|
62
|
+
tigers (Bengal and Siberian) using the alternative syntax index
|
63
|
+
entries.
|
64
|
+
(((Big cats,Lions)))
|
65
|
+
(((Big cats,Tigers,Bengal Tiger)))
|
66
|
+
(((Big cats,Tigers,Siberian Tiger)))
|
67
|
+
Note that multi-entry terms generate separate index entries.
|
68
|
+
|
69
|
+
Here are a couple of image examples: an image:images/smallnew.png[]
|
70
|
+
example inline image followed by an example block image:
|
71
|
+
|
72
|
+
.Tiger block image
|
73
|
+
image::images/tiger.png[Tiger image]
|
74
|
+
|
75
|
+
Followed by an example table:
|
76
|
+
|
77
|
+
.An example table
|
78
|
+
[width="60%",options="header"]
|
79
|
+
|==============================================
|
80
|
+
| Option | Description
|
81
|
+
| -a 'USER GROUP' | Add 'USER' to 'GROUP'.
|
82
|
+
| -R 'GROUP' | Disables access to 'GROUP'.
|
83
|
+
|==============================================
|
84
|
+
|
85
|
+
.An example example
|
86
|
+
===============================================
|
87
|
+
Lorum ipum...
|
88
|
+
===============================================
|
89
|
+
|
90
|
+
[[X1]]
|
91
|
+
Sub-section with Anchor
|
92
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
93
|
+
Sub-section at level 2.
|
94
|
+
|
95
|
+
Chapter Sub-section
|
96
|
+
^^^^^^^^^^^^^^^^^^^
|
97
|
+
Sub-section at level 3.
|
98
|
+
|
99
|
+
Chapter Sub-section
|
100
|
+
+++++++++++++++++++
|
101
|
+
Sub-section at level 4.
|
102
|
+
|
103
|
+
This is the maximum sub-section depth supported by the distributed
|
104
|
+
AsciiDoc configuration.
|
105
|
+
footnote:[A second example footnote.]
|
106
|
+
|
107
|
+
|
108
|
+
The Second Chapter
|
109
|
+
------------------
|
110
|
+
An example link to anchor at start of the <<X1,first sub-section>>.
|
111
|
+
indexterm:[Second example index entry]
|
112
|
+
|
113
|
+
An example link to a bibliography entry <<taoup>>.
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
The Second Part of the Book
|
118
|
+
===========================
|
119
|
+
|
120
|
+
The First Chapter of the Second Part
|
121
|
+
------------------------------------
|
122
|
+
Chapters grouped into book parts are at level 1 and can contain
|
123
|
+
sub-sections.
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
:numbered!:
|
128
|
+
|
129
|
+
[appendix]
|
130
|
+
Example Appendix
|
131
|
+
================
|
132
|
+
One or more optional appendixes go here at section level zero.
|
133
|
+
|
134
|
+
Appendix Sub-section
|
135
|
+
~~~~~~~~~~~~~~~~~~~
|
136
|
+
NOTE: Preface and appendix subsections start out of sequence at level
|
137
|
+
2 (level 1 is skipped). This only applies to multi-part book
|
138
|
+
documents.
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
[bibliography]
|
143
|
+
Example Bibliography
|
144
|
+
====================
|
145
|
+
The bibliography list is a style of AsciiDoc bulleted list.
|
146
|
+
|
147
|
+
[bibliography]
|
148
|
+
- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix
|
149
|
+
Programming'. Addison-Wesley. ISBN 0-13-142901-9.
|
150
|
+
- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner.
|
151
|
+
'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999.
|
152
|
+
ISBN 1-56592-580-7.
|
153
|
+
|
154
|
+
|
155
|
+
[glossary]
|
156
|
+
Example Glossary
|
157
|
+
================
|
158
|
+
Glossaries are optional. Glossaries entries are an example of a style
|
159
|
+
of AsciiDoc labeled lists.
|
160
|
+
|
161
|
+
[glossary]
|
162
|
+
A glossary term::
|
163
|
+
The corresponding (indented) definition.
|
164
|
+
|
165
|
+
A second glossary term::
|
166
|
+
The corresponding (indented) definition.
|
167
|
+
|
168
|
+
|
169
|
+
[colophon]
|
170
|
+
Example Colophon
|
171
|
+
================
|
172
|
+
Text at the end of a book describing facts about its production.
|
173
|
+
|
174
|
+
|
175
|
+
[index]
|
176
|
+
Example Index
|
177
|
+
=============
|
178
|
+
////////////////////////////////////////////////////////////////
|
179
|
+
The index is normally left completely empty, it's contents are
|
180
|
+
generated automatically by the DocBook toolchain.
|
181
|
+
////////////////////////////////////////////////////////////////
|