asciidoctor-latex 1.5.0.3.dev → 1.5.0.4.dev
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +28 -5
- data/README.adoc +48 -23
- data/Rakefile +2 -1
- data/data/asciidoc_tex_macros.tex +86 -3
- data/data/extras.css +73 -1
- data/data/preamble_article.tex +15 -6
- data/data/preamble_book.tex +25 -9
- data/examples/README.adoc +341 -9
- data/examples/README.html +915 -0
- data/examples/math_article.adoc +46 -46
- data/examples/xref-equations.adoc +1 -2
- data/lib/asciidoctor-latex/click.css +2 -0
- data/lib/asciidoctor-latex/click.js +6 -0
- data/lib/asciidoctor-latex/jquery.js +4 -0
- data/lib/asciidoctor-latex/preamble_processor.rb +18 -0
- data/lib/asciidoctor/latex/click_block.rb +7 -4
- data/lib/asciidoctor/latex/converter.rb +75 -29
- data/lib/asciidoctor/latex/core_ext/utility.rb +55 -0
- data/lib/asciidoctor/latex/css.rb +50 -0
- data/lib/asciidoctor/latex/environment_block.rb +13 -6
- data/lib/asciidoctor/latex/inject_html.rb +2 -1
- data/lib/asciidoctor/latex/node_processors.rb +329 -152
- data/lib/asciidoctor/latex/prepend_processor.rb +1 -0
- data/lib/asciidoctor/latex/tex_postprocessor.rb +8 -3
- data/lib/asciidoctor/latex/tex_preprocessor.rb +31 -9
- data/lib/asciidoctor/latex/version.rb +1 -1
- data/test/examples/adoc/ampersand.adoc +2 -0
- data/test/examples/adoc/block_olist.adoc +58 -0
- data/test/examples/adoc/block_ulist.adoc +42 -0
- data/test/examples/adoc/box.adoc +35 -1
- data/test/examples/adoc/chem.adoc +8 -0
- data/test/examples/adoc/click_plain.adoc +24 -0
- data/test/examples/adoc/dlist.adoc +15 -0
- data/test/examples/adoc/env2.adoc +57 -0
- data/test/examples/adoc/env_joke.adoc +12 -0
- data/test/examples/adoc/env_plain.adoc +10 -0
- data/test/examples/adoc/eq-latex.adoc +39 -0
- data/test/examples/adoc/eq.adoc +18 -0
- data/test/examples/adoc/eq.tex +28 -0
- data/test/examples/adoc/eqalign.adoc +19 -6
- data/test/examples/adoc/eqalign.tex +25 -0
- data/test/examples/adoc/eqno-latex.adoc +120 -0
- data/test/examples/adoc/extras.adoc +14 -0
- data/test/examples/adoc/hypertarget.adoc +29 -0
- data/test/examples/adoc/image.adoc +7 -0
- data/test/examples/adoc/newEnvironments.tex +0 -0
- data/test/examples/adoc/table.adoc +6 -0
- data/test/examples/adoc/table.tex +10 -0
- data/test/examples/adoc/tex_pathologies.adoc +30 -0
- data/test/examples/html/env.html +147 -0
- data/test/examples/html/equations.html +14 -0
- data/test/examples/tex/ampersand.tex +2 -0
- data/test/examples/tex/block_admonition.tex +20 -0
- data/test/examples/tex/block_audio.tex +7 -0
- data/test/examples/tex/block_colist.tex +23 -0
- data/test/examples/tex/block_dlist.tex +117 -0
- data/test/examples/tex/block_example.tex +20 -0
- data/test/examples/tex/block_floating_title.tex +20 -0
- data/test/examples/tex/block_image.tex +46 -0
- data/test/examples/tex/block_listing.tex +59 -0
- data/test/examples/tex/block_literal.tex +28 -0
- data/test/examples/tex/block_olist.tex +119 -0
- data/test/examples/tex/block_open.tex +22 -0
- data/test/examples/tex/block_outline.tex +25 -0
- data/test/examples/tex/block_page_break.tex +4 -0
- data/test/examples/tex/block_paragraph.tex +13 -0
- data/test/examples/tex/block_pass.tex +3 -0
- data/test/examples/tex/block_preamble.tex +15 -0
- data/test/examples/tex/block_quote.tex +51 -0
- data/test/examples/tex/block_sidebar.tex +21 -0
- data/test/examples/tex/block_stem.tex +19 -0
- data/test/examples/tex/block_table.tex +188 -0
- data/test/examples/tex/block_thematic_break.tex +1 -0
- data/test/examples/tex/block_toc.tex +27 -0
- data/test/examples/tex/block_ulist.tex +96 -0
- data/test/examples/tex/block_verse.tex +39 -0
- data/test/examples/tex/block_video.tex +15 -0
- data/test/examples/tex/box.tex +25 -0
- data/test/examples/tex/chem.tex +7 -0
- data/test/examples/tex/click_plain.tex +25 -0
- data/test/examples/tex/dlist.tex +17 -0
- data/test/examples/tex/document.tex +25 -0
- data/test/examples/tex/embedded.tex +7 -0
- data/test/examples/tex/env.tex +7 -7
- data/test/examples/tex/env2.tex +29 -0
- data/test/examples/tex/env_joke.tex +9 -0
- data/test/examples/tex/env_plain.tex +7 -0
- data/test/examples/tex/eq-latex.tex +49 -0
- data/test/examples/tex/eq.tex +9 -0
- data/test/examples/tex/eqalign.tex +23 -0
- data/test/examples/tex/eqno-latex.tex +237 -0
- data/test/examples/tex/exponent1.tex +2 -0
- data/test/examples/tex/exponent2.tex +4 -0
- data/test/examples/tex/extras.tex +13 -0
- data/test/examples/tex/hypertarget.tex +25 -0
- data/test/examples/tex/image.tex +4 -0
- data/test/examples/tex/inline_anchor.tex +25 -0
- data/test/examples/tex/inline_break.tex +7 -0
- data/test/examples/tex/inline_button.tex +1 -0
- data/test/examples/tex/inline_callout.tex +4 -0
- data/test/examples/tex/inline_footnote.tex +9 -0
- data/test/examples/tex/inline_image.tex +25 -0
- data/test/examples/tex/inline_kbd.tex +3 -0
- data/test/examples/tex/inline_menu.tex +5 -0
- data/test/examples/tex/inline_quoted.tex +63 -0
- data/test/examples/tex/line_break.tex +4 -0
- data/test/examples/tex/listing.tex +10 -0
- data/test/examples/tex/literal.tex +42 -0
- data/test/examples/tex/macro_underscore.tex +6 -0
- data/test/examples/tex/math.tex +8 -0
- data/test/examples/tex/open_block.tex +10 -0
- data/test/examples/tex/page_break.tex +4 -0
- data/test/examples/tex/pass.tex +3 -0
- data/test/examples/tex/section.tex +51 -0
- data/test/examples/tex/sections.tex +13 -0
- data/test/examples/tex/table.tex +10 -0
- data/test/examples/tex/tex_pathologies.tex +26 -0
- data/test/examples/tex/zero.tex +1 -1
- metadata +188 -26
- data/examples/box.adoc +0 -16
- data/examples/chem.adoc +0 -17
- data/examples/eq-alignment.adoc +0 -5
- data/examples/eq-block.adoc +0 -60
- data/test/examples/adoc/admonition.adoc +0 -11
- data/test_jc/admonition.adoc +0 -4
- data/test_jc/click.adoc +0 -7
- data/test_jc/env.adoc +0 -31
- data/test_jc/example.adoc +0 -17
- data/test_jc/floating_title.adoc +0 -15
- data/test_jc/image.adoc +0 -84
- data/test_jc/images/frog.jpg +0 -0
- data/test_jc/images/red_frog.jpeg +0 -0
- data/test_jc/images/yellow_frog.jpeg +0 -0
- data/test_jc/listing.adoc +0 -9
- data/test_jc/lists.adoc +0 -20
- data/test_jc/math.adoc +0 -10
- data/test_jc/preamble.adoc +0 -14
- data/test_jc/section-numbered.adoc +0 -9
- data/test_jc/section.adoc +0 -7
- data/test_jc/sidebar.adoc +0 -61
- data/test_jc/verse.adoc +0 -15
data/data/preamble_book.tex
CHANGED
@@ -1,24 +1,36 @@
|
|
1
1
|
%% A minimal LaTeX preamble
|
2
|
+
%% Some packates are needed to implement
|
3
|
+
%% Asciidoc features
|
4
|
+
|
2
5
|
|
3
6
|
\documentclass[11pt]{amsbook}
|
4
7
|
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
|
5
8
|
\geometry{letterpaper} % ... or a4paper or a5paper or ...
|
6
9
|
%\geometry{landscape} % Activate for for rotated page geometry
|
10
|
+
|
11
|
+
\documentclass[11pt]{amsart}
|
12
|
+
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
|
13
|
+
\geometry{letterpaper} % ... or a4paper or a5paper or ...
|
14
|
+
%\geometry{landscape} % Activate for for rotated page geometry
|
7
15
|
%\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
|
8
|
-
|
9
|
-
\graphicspath{ {images/} }
|
10
|
-
\usepackage{wrapfig}
|
16
|
+
|
11
17
|
\usepackage{tcolorbox}
|
12
18
|
\usepackage{lipsum}
|
13
|
-
|
19
|
+
|
14
20
|
\usepackage{epstopdf}
|
15
21
|
\usepackage{color}
|
16
|
-
\usepackage{
|
22
|
+
% \usepackage[usenames, dvipsnames]{color}
|
23
|
+
% \usepackage{alltt}
|
24
|
+
|
25
|
+
|
26
|
+
\usepackage{amssymb}
|
27
|
+
% \usepackage{amsmath}
|
28
|
+
\usepackage{amsthm}
|
17
29
|
\usepackage[version=3]{mhchem}
|
18
|
-
|
30
|
+
|
19
31
|
|
20
32
|
% Needed to properly typeset
|
21
|
-
% standard unicode
|
33
|
+
% standard unicode characters:
|
22
34
|
%
|
23
35
|
\RequirePackage{fix-cm}
|
24
36
|
\usepackage{fontspec}
|
@@ -29,8 +41,9 @@
|
|
29
41
|
|
30
42
|
|
31
43
|
% \usepackage{fontspec}
|
32
|
-
|
33
|
-
|
44
|
+
% \usepackage{polyglossia}
|
45
|
+
% \setmainlanguage{en}
|
46
|
+
|
34
47
|
\usepackage{hyperref}
|
35
48
|
\hypersetup{
|
36
49
|
colorlinks=true,
|
@@ -39,6 +52,9 @@
|
|
39
52
|
urlcolor=cyan,
|
40
53
|
}
|
41
54
|
|
55
|
+
\usepackage{graphicx}
|
56
|
+
\usepackage{wrapfig}
|
57
|
+
\graphicspath{ {images/} }
|
42
58
|
\DeclareGraphicsExtensions{.png, .jpg, jpeg, .pdf}
|
43
59
|
|
44
60
|
%% \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
|
data/examples/README.adoc
CHANGED
@@ -1,12 +1,344 @@
|
|
1
|
-
|
1
|
+
:numbered:
|
2
|
+
:toc2:
|
3
|
+
:max-width: 900px;
|
2
4
|
|
5
|
+
:stem: latexmath
|
3
6
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
7
|
+
:adl: Asciidoc-LaTeX
|
8
|
+
:adlp: https://github.com/asciidoctor/asciidoctor-latex[Asciidoctor-LaTeX]
|
9
|
+
:ad: Asciidoc
|
10
|
+
:adp: http://asciidoctor.org[Asciidoctor]
|
11
|
+
:adlc: asciidoctor-latex
|
12
|
+
:tex: LaTeX
|
13
|
+
:html: HTML
|
8
14
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
15
|
+
== Introduction
|
16
|
+
|
17
|
+
{adp} is a processor for the {ad} markup language.
|
18
|
+
The aim of {adlp} is
|
19
|
+
|
20
|
+
. To render AsciiDoc documents as LaTeX.
|
21
|
+
|
22
|
+
. To add {tex}-like facilities to Asciidoctor
|
23
|
+
for handling mathematical notation when rendered as HTML
|
24
|
+
|
25
|
+
To begin, you can write inline mathematics
|
26
|
+
in the usual way, so that $a^2 + b^2 = c^2$
|
27
|
+
is rendered from `\$a^2 + b^2 = c^2\$`, and
|
28
|
+
the displayed formula
|
29
|
+
\[
|
30
|
+
\int_0^\infty e^{-x} dx = 1
|
31
|
+
\]
|
32
|
+
is rendered from
|
33
|
+
----
|
34
|
+
\[
|
35
|
+
\int_0^\infty e^{-x} dx = 1
|
36
|
+
\]
|
37
|
+
----
|
38
|
+
|
39
|
+
.Environments
|
40
|
+
{adl} has the `[env.FOO]` construct
|
41
|
+
which closely parallels
|
42
|
+
the LaTeX environment
|
43
|
+
construct `\begin{FOO}`.
|
44
|
+
Thus, the equation
|
45
|
+
[env.equation#euler]
|
46
|
+
--
|
47
|
+
\int_{|z| = 1} \frac{dz}{z} = 2\pi \sqrt{-1}
|
48
|
+
--
|
49
|
+
|
50
|
+
is written in {adl} as
|
51
|
+
|
52
|
+
----
|
53
|
+
[env.equation#euler]
|
54
|
+
--
|
55
|
+
\int_{|z| = 1} \frac{dz}{z} = 2\pi \sqrt{-1}
|
56
|
+
--
|
57
|
+
----
|
58
|
+
The text `#euler` is optional. If present,
|
59
|
+
it creates a label for cross-referencing
|
60
|
+
and it causes the equaton to be numbered.
|
61
|
+
If it is not present, the equation is not
|
62
|
+
numbered unless one says
|
63
|
+
`[env.equation%numbered]`. One could
|
64
|
+
refer to this equation as (<<euler>>)
|
65
|
+
or as equation <<euler>>, etc. by saying
|
66
|
+
----
|
67
|
+
(<<euler>>) or equation <<euler>>
|
68
|
+
----
|
69
|
+
|
70
|
+
|
71
|
+
Automatically numbered theorems, definitions, etc., are
|
72
|
+
written in the same way. Thus, the source
|
73
|
+
text
|
74
|
+
|
75
|
+
----
|
76
|
+
|
77
|
+
[env.theorem#th-pythag]
|
78
|
+
--
|
79
|
+
For a right triangle, the square on the hypotenuse is equal to the summ
|
80
|
+
of the squares of the two remaining sides, i.e.,
|
81
|
+
\[
|
82
|
+
c^2 = a^2 + b^2.
|
83
|
+
\]
|
84
|
+
--
|
85
|
+
----
|
86
|
+
|
87
|
+
renders as
|
88
|
+
|
89
|
+
[env.theorem#th-pythag]
|
90
|
+
--
|
91
|
+
For a right triangle, the square on the hypotenuse is equal to the summ
|
92
|
+
of the squares of the two remaining sides, i.e.,
|
93
|
+
\[
|
94
|
+
c^2 = a^2 + b^2.
|
95
|
+
\]
|
96
|
+
--
|
97
|
+
|
98
|
+
As with `[env.equation]`,
|
99
|
+
the optional string `#th-pythag` is a label for
|
100
|
+
purposes of cross-referencing:
|
101
|
+
----
|
102
|
+
<<th-pythag>>
|
103
|
+
----
|
104
|
+
Using the above code, we may later refer to <<th-pythag>>.
|
105
|
+
This mechanism applies in general to {ad}
|
106
|
+
text: `#foobar` defnes a label and `%baz`
|
107
|
+
sets an option. Thus `[env.theorem%no-number]`
|
108
|
+
results in an un-numbered theorem.
|
109
|
+
|
110
|
+
The `[env.code]` environment is another {adl}
|
111
|
+
environment that, like `[env.equation]`,
|
112
|
+
receives
|
113
|
+
special treatment. The source text
|
114
|
+
----
|
115
|
+
[env.code#iter]
|
116
|
+
--
|
117
|
+
def iter(f, a, n)
|
118
|
+
n.times do
|
119
|
+
a = f.call(a)
|
120
|
+
puts a
|
121
|
+
end
|
122
|
+
return a
|
123
|
+
end
|
124
|
+
--
|
125
|
+
----
|
126
|
+
is rendered as
|
127
|
+
|
128
|
+
[env.code#iter]
|
129
|
+
--
|
130
|
+
def iter(f, a, n)
|
131
|
+
n.times do
|
132
|
+
a = f.call(a)
|
133
|
+
puts a
|
134
|
+
end
|
135
|
+
return a
|
136
|
+
end
|
137
|
+
--
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
== First tests
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
Below are some examples
|
147
|
+
that you can run through
|
148
|
+
`asciidoctor-latex` at the command line.
|
149
|
+
We assume that you've already installed
|
150
|
+
{adlc} (see README for instructions).
|
151
|
+
Now try this
|
152
|
+
|
153
|
+
```
|
154
|
+
$ asciidoctor-latex -b html eq-latex.adoc
|
155
|
+
```
|
156
|
+
|
157
|
+
After running the above command, you should find the file `eq-latex.html`
|
158
|
+
next to the source file `eq-latex.adoc`. View it in your browser.
|
159
|
+
You will need to be connected to the internet so that your browser
|
160
|
+
can load the MathJax fonts used to render mathematical
|
161
|
+
notation.footnote:[You can also install the fonts on your system.
|
162
|
+
See http://www.mathjax.org/help/fonts/[mathjax-fonts]. this will give you faster reponse.
|
163
|
+
Turning off your internet connection makes it better still:-(]
|
164
|
+
|
165
|
+
To test the analogous file written in `stem` format,
|
166
|
+
do this:
|
167
|
+
|
168
|
+
```
|
169
|
+
$ asciidoctor-latex -b html -a stem eq-stem.adoc
|
170
|
+
```
|
171
|
+
The `-a` flag is used to set options,
|
172
|
+
just as the `-b` flag is used to set the
|
173
|
+
backend ({tex}, {html}, more in the future,
|
174
|
+
with {tex} the default).
|
175
|
+
Now convert the first file into {tex} by running the command
|
176
|
+
|
177
|
+
```
|
178
|
+
$ asciidoctor-latex eq-latex.adoc
|
179
|
+
```
|
180
|
+
|
181
|
+
|
182
|
+
If all was successful, there will be a file `eq-latex.tex` alongside
|
183
|
+
your source file `eq-latex.adoc`. You can process it as you
|
184
|
+
would any LaTeX file.
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
== Examples
|
191
|
+
|
192
|
+
Below is a list of files which demsonstrate various features
|
193
|
+
of the converter. In some cases there are two versions, e.g.
|
194
|
+
`eq-latex.adoc` and `eq-stem.adoc`, each written in the
|
195
|
+
indicated format.footnote:[A missing entry in the table
|
196
|
+
may mean that a feature has not yet been implemented,
|
197
|
+
or that the file demonstrating it has not yet been
|
198
|
+
written and/or tested.] In other cases,
|
199
|
+
the same file appears in both the LaTeX
|
200
|
+
and the STEM columns.
|
201
|
+
|
202
|
+
One of the best ways
|
203
|
+
of learning how to use the features of
|
204
|
+
Asciidotor LaTeX is to use your
|
205
|
+
natural talent for reverse-engineering:
|
206
|
+
run the example, the compare the rendered
|
207
|
+
file and its source.
|
208
|
+
|
209
|
+
[options=header, width=80%, align=center]
|
210
|
+
|===
|
211
|
+
| LaTeX | STEM | Comments
|
212
|
+
| `eq-latex.adoc` | `eq-stem.adoc` | Basic equations
|
213
|
+
| `eqno-latex.adoc` | -- | Numbered equations
|
214
|
+
| `theorem-latex.adoc` | -- | Numbered theorems
|
215
|
+
| `env.adoc` | `env.adoc` | Env blocks
|
216
|
+
| `click.adoc` | `click.adoc` | Click blocks
|
217
|
+
| `code.adoc` | code.adoc` | Code blocks
|
218
|
+
|===
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
== Comments on the examples
|
223
|
+
|
224
|
+
Just a few words about what is in each
|
225
|
+
test file.
|
226
|
+
|
227
|
+
=== eq-latex.adoc
|
228
|
+
|
229
|
+
Basic equations, both in-line
|
230
|
+
and displayed, as described
|
231
|
+
in the introduction.
|
232
|
+
|
233
|
+
=== theorem-latex.adoc
|
234
|
+
|
235
|
+
Theorems, definitions, etc., as described
|
236
|
+
in the introduction.
|
237
|
+
|
238
|
+
|
239
|
+
=== env.adoc
|
240
|
+
|
241
|
+
The file `env.adoc`,
|
242
|
+
illustrates general usage of the `env`-block. It gives
|
243
|
+
an automatically numbered and titled block. Thus repeated use
|
244
|
+
of `[env.objection]` gives this.
|
245
|
+
|
246
|
+
[env.objection]
|
247
|
+
--
|
248
|
+
This is hearsay.
|
249
|
+
--
|
250
|
+
|
251
|
+
[env.objection]
|
252
|
+
--
|
253
|
+
That evidence has not been admitted before the court.
|
254
|
+
--
|
255
|
+
|
256
|
+
The first objection was written like this:
|
257
|
+
|
258
|
+
----
|
259
|
+
[env.objection]
|
260
|
+
--
|
261
|
+
This is hearsay.
|
262
|
+
--
|
263
|
+
----
|
264
|
+
|
265
|
+
=== click.adoc
|
266
|
+
|
267
|
+
|
268
|
+
Click blocks are like `env`-blocks, except that
|
269
|
+
when you open a document, only the title,
|
270
|
+
not the body of the block, is displayed.
|
271
|
+
Click on the title to reveal the body;
|
272
|
+
clicking again will return the body
|
273
|
+
to its hidden sate. Click blocks
|
274
|
+
signal their presence by the blue
|
275
|
+
color of the title.
|
276
|
+
|
277
|
+
.Secret message
|
278
|
+
[click.message]
|
279
|
+
--
|
280
|
+
The path to wisdom is written on no
|
281
|
+
secret map.
|
282
|
+
--
|
283
|
+
|
284
|
+
Click blocks are useful in making up problem sets,
|
285
|
+
homework assignments, study guides, etc.
|
286
|
+
|
287
|
+
NOTE: There is bug which prevents click blocks
|
288
|
+
loaded as files from working properly --
|
289
|
+
they do work when laoded from a web server.
|
290
|
+
We are working on this. See
|
291
|
+
http://epsilon.my.noteshare.io/section/click-blocks[this document]
|
292
|
+
for an example.
|
293
|
+
|
294
|
+
|
295
|
+
=== code.adoc
|
296
|
+
|
297
|
+
Use `[code.adoc]` for code listings.
|
298
|
+
|
299
|
+
|
300
|
+
////
|
301
|
+
|
302
|
+
[env.code#iter]
|
303
|
+
--
|
304
|
+
def iter(f, a, n)
|
305
|
+
n.times do
|
306
|
+
a = f.call(a)
|
307
|
+
puts a
|
308
|
+
end
|
309
|
+
return a
|
310
|
+
end
|
311
|
+
--
|
312
|
+
|
313
|
+
.Results
|
314
|
+
[click.code%numbered]
|
315
|
+
--
|
316
|
+
irb> iter $g, 1.0, 6
|
317
|
+
1.5
|
318
|
+
1.4166666666666665
|
319
|
+
1.4142156862745097
|
320
|
+
1.4142135623746899
|
321
|
+
1.414213562373095
|
322
|
+
1.414213562373095
|
323
|
+
=> 1.414213562373095
|
324
|
+
--
|
325
|
+
////
|
326
|
+
|
327
|
+
== Issues
|
328
|
+
|
329
|
+
One should be able to tex this document wihout error
|
330
|
+
and obtain the desired output. This is very much a work
|
331
|
+
in progress. In particaulr, the following have not yet been resolved.
|
332
|
+
|
333
|
+
. Dollars signs used to illustrated command cause LaTeX to choke.
|
334
|
+
We need to map dollar sign to escaped dollar sig in
|
335
|
+
post-processing for tex. Or is there a better solution?
|
336
|
+
|
337
|
+
. The table block in Asciidoc is not implmented -- or rather,
|
338
|
+
is partially implemnted.
|
339
|
+
|
340
|
+
. The Click block is not implented in teh TeX output.
|
341
|
+
|
342
|
+
. The matrix environment in `eq-stem.adoc` does not render correctly.
|
343
|
+
|
344
|
+
. Fix title in latex mode
|
@@ -0,0 +1,915 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<meta name="generator" content="Asciidoctor 1.5.2">
|
8
|
+
<title>Introduction</title>
|
9
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400">
|
10
|
+
<style>
|
11
|
+
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
|
12
|
+
/* Remove the comments around the @import statement below when using this as a custom stylesheet */
|
13
|
+
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/
|
14
|
+
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
|
15
|
+
audio,canvas,video{display:inline-block}
|
16
|
+
audio:not([controls]){display:none;height:0}
|
17
|
+
[hidden],template{display:none}
|
18
|
+
script{display:none!important}
|
19
|
+
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
|
20
|
+
body{margin:0}
|
21
|
+
a{background:transparent}
|
22
|
+
a:focus{outline:thin dotted}
|
23
|
+
a:active,a:hover{outline:0}
|
24
|
+
h1{font-size:2em;margin:.67em 0}
|
25
|
+
abbr[title]{border-bottom:1px dotted}
|
26
|
+
b,strong{font-weight:bold}
|
27
|
+
dfn{font-style:italic}
|
28
|
+
hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
|
29
|
+
mark{background:#ff0;color:#000}
|
30
|
+
code,kbd,pre,samp{font-family:monospace;font-size:1em}
|
31
|
+
pre{white-space:pre-wrap}
|
32
|
+
q{quotes:"\201C" "\201D" "\2018" "\2019"}
|
33
|
+
small{font-size:80%}
|
34
|
+
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
|
35
|
+
sup{top:-.5em}
|
36
|
+
sub{bottom:-.25em}
|
37
|
+
img{border:0}
|
38
|
+
svg:not(:root){overflow:hidden}
|
39
|
+
figure{margin:0}
|
40
|
+
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
|
41
|
+
legend{border:0;padding:0}
|
42
|
+
button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
|
43
|
+
button,input{line-height:normal}
|
44
|
+
button,select{text-transform:none}
|
45
|
+
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
|
46
|
+
button[disabled],html input[disabled]{cursor:default}
|
47
|
+
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
|
48
|
+
input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
|
49
|
+
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}
|
50
|
+
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
|
51
|
+
textarea{overflow:auto;vertical-align:top}
|
52
|
+
table{border-collapse:collapse;border-spacing:0}
|
53
|
+
*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
|
54
|
+
html,body{font-size:100%}
|
55
|
+
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto}
|
56
|
+
a:hover{cursor:pointer}
|
57
|
+
img,object,embed{max-width:100%;height:auto}
|
58
|
+
object,embed{height:100%}
|
59
|
+
img{-ms-interpolation-mode:bicubic}
|
60
|
+
#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important}
|
61
|
+
.left{float:left!important}
|
62
|
+
.right{float:right!important}
|
63
|
+
.text-left{text-align:left!important}
|
64
|
+
.text-right{text-align:right!important}
|
65
|
+
.text-center{text-align:center!important}
|
66
|
+
.text-justify{text-align:justify!important}
|
67
|
+
.hide{display:none}
|
68
|
+
.antialiased,body{-webkit-font-smoothing:antialiased}
|
69
|
+
img{display:inline-block;vertical-align:middle}
|
70
|
+
textarea{height:auto;min-height:50px}
|
71
|
+
select{width:100%}
|
72
|
+
p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6}
|
73
|
+
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
|
74
|
+
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}
|
75
|
+
a{color:#2156a5;text-decoration:underline;line-height:inherit}
|
76
|
+
a:hover,a:focus{color:#1d4b8f}
|
77
|
+
a img{border:none}
|
78
|
+
p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
|
79
|
+
p aside{font-size:.875em;line-height:1.35;font-style:italic}
|
80
|
+
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
|
81
|
+
h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
|
82
|
+
h1{font-size:2.125em}
|
83
|
+
h2{font-size:1.6875em}
|
84
|
+
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
|
85
|
+
h4,h5{font-size:1.125em}
|
86
|
+
h6{font-size:1em}
|
87
|
+
hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
|
88
|
+
em,i{font-style:italic;line-height:inherit}
|
89
|
+
strong,b{font-weight:bold;line-height:inherit}
|
90
|
+
small{font-size:60%;line-height:inherit}
|
91
|
+
code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
|
92
|
+
ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
|
93
|
+
ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em}
|
94
|
+
ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
|
95
|
+
ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
|
96
|
+
ul.square{list-style-type:square}
|
97
|
+
ul.circle{list-style-type:circle}
|
98
|
+
ul.disc{list-style-type:disc}
|
99
|
+
ul.no-bullet{list-style:none}
|
100
|
+
ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
|
101
|
+
dl dt{margin-bottom:.3125em;font-weight:bold}
|
102
|
+
dl dd{margin-bottom:1.25em}
|
103
|
+
abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
|
104
|
+
abbr{text-transform:none}
|
105
|
+
blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
|
106
|
+
blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
|
107
|
+
blockquote cite:before{content:"\2014 \0020"}
|
108
|
+
blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
|
109
|
+
blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
|
110
|
+
@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
|
111
|
+
h1{font-size:2.75em}
|
112
|
+
h2{font-size:2.3125em}
|
113
|
+
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
|
114
|
+
h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
|
115
|
+
table thead,table tfoot{background:#f7f8f7;font-weight:bold}
|
116
|
+
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
|
117
|
+
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
|
118
|
+
table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7}
|
119
|
+
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}
|
120
|
+
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
|
121
|
+
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
|
122
|
+
.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table}
|
123
|
+
.clearfix:after,.float-group:after{clear:both}
|
124
|
+
*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
|
125
|
+
pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed}
|
126
|
+
.keyseq{color:rgba(51,51,51,.8)}
|
127
|
+
kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap}
|
128
|
+
.keyseq kbd:first-child{margin-left:0}
|
129
|
+
.keyseq kbd:last-child{margin-right:0}
|
130
|
+
.menuseq,.menu{color:rgba(0,0,0,.8)}
|
131
|
+
b.button:before,b.button:after{position:relative;top:-1px;font-weight:400}
|
132
|
+
b.button:before{content:"[";padding:0 3px 0 2px}
|
133
|
+
b.button:after{content:"]";padding:0 2px 0 3px}
|
134
|
+
p a>code:hover{color:rgba(0,0,0,.9)}
|
135
|
+
#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
|
136
|
+
#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table}
|
137
|
+
#header:after,#content:after,#footnotes:after,#footer:after{clear:both}
|
138
|
+
#content{margin-top:1.25em}
|
139
|
+
#content:before{content:none}
|
140
|
+
#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
|
141
|
+
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8}
|
142
|
+
#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px}
|
143
|
+
#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
|
144
|
+
#header .details span:first-child{margin-left:-.125em}
|
145
|
+
#header .details span.email a{color:rgba(0,0,0,.85)}
|
146
|
+
#header .details br{display:none}
|
147
|
+
#header .details br+span:before{content:"\00a0\2013\00a0"}
|
148
|
+
#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
|
149
|
+
#header .details br+span#revremark:before{content:"\00a0|\00a0"}
|
150
|
+
#header #revnumber{text-transform:capitalize}
|
151
|
+
#header #revnumber:after{content:"\00a0"}
|
152
|
+
#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
|
153
|
+
#toc{border-bottom:1px solid #efefed;padding-bottom:.5em}
|
154
|
+
#toc>ul{margin-left:.125em}
|
155
|
+
#toc ul.sectlevel0>li>a{font-style:italic}
|
156
|
+
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
|
157
|
+
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
|
158
|
+
#toc a{text-decoration:none}
|
159
|
+
#toc a:active{text-decoration:underline}
|
160
|
+
#toctitle{color:#7a2518;font-size:1.2em}
|
161
|
+
@media only screen and (min-width:768px){#toctitle{font-size:1.375em}
|
162
|
+
body.toc2{padding-left:15em;padding-right:0}
|
163
|
+
#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
|
164
|
+
#toc.toc2 #toctitle{margin-top:0;font-size:1.2em}
|
165
|
+
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
|
166
|
+
#toc.toc2 ul ul{margin-left:0;padding-left:1em}
|
167
|
+
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
|
168
|
+
body.toc2.toc-right{padding-left:0;padding-right:15em}
|
169
|
+
body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
|
170
|
+
#toc.toc2{width:20em}
|
171
|
+
#toc.toc2 #toctitle{font-size:1.375em}
|
172
|
+
#toc.toc2>ul{font-size:.95em}
|
173
|
+
#toc.toc2 ul ul{padding-left:1.25em}
|
174
|
+
body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
|
175
|
+
#content #toc>:first-child{margin-top:0}
|
176
|
+
#content #toc>:last-child{margin-bottom:0}
|
177
|
+
#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em}
|
178
|
+
#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
|
179
|
+
.sect1{padding-bottom:.625em}
|
180
|
+
@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed}
|
181
|
+
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
|
182
|
+
#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
|
183
|
+
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
|
184
|
+
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
|
185
|
+
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
|
186
|
+
.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
|
187
|
+
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
|
188
|
+
table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0}
|
189
|
+
.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)}
|
190
|
+
table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit}
|
191
|
+
.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
|
192
|
+
.admonitionblock>table td.icon{text-align:center;width:80px}
|
193
|
+
.admonitionblock>table td.icon img{max-width:none}
|
194
|
+
.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
|
195
|
+
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)}
|
196
|
+
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
|
197
|
+
.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
|
198
|
+
.exampleblock>.content>:first-child{margin-top:0}
|
199
|
+
.exampleblock>.content>:last-child{margin-bottom:0}
|
200
|
+
.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
|
201
|
+
.sidebarblock>:first-child{margin-top:0}
|
202
|
+
.sidebarblock>:last-child{margin-bottom:0}
|
203
|
+
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
|
204
|
+
.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
|
205
|
+
.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8}
|
206
|
+
.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1}
|
207
|
+
.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em}
|
208
|
+
.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal}
|
209
|
+
@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
|
210
|
+
.listingblock pre.highlightjs{padding:0}
|
211
|
+
.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
|
212
|
+
.listingblock pre.prettyprint{border-width:0}
|
213
|
+
.listingblock>.content{position:relative}
|
214
|
+
.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999}
|
215
|
+
.listingblock:hover code[data-lang]:before{display:block}
|
216
|
+
.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999}
|
217
|
+
.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"}
|
218
|
+
table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none}
|
219
|
+
table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0}
|
220
|
+
table.pyhltable td.code{padding-left:.75em;padding-right:0}
|
221
|
+
pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8}
|
222
|
+
pre.pygments .lineno{display:inline-block;margin-right:.25em}
|
223
|
+
table.pyhltable .linenodiv{background:none!important;padding-right:0!important}
|
224
|
+
.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
|
225
|
+
.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em}
|
226
|
+
.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
|
227
|
+
.quoteblock blockquote{margin:0;padding:0;border:0}
|
228
|
+
.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
|
229
|
+
.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
|
230
|
+
.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right}
|
231
|
+
.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)}
|
232
|
+
.quoteblock .quoteblock blockquote{padding:0 0 0 .75em}
|
233
|
+
.quoteblock .quoteblock blockquote:before{display:none}
|
234
|
+
.verseblock{margin:0 1em 1.25em 1em}
|
235
|
+
.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
|
236
|
+
.verseblock pre strong{font-weight:400}
|
237
|
+
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
|
238
|
+
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
|
239
|
+
.quoteblock .attribution br,.verseblock .attribution br{display:none}
|
240
|
+
.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)}
|
241
|
+
.quoteblock.abstract{margin:0 0 1.25em 0;display:block}
|
242
|
+
.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0}
|
243
|
+
.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none}
|
244
|
+
table.tableblock{max-width:100%;border-collapse:separate}
|
245
|
+
table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0}
|
246
|
+
table.spread{width:100%}
|
247
|
+
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
|
248
|
+
table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0}
|
249
|
+
table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0}
|
250
|
+
table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0}
|
251
|
+
table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0}
|
252
|
+
table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0}
|
253
|
+
table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0}
|
254
|
+
table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0}
|
255
|
+
table.frame-all{border-width:1px}
|
256
|
+
table.frame-sides{border-width:0 1px}
|
257
|
+
table.frame-topbot{border-width:1px 0}
|
258
|
+
th.halign-left,td.halign-left{text-align:left}
|
259
|
+
th.halign-right,td.halign-right{text-align:right}
|
260
|
+
th.halign-center,td.halign-center{text-align:center}
|
261
|
+
th.valign-top,td.valign-top{vertical-align:top}
|
262
|
+
th.valign-bottom,td.valign-bottom{vertical-align:bottom}
|
263
|
+
th.valign-middle,td.valign-middle{vertical-align:middle}
|
264
|
+
table thead th,table tfoot th{font-weight:bold}
|
265
|
+
tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7}
|
266
|
+
tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
|
267
|
+
p.tableblock>code:only-child{background:none;padding:0}
|
268
|
+
p.tableblock{font-size:1em}
|
269
|
+
td>div.verse{white-space:pre}
|
270
|
+
ol{margin-left:1.75em}
|
271
|
+
ul li ol{margin-left:1.5em}
|
272
|
+
dl dd{margin-left:1.125em}
|
273
|
+
dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
|
274
|
+
ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
|
275
|
+
ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none}
|
276
|
+
ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em}
|
277
|
+
ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em}
|
278
|
+
ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px}
|
279
|
+
ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden}
|
280
|
+
ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block}
|
281
|
+
ul.inline>li>*{display:block}
|
282
|
+
.unstyled dl dt{font-weight:400;font-style:normal}
|
283
|
+
ol.arabic{list-style-type:decimal}
|
284
|
+
ol.decimal{list-style-type:decimal-leading-zero}
|
285
|
+
ol.loweralpha{list-style-type:lower-alpha}
|
286
|
+
ol.upperalpha{list-style-type:upper-alpha}
|
287
|
+
ol.lowerroman{list-style-type:lower-roman}
|
288
|
+
ol.upperroman{list-style-type:upper-roman}
|
289
|
+
ol.lowergreek{list-style-type:lower-greek}
|
290
|
+
.hdlist>table,.colist>table{border:0;background:none}
|
291
|
+
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
|
292
|
+
td.hdlist1{padding-right:.75em;font-weight:bold}
|
293
|
+
td.hdlist1,td.hdlist2{vertical-align:top}
|
294
|
+
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
|
295
|
+
.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1}
|
296
|
+
.colist>table tr>td:last-of-type{padding:.25em 0}
|
297
|
+
.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
|
298
|
+
.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0}
|
299
|
+
.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em}
|
300
|
+
.imageblock>.title{margin-bottom:0}
|
301
|
+
.imageblock.thumb,.imageblock.th{border-width:6px}
|
302
|
+
.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
|
303
|
+
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
|
304
|
+
.image.left{margin-right:.625em}
|
305
|
+
.image.right{margin-left:.625em}
|
306
|
+
a.image{text-decoration:none}
|
307
|
+
span.footnote,span.footnoteref{vertical-align:super;font-size:.875em}
|
308
|
+
span.footnote a,span.footnoteref a{text-decoration:none}
|
309
|
+
span.footnote a:active,span.footnoteref a:active{text-decoration:underline}
|
310
|
+
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
|
311
|
+
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0}
|
312
|
+
#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em}
|
313
|
+
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none}
|
314
|
+
#footnotes .footnote:last-of-type{margin-bottom:0}
|
315
|
+
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
|
316
|
+
.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
|
317
|
+
.gist .file-data>table td.line-data{width:99%}
|
318
|
+
div.unbreakable{page-break-inside:avoid}
|
319
|
+
.big{font-size:larger}
|
320
|
+
.small{font-size:smaller}
|
321
|
+
.underline{text-decoration:underline}
|
322
|
+
.overline{text-decoration:overline}
|
323
|
+
.line-through{text-decoration:line-through}
|
324
|
+
.aqua{color:#00bfbf}
|
325
|
+
.aqua-background{background-color:#00fafa}
|
326
|
+
.black{color:#000}
|
327
|
+
.black-background{background-color:#000}
|
328
|
+
.blue{color:#0000bf}
|
329
|
+
.blue-background{background-color:#0000fa}
|
330
|
+
.fuchsia{color:#bf00bf}
|
331
|
+
.fuchsia-background{background-color:#fa00fa}
|
332
|
+
.gray{color:#606060}
|
333
|
+
.gray-background{background-color:#7d7d7d}
|
334
|
+
.green{color:#006000}
|
335
|
+
.green-background{background-color:#007d00}
|
336
|
+
.lime{color:#00bf00}
|
337
|
+
.lime-background{background-color:#00fa00}
|
338
|
+
.maroon{color:#600000}
|
339
|
+
.maroon-background{background-color:#7d0000}
|
340
|
+
.navy{color:#000060}
|
341
|
+
.navy-background{background-color:#00007d}
|
342
|
+
.olive{color:#606000}
|
343
|
+
.olive-background{background-color:#7d7d00}
|
344
|
+
.purple{color:#600060}
|
345
|
+
.purple-background{background-color:#7d007d}
|
346
|
+
.red{color:#bf0000}
|
347
|
+
.red-background{background-color:#fa0000}
|
348
|
+
.silver{color:#909090}
|
349
|
+
.silver-background{background-color:#bcbcbc}
|
350
|
+
.teal{color:#006060}
|
351
|
+
.teal-background{background-color:#007d7d}
|
352
|
+
.white{color:#bfbfbf}
|
353
|
+
.white-background{background-color:#fafafa}
|
354
|
+
.yellow{color:#bfbf00}
|
355
|
+
.yellow-background{background-color:#fafa00}
|
356
|
+
span.icon>.fa{cursor:default}
|
357
|
+
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
|
358
|
+
.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c}
|
359
|
+
.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
|
360
|
+
.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900}
|
361
|
+
.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400}
|
362
|
+
.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000}
|
363
|
+
.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
|
364
|
+
.conum[data-value] *{color:#fff!important}
|
365
|
+
.conum[data-value]+b{display:none}
|
366
|
+
.conum[data-value]:after{content:attr(data-value)}
|
367
|
+
pre .conum[data-value]{position:relative;top:-.125em}
|
368
|
+
b.conum *{color:inherit!important}
|
369
|
+
.conum:not([data-value]):empty{display:none}
|
370
|
+
h1,h2{letter-spacing:-.01em}
|
371
|
+
dt,th.tableblock,td.content{text-rendering:optimizeLegibility}
|
372
|
+
p,td.content{letter-spacing:-.01em}
|
373
|
+
p strong,td.content strong{letter-spacing:-.005em}
|
374
|
+
p,blockquote,dt,td.content{font-size:1.0625rem}
|
375
|
+
p{margin-bottom:1.25rem}
|
376
|
+
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
|
377
|
+
.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
|
378
|
+
.print-only{display:none!important}
|
379
|
+
@media print{@page{margin:1.25cm .75cm}
|
380
|
+
*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
|
381
|
+
a{color:inherit!important;text-decoration:underline!important}
|
382
|
+
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
|
383
|
+
a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
|
384
|
+
abbr[title]:after{content:" (" attr(title) ")"}
|
385
|
+
pre,blockquote,tr,img{page-break-inside:avoid}
|
386
|
+
thead{display:table-header-group}
|
387
|
+
img{max-width:100%!important}
|
388
|
+
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
|
389
|
+
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
|
390
|
+
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
|
391
|
+
#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important}
|
392
|
+
.sect1{padding-bottom:0!important}
|
393
|
+
.sect1+.sect1{border:0!important}
|
394
|
+
#header>h1:first-child{margin-top:1.25rem}
|
395
|
+
body.book #header{text-align:center}
|
396
|
+
body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0}
|
397
|
+
body.book #header .details{border:0!important;display:block;padding:0!important}
|
398
|
+
body.book #header .details span:first-child{margin-left:0!important}
|
399
|
+
body.book #header .details br{display:block}
|
400
|
+
body.book #header .details br+span:before{content:none!important}
|
401
|
+
body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
|
402
|
+
body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
|
403
|
+
.listingblock code[data-lang]:before{display:block}
|
404
|
+
#footer{background:none!important;padding:0 .9375em}
|
405
|
+
#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em}
|
406
|
+
.hide-on-print{display:none!important}
|
407
|
+
.print-only{display:block!important}
|
408
|
+
.hide-for-print{display:none!important}
|
409
|
+
.show-for-print{display:inherit!important}}
|
410
|
+
</style>
|
411
|
+
<script type="text/x-mathjax-config">
|
412
|
+
MathJax.Hub.Config({
|
413
|
+
tex2jax: {
|
414
|
+
inlineMath: [["\\(", "\\)"]],
|
415
|
+
displayMath: [["\\[", "\\]"]],
|
416
|
+
ignoreClass: "nostem|nolatexmath"
|
417
|
+
},
|
418
|
+
asciimath2jax: {
|
419
|
+
delimiters: [["\\$", "\\$"]],
|
420
|
+
ignoreClass: "nostem|noasciimath"
|
421
|
+
},
|
422
|
+
TeX: { extensions: ["mhchem.js"] }
|
423
|
+
});
|
424
|
+
</script>
|
425
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.4.0/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
|
426
|
+
|
427
|
+
<style>
|
428
|
+
.click .title { color: blue; }
|
429
|
+
.openblock>.box>.content { margin-top:1em;margin-bottom: 1em;margin-left:3em;margin-right:4em; }
|
430
|
+
</style>
|
431
|
+
|
432
|
+
|
433
|
+
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
|
434
|
+
|
435
|
+
<script>
|
436
|
+
|
437
|
+
$(document).ready(function(){
|
438
|
+
$('.openblock.click').click( function() { $(this).find('.content').slideToggle('200');
|
439
|
+
$.reloadMathJax() } )
|
440
|
+
$('.openblock.click').find('.content').hide()
|
441
|
+
});
|
442
|
+
|
443
|
+
$(document).ready(function(){
|
444
|
+
$('.listingblock.click').click( function() { $(this).find('.content').slideToggle('200') } )
|
445
|
+
$('.listingblock.click').find('.content').hide()
|
446
|
+
});
|
447
|
+
|
448
|
+
|
449
|
+
$(document).ready(ready);
|
450
|
+
$(document).on('page:load', ready);
|
451
|
+
</script>
|
452
|
+
|
453
|
+
</head>
|
454
|
+
|
455
|
+
|
456
|
+
<body class="article toc2 toc-left" style="max-width: 900px;;">
|
457
|
+
<div id="header">
|
458
|
+
<div id="toc" class="toc2">
|
459
|
+
<div id="toctitle">Table of Contents</div>
|
460
|
+
<ul class="sectlevel1">
|
461
|
+
<li><a href="#_introduction">1. Introduction</a></li>
|
462
|
+
<li><a href="#_first_tests">2. First tests</a></li>
|
463
|
+
<li><a href="#_examples">3. Examples</a></li>
|
464
|
+
<li><a href="#_comments_on_the_examples">4. Comments on the examples</a>
|
465
|
+
<ul class="sectlevel2">
|
466
|
+
<li><a href="#_eq_latex_adoc">4.1. eq-latex.adoc</a></li>
|
467
|
+
<li><a href="#_theorem_latex_adoc">4.2. theorem-latex.adoc</a></li>
|
468
|
+
<li><a href="#_env_adoc">4.3. env.adoc</a></li>
|
469
|
+
<li><a href="#_click_adoc">4.4. click.adoc</a></li>
|
470
|
+
<li><a href="#_code_adoc">4.5. code.adoc</a></li>
|
471
|
+
</ul>
|
472
|
+
</li>
|
473
|
+
<li><a href="#_issues">5. Issues</a></li>
|
474
|
+
</ul>
|
475
|
+
</div>
|
476
|
+
</div>
|
477
|
+
<div id="content">
|
478
|
+
<div class="sect1">
|
479
|
+
<h2 id="_introduction">1. Introduction</h2>
|
480
|
+
<div class="sectionbody">
|
481
|
+
<div class="paragraph">
|
482
|
+
<p><a href=http://asciidoctor.org>Asciidoctor</a> is a processor for the Asciidoc markup language.
|
483
|
+
The aim of <a href=https://github.com/asciidoctor/asciidoctor-latex>Asciidoctor-LaTeX</a> is</p>
|
484
|
+
</div>
|
485
|
+
<div class="olist arabic">
|
486
|
+
<ol class="arabic">
|
487
|
+
<li>
|
488
|
+
<p>To render AsciiDoc documents as LaTeX.</p>
|
489
|
+
</li>
|
490
|
+
<li>
|
491
|
+
<p>To add LaTeX-like facilities to Asciidoctor
|
492
|
+
for handling mathematical notation when rendered as HTML</p>
|
493
|
+
</li>
|
494
|
+
</ol>
|
495
|
+
</div>
|
496
|
+
<div class="paragraph">
|
497
|
+
<p>To begin, you can write inline mathematics
|
498
|
+
in the usual way, so that \(a^2 + b^2 = c^2\)
|
499
|
+
is rendered from <code>$a^2 + b^2 = c^2$</code>, and
|
500
|
+
the displayed formula
|
501
|
+
\[
|
502
|
+
\int_0^\infty e^{-x} dx = 1
|
503
|
+
\]
|
504
|
+
is rendered from</p>
|
505
|
+
</div>
|
506
|
+
<div class="listingblock">
|
507
|
+
<div class="content">
|
508
|
+
<pre> \[
|
509
|
+
\int_0^\infty e^{-x} dx = 1
|
510
|
+
\]</pre>
|
511
|
+
</div>
|
512
|
+
</div>
|
513
|
+
<div class="paragraph">
|
514
|
+
<div class="title">Environments</div>
|
515
|
+
<p>Asciidoc-LaTeX has the <code>[env.FOO]</code> construct
|
516
|
+
which closely parallels
|
517
|
+
the LaTeX environment
|
518
|
+
construct <code>\begin{FOO}</code>.
|
519
|
+
Thus, the equation</p>
|
520
|
+
</div>
|
521
|
+
<div id="euler" class="openblock equation">
|
522
|
+
<div class="content">
|
523
|
+
<table style="width:100%; border-collapse:collapse;border:0" class="zero" ><tr style="border-collapse: collapse; border:0; font-size: 12pt; ">
|
524
|
+
<td style="width:100%";>
|
525
|
+
\[
|
526
|
+
\int_{|z| = 1} \frac{dz}{z} = 2\pi \sqrt{-1}
|
527
|
+
\]
|
528
|
+
</td>
|
529
|
+
<td style="text-align:right">(1) </td>
|
530
|
+
</tr></table>
|
531
|
+
</div>
|
532
|
+
</div>
|
533
|
+
<div class="paragraph">
|
534
|
+
<p>is written in Asciidoc-LaTeX as</p>
|
535
|
+
</div>
|
536
|
+
<div class="listingblock">
|
537
|
+
<div class="content">
|
538
|
+
<pre>[env.equation#euler]
|
539
|
+
--
|
540
|
+
\int_{|z| = 1} \frac{dz}{z} = 2\pi \sqrt{-1}
|
541
|
+
--</pre>
|
542
|
+
</div>
|
543
|
+
</div>
|
544
|
+
<div class="paragraph">
|
545
|
+
<p>The text <code>#euler</code> is optional. If present,
|
546
|
+
it creates a label for cross-referencing
|
547
|
+
and it causes the equaton to be numbered.
|
548
|
+
If it is not present, the equation is not
|
549
|
+
numbered unless one says
|
550
|
+
<code>[env.equation%numbered]</code>. One could
|
551
|
+
refer to this equation as (<span><a href=#euler style='text-decoration:none'>1</a></span>)
|
552
|
+
or as equation <span><a href=#euler style='text-decoration:none'>1</a></span>, etc. by saying</p>
|
553
|
+
</div>
|
554
|
+
<div class="listingblock">
|
555
|
+
<div class="content">
|
556
|
+
<pre> (<<euler>>) or equation <<euler>></pre>
|
557
|
+
</div>
|
558
|
+
</div>
|
559
|
+
<div class="paragraph">
|
560
|
+
<p>Automatically numbered theorems, definitions, etc., are
|
561
|
+
written in the same way. Thus, the source
|
562
|
+
text</p>
|
563
|
+
</div>
|
564
|
+
<div class="listingblock">
|
565
|
+
<div class="content">
|
566
|
+
<pre>[env.theorem#th-pythag]
|
567
|
+
--
|
568
|
+
For a right triangle, the square on the hypotenuse is equal to the summ
|
569
|
+
of the squares of the two remaining sides, i.e.,
|
570
|
+
\[
|
571
|
+
c^2 = a^2 + b^2.
|
572
|
+
\]
|
573
|
+
--</pre>
|
574
|
+
</div>
|
575
|
+
</div>
|
576
|
+
<div class="paragraph">
|
577
|
+
<p>renders as</p>
|
578
|
+
</div>
|
579
|
+
<div id="th-pythag" class="openblock theorem">
|
580
|
+
<div class="title">Theorem 1.</div><div class="content">
|
581
|
+
<div style='line-height:1.5em;font-size:1.05em;font-style:oblique;margin-bottom:1.5em'>
|
582
|
+
For a right triangle, the square on the hypotenuse is equal to the summ
|
583
|
+
of the squares of the two remaining sides, i.e.,
|
584
|
+
\[
|
585
|
+
c^2 = a^2 + b^2.
|
586
|
+
\]
|
587
|
+
</div>
|
588
|
+
</div>
|
589
|
+
</div>
|
590
|
+
<div class="paragraph">
|
591
|
+
<p>As with <code>[env.equation]</code>,
|
592
|
+
the optional string <code>#th-pythag</code> is a label for
|
593
|
+
purposes of cross-referencing:</p>
|
594
|
+
</div>
|
595
|
+
<div class="listingblock">
|
596
|
+
<div class="content">
|
597
|
+
<pre> <<th-pythag>></pre>
|
598
|
+
</div>
|
599
|
+
</div>
|
600
|
+
<div class="paragraph">
|
601
|
+
<p>Using the above code, we may later refer to <span><a href=#th-pythag style='text-decoration:none'>Theorem 1</a></span>.
|
602
|
+
This mechanism applies in general to Asciidoc
|
603
|
+
text: <code>#foobar</code> defnes a label and <code>%baz</code>
|
604
|
+
sets an option. Thus <code>[env.theorem%no-number]</code>
|
605
|
+
results in an un-numbered theorem.</p>
|
606
|
+
</div>
|
607
|
+
<div class="paragraph">
|
608
|
+
<p>The <code>[env.code]</code> environment is another Asciidoc-LaTeX
|
609
|
+
environment that, like <code>[env.equation]</code>,
|
610
|
+
receives
|
611
|
+
special treatment. The source text</p>
|
612
|
+
</div>
|
613
|
+
<div class="listingblock">
|
614
|
+
<div class="content">
|
615
|
+
<pre>[env.code#iter]
|
616
|
+
--
|
617
|
+
def iter(f, a, n)
|
618
|
+
n.times do
|
619
|
+
a = f.call(a)
|
620
|
+
puts a
|
621
|
+
end
|
622
|
+
return a
|
623
|
+
end
|
624
|
+
--</pre>
|
625
|
+
</div>
|
626
|
+
</div>
|
627
|
+
<div class="paragraph">
|
628
|
+
<p>is rendered as</p>
|
629
|
+
</div>
|
630
|
+
<div id="iter" class="listingblock code">
|
631
|
+
<div class="title">Listing 1.</div>
|
632
|
+
<div class="content">
|
633
|
+
<pre>def iter(f, a, n)
|
634
|
+
n.times do
|
635
|
+
a = f.call(a)
|
636
|
+
puts a
|
637
|
+
end
|
638
|
+
return a
|
639
|
+
end</pre>
|
640
|
+
</div>
|
641
|
+
</div>
|
642
|
+
</div>
|
643
|
+
</div>
|
644
|
+
<div class="sect1">
|
645
|
+
<h2 id="_first_tests">2. First tests</h2>
|
646
|
+
<div class="sectionbody">
|
647
|
+
<div class="paragraph">
|
648
|
+
<p>Below are some examples
|
649
|
+
that you can run through
|
650
|
+
<code>asciidoctor-latex</code> at the command line.
|
651
|
+
We assume that you’ve already installed
|
652
|
+
asciidoctor-latex (see README for instructions).
|
653
|
+
Now try this</p>
|
654
|
+
</div>
|
655
|
+
<div class="listingblock">
|
656
|
+
<div class="content">
|
657
|
+
<pre class="highlight"><code> $ asciidoctor-latex -b html eq-latex.adoc</code></pre>
|
658
|
+
</div>
|
659
|
+
</div>
|
660
|
+
<div class="paragraph">
|
661
|
+
<p>After running the above command, you should find the file <code>eq-latex.html</code>
|
662
|
+
next to the source file <code>eq-latex.adoc</code>. View it in your browser.
|
663
|
+
You will need to be connected to the internet so that your browser
|
664
|
+
can load the MathJax fonts used to render mathematical
|
665
|
+
notation.<span class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnote_1" title="View footnote.">1</a>]</span></p>
|
666
|
+
</div>
|
667
|
+
<div class="paragraph">
|
668
|
+
<p>To test the analogous file written in <code>stem</code> format,
|
669
|
+
do this:</p>
|
670
|
+
</div>
|
671
|
+
<div class="listingblock">
|
672
|
+
<div class="content">
|
673
|
+
<pre class="highlight"><code> $ asciidoctor-latex -b html -a stem eq-stem.adoc</code></pre>
|
674
|
+
</div>
|
675
|
+
</div>
|
676
|
+
<div class="paragraph">
|
677
|
+
<p>The <code>-a</code> flag is used to set options,
|
678
|
+
just as the <code>-b</code> flag is used to set the
|
679
|
+
backend (LaTeX, HTML, more in the future,
|
680
|
+
with LaTeX the default).
|
681
|
+
Now convert the first file into LaTeX by running the command</p>
|
682
|
+
</div>
|
683
|
+
<div class="listingblock">
|
684
|
+
<div class="content">
|
685
|
+
<pre class="highlight"><code> $ asciidoctor-latex eq-latex.adoc</code></pre>
|
686
|
+
</div>
|
687
|
+
</div>
|
688
|
+
<div class="paragraph">
|
689
|
+
<p>If all was successful, there will be a file <code>eq-latex.tex</code> alongside
|
690
|
+
your source file <code>eq-latex.adoc</code>. You can process it as you
|
691
|
+
would any LaTeX file.</p>
|
692
|
+
</div>
|
693
|
+
</div>
|
694
|
+
</div>
|
695
|
+
<div class="sect1">
|
696
|
+
<h2 id="_examples">3. Examples</h2>
|
697
|
+
<div class="sectionbody">
|
698
|
+
<div class="paragraph">
|
699
|
+
<p>Below is a list of files which demsonstrate various features
|
700
|
+
of the converter. In some cases there are two versions, e.g.
|
701
|
+
<code>eq-latex.adoc</code> and <code>eq-stem.adoc</code>, each written in the
|
702
|
+
indicated format.<span class="footnote">[<a id="_footnoteref_2" class="footnote" href="#_footnote_2" title="View footnote.">2</a>]</span> In other cases,
|
703
|
+
the same file appears in both the LaTeX
|
704
|
+
and the STEM columns.</p>
|
705
|
+
</div>
|
706
|
+
<div class="paragraph">
|
707
|
+
<p>One of the best ways
|
708
|
+
of learning how to use the features of
|
709
|
+
Asciidotor LaTeX is to use your
|
710
|
+
natural talent for reverse-engineering:
|
711
|
+
run the example, the compare the rendered
|
712
|
+
file and its source.</p>
|
713
|
+
</div>
|
714
|
+
<table class="tableblock frame-all grid-all" style="width: 80%;">
|
715
|
+
<colgroup>
|
716
|
+
<col style="width: 33%;">
|
717
|
+
<col style="width: 33%;">
|
718
|
+
<col style="width: 33%;">
|
719
|
+
</colgroup>
|
720
|
+
<thead>
|
721
|
+
<tr>
|
722
|
+
<th class="tableblock halign-left valign-top">LaTeX</th>
|
723
|
+
<th class="tableblock halign-left valign-top">STEM</th>
|
724
|
+
<th class="tableblock halign-left valign-top">Comments</th>
|
725
|
+
</tr>
|
726
|
+
</thead>
|
727
|
+
<tbody>
|
728
|
+
<tr>
|
729
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>eq-latex.adoc</code></p></td>
|
730
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>eq-stem.adoc</code></p></td>
|
731
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">Basic equations</p></td>
|
732
|
+
</tr>
|
733
|
+
<tr>
|
734
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>eqno-latex.adoc</code></p></td>
|
735
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"> — </p></td>
|
736
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">Numbered equations</p></td>
|
737
|
+
</tr>
|
738
|
+
<tr>
|
739
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>theorem-latex.adoc</code></p></td>
|
740
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"> — </p></td>
|
741
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">Numbered theorems</p></td>
|
742
|
+
</tr>
|
743
|
+
<tr>
|
744
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>env.adoc</code></p></td>
|
745
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>env.adoc</code></p></td>
|
746
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">Env blocks</p></td>
|
747
|
+
</tr>
|
748
|
+
<tr>
|
749
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>click.adoc</code></p></td>
|
750
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>click.adoc</code></p></td>
|
751
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">Click blocks</p></td>
|
752
|
+
</tr>
|
753
|
+
<tr>
|
754
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>code.adoc</code></p></td>
|
755
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">code.adoc`</p></td>
|
756
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">Code blocks</p></td>
|
757
|
+
</tr>
|
758
|
+
</tbody>
|
759
|
+
</table>
|
760
|
+
</div>
|
761
|
+
</div>
|
762
|
+
<div class="sect1">
|
763
|
+
<h2 id="_comments_on_the_examples">4. Comments on the examples</h2>
|
764
|
+
<div class="sectionbody">
|
765
|
+
<div class="paragraph">
|
766
|
+
<p>Just a few words about what is in each
|
767
|
+
test file.</p>
|
768
|
+
</div>
|
769
|
+
<div class="sect2">
|
770
|
+
<h3 id="_eq_latex_adoc">4.1. eq-latex.adoc</h3>
|
771
|
+
<div class="paragraph">
|
772
|
+
<p>Basic equations, both in-line
|
773
|
+
and displayed, as described
|
774
|
+
in the introduction.</p>
|
775
|
+
</div>
|
776
|
+
</div>
|
777
|
+
<div class="sect2">
|
778
|
+
<h3 id="_theorem_latex_adoc">4.2. theorem-latex.adoc</h3>
|
779
|
+
<div class="paragraph">
|
780
|
+
<p>Theorems, definitions, etc., as described
|
781
|
+
in the introduction.</p>
|
782
|
+
</div>
|
783
|
+
</div>
|
784
|
+
<div class="sect2">
|
785
|
+
<h3 id="_env_adoc">4.3. env.adoc</h3>
|
786
|
+
<div class="paragraph">
|
787
|
+
<p>The file <code>env.adoc</code>,
|
788
|
+
illustrates general usage of the <code>env</code>-block. It gives
|
789
|
+
an automatically numbered and titled block. Thus repeated use
|
790
|
+
of <code>[env.objection]</code> gives this.</p>
|
791
|
+
</div>
|
792
|
+
<div class="openblock objection">
|
793
|
+
<div class="title">Objection 1.</div><div class="content">
|
794
|
+
<div style='line-height:1.5em;font-size:1.05em;font-style:oblique;margin-bottom:1.5em'>
|
795
|
+
This is hearsay.
|
796
|
+
</div>
|
797
|
+
</div>
|
798
|
+
</div>
|
799
|
+
<div class="openblock objection">
|
800
|
+
<div class="title">Objection 2.</div><div class="content">
|
801
|
+
<div style='line-height:1.5em;font-size:1.05em;font-style:oblique;margin-bottom:1.5em'>
|
802
|
+
That evidence has not been admitted before the court.
|
803
|
+
</div>
|
804
|
+
</div>
|
805
|
+
</div>
|
806
|
+
<div class="paragraph">
|
807
|
+
<p>The first objection was written like this:</p>
|
808
|
+
</div>
|
809
|
+
<div class="listingblock">
|
810
|
+
<div class="content">
|
811
|
+
<pre>[env.objection]
|
812
|
+
--
|
813
|
+
This is hearsay.
|
814
|
+
--</pre>
|
815
|
+
</div>
|
816
|
+
</div>
|
817
|
+
</div>
|
818
|
+
<div class="sect2">
|
819
|
+
<h3 id="_click_adoc">4.4. click.adoc</h3>
|
820
|
+
<div class="paragraph">
|
821
|
+
<p>Click blocks are like <code>env</code>-blocks, except that
|
822
|
+
when you open a document, only the title,
|
823
|
+
not the body of the block, is displayed.
|
824
|
+
Click on the title to reveal the body;
|
825
|
+
clicking again will return the body
|
826
|
+
to its hidden sate. Click blocks
|
827
|
+
signal their presence by the blue
|
828
|
+
color of the title.</p>
|
829
|
+
</div>
|
830
|
+
<div class="openblock click">
|
831
|
+
<div class="title">Message: Secret message</div><div class="content">
|
832
|
+
<div style='line-height:1.5em;font-size:1.05em;font-style:oblique;margin-bottom:1.5em'>
|
833
|
+
The path to wisdom is written on no
|
834
|
+
secret map.
|
835
|
+
</div>
|
836
|
+
</div>
|
837
|
+
</div>
|
838
|
+
<div class="paragraph">
|
839
|
+
<p>Click blocks are useful in making up problem sets,
|
840
|
+
homework assignments, study guides, etc.</p>
|
841
|
+
</div>
|
842
|
+
<div class="admonitionblock note">
|
843
|
+
<table>
|
844
|
+
<tr>
|
845
|
+
<td class="icon">
|
846
|
+
<div class="title">Note</div>
|
847
|
+
</td>
|
848
|
+
<td class="content">
|
849
|
+
There is bug which prevents click blocks
|
850
|
+
loaded as files from working properly — they do work when laoded from a web server.
|
851
|
+
We are working on this. See
|
852
|
+
<a href=http://epsilon.my.noteshare.io/section/click-blocks>this document</a>
|
853
|
+
for an example.
|
854
|
+
</td>
|
855
|
+
</tr>
|
856
|
+
</table>
|
857
|
+
</div>
|
858
|
+
</div>
|
859
|
+
<div class="sect2">
|
860
|
+
<h3 id="_code_adoc">4.5. code.adoc</h3>
|
861
|
+
<div class="paragraph">
|
862
|
+
<p>Use <code>[code.adoc]</code> for code listings.</p>
|
863
|
+
</div>
|
864
|
+
</div>
|
865
|
+
</div>
|
866
|
+
</div>
|
867
|
+
<div class="sect1">
|
868
|
+
<h2 id="_issues">5. Issues</h2>
|
869
|
+
<div class="sectionbody">
|
870
|
+
<div class="paragraph">
|
871
|
+
<p>One should be able to tex this document wihout error
|
872
|
+
and obtain the desired output. This is very much a work
|
873
|
+
in progress. In particaulr, the following have not yet been resolved.</p>
|
874
|
+
</div>
|
875
|
+
<div class="olist arabic">
|
876
|
+
<ol class="arabic">
|
877
|
+
<li>
|
878
|
+
<p>Dollars signs used to illustrated command cause LaTeX to choke.
|
879
|
+
We need to map dollar sign to escaped dollar sig in
|
880
|
+
post-processing for tex. Or is there a better solution?</p>
|
881
|
+
</li>
|
882
|
+
<li>
|
883
|
+
<p>The table block in Asciidoc is not implmented — or rather,
|
884
|
+
is partially implemnted.</p>
|
885
|
+
</li>
|
886
|
+
<li>
|
887
|
+
<p>The Click block is not implented in teh TeX output.</p>
|
888
|
+
</li>
|
889
|
+
<li>
|
890
|
+
<p>The matrix environment in <code>eq-stem.adoc</code> does not render correctly.</p>
|
891
|
+
</li>
|
892
|
+
<li>
|
893
|
+
<p>Fix title in latex mode</p>
|
894
|
+
</li>
|
895
|
+
</ol>
|
896
|
+
</div>
|
897
|
+
</div>
|
898
|
+
</div>
|
899
|
+
</div>
|
900
|
+
<div id="footnotes">
|
901
|
+
<hr>
|
902
|
+
<div class="footnote" id="_footnote_1">
|
903
|
+
<a href="#_footnoteref_1">1</a>. You can also install the fonts on your system. See <a href=http://www.mathjax.org/help/fonts/>mathjax-fonts</a>. this will give you faster reponse. Turning off your internet connection makes it better still:-(
|
904
|
+
</div>
|
905
|
+
<div class="footnote" id="_footnote_2">
|
906
|
+
<a href="#_footnoteref_2">2</a>. A missing entry in the table may mean that a feature has not yet been implemented, or that the file demonstrating it has not yet been written and/or tested.
|
907
|
+
</div>
|
908
|
+
</div>
|
909
|
+
<div id="footer">
|
910
|
+
<div id="footer-text">
|
911
|
+
Last updated 2015-04-25 12:34:02 CST
|
912
|
+
</div>
|
913
|
+
</div>
|
914
|
+
</body>
|
915
|
+
</html>
|