asciidoctor-latex 1.5.0.15.dev → 1.5.0.16.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 +3 -0
- data/README.adoc +393 -82
- data/data/extras.css +1 -1
- data/lib/asciidoctor/latex/converter.rb +0 -2
- data/lib/asciidoctor/latex/inject_html.rb +1 -0
- data/lib/asciidoctor/latex/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 305e51b3ba921df5529a185dc2416c32ebf1e809
|
4
|
+
data.tar.gz: aad431dd346881c3c38c82e4ea639304969a32f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34e9df9220194f123311a3068bf0cc78b97672f1cf94eb4953ff1b456ed89c6660c4a47e0cd89824af278b557cc67e0e995111afd8d418ea5361ab2e7f85a1a1
|
7
|
+
data.tar.gz: 555a6f69be2039d1e13e819e5ad8923968786cd1cccccd35fc10de1b20843260cf04373be2d3b405ab4631fe4c5bd5b45d6b129fc11e3662d9bbf5387c27db20
|
data/CHANGELOG.adoc
CHANGED
@@ -22,6 +22,9 @@ for cross-referencing, e.g.,
|
|
22
22
|
`[env.equation#hohoho]`, then it is numbered.
|
23
23
|
////
|
24
24
|
|
25
|
+
1.5.0.16.dev:: Update CSS for click blocks; remove duplicate injection of
|
26
|
+
javascript code; update README.
|
27
|
+
|
25
28
|
1.5.0.15.dev:: (1) Eliminate automatic inclusion of `macros.tex` if it is present.
|
26
29
|
(2) Introduce the block macro `include_latex_macros::LATEX_FILE`, where LATEX_FILE is
|
27
30
|
typically a LaTeX style or macro file, or a path thereto. For the HTML backend, the file is included
|
data/README.adoc
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
=
|
1
|
+
= Asciidoc-LaTeX README
|
2
2
|
James Carlson
|
3
|
-
|
4
|
-
:
|
5
|
-
:pagenums:
|
3
|
+
2016-06-29
|
4
|
+
:sectnums:
|
6
5
|
:toc2:
|
7
|
-
:stem:
|
8
6
|
|
9
|
-
NOTE: CHANGELOG.adoc has been added to this repo.
|
10
7
|
|
11
|
-
|
8
|
+
:env_standard:
|
12
9
|
|
13
10
|
:adl: Asciidoc-LaTeX
|
14
11
|
:adlp: Asciidoctor-LaTeX
|
@@ -22,61 +19,194 @@ NOTE: CHANGELOG.adoc has been added to this repo.
|
|
22
19
|
:tex: LaTeX
|
23
20
|
:article: http://noteshare.io/book/transcendental-numbers-and-periods[article]
|
24
21
|
:ns: http://www.noteshare.io[Noteshare.io]
|
22
|
+
:sc: http://www.scripta.io[Scripta.io]
|
25
23
|
|
24
|
+
== Introduction
|
26
25
|
|
27
|
-
Asciidoc-LaTeX defines an extended
|
26
|
+
Asciidoc-LaTeX defines an extended syntax
|
28
27
|
for the Asciidoc markup language
|
29
|
-
that closely parallels LaTeX.
|
30
|
-
|
31
|
-
in this extended markup language into both HTML
|
32
|
-
and LaTeX.footnote:[Many, but not all Asciidoc language
|
33
|
-
features are covered by this release.]
|
34
|
-
|
35
|
-
Below, we descibe the main
|
36
|
-
features of {adl}. However, since
|
37
|
-
it will not render in GitHub, you
|
38
|
-
are encouraged to view this write-up:
|
39
|
-
https://vschool.s3.amazonaws.com/manuscripts/372.html[Asciidoc-LaTeX].
|
40
|
-
For more information on using {adl}, please consult the
|
41
|
-
http://www.noteshare.io/book/asciidoctor-latex-manual[Asciidoctor-LaTeX manual].
|
42
|
-
For more information on conversion of {adl}
|
43
|
-
documents to {tex}, see the file `tech-report.adoc` in
|
44
|
-
this repository or consult the
|
45
|
-
https://vschool.s3.amazonaws.com/manuscripts/389.html[online version],
|
46
|
-
which has a table of contents.
|
47
|
-
|
48
|
-
Asciidoctor-LaTeX is developed by James Carlson, Jakub Jirutka, and Dan Allen.
|
28
|
+
that closely parallels LaTeX for inline and display mathematical formulas and for environments.
|
29
|
+
Documents written in this extended markup language can be converted into HTML or LaTeX:
|
49
30
|
|
31
|
+
Render as HTML::
|
32
|
+
Use `asciidoctor-latex -b html foo.adoc` to produce `foo.html`.
|
50
33
|
|
51
|
-
|
34
|
+
Render as LaTeX:: Use `sasciidoctor-latex foo.adoc`
|
35
|
+
to produce `foo.tex`, then use `xelatex foo.tex` to create `foo.pdf`.
|
52
36
|
|
53
|
-
|
37
|
+
Below, we describe the main
|
38
|
+
features of {adl}. However, since this document
|
39
|
+
will not render fully in GitHub, you
|
40
|
+
are encouraged to compile it yourself using
|
41
|
+
`asciidoctor-latex -b html README.adoc` or to consult the
|
42
|
+
http://vschool.s3.amazonaws.com/asciidoctor-latex/README.html[README at S3].
|
43
|
+
There is also an online version hosted at http://www.shoobox.io/share/230[shoobox.io],
|
44
|
+
a site for editing and distributing Asciidoc and Asciidoc-LaTeX documents.
|
54
45
|
|
55
|
-
|
56
|
-
|
57
|
-
Beta alert!
|
46
|
+
Asciidoctor-LaTeX is developed by James Carlson, Jakub Jirutka, and Dan Allen. Display of mathematical text
|
47
|
+
relies on http://docs.mathjax.org/en/latest/start.html[MathJax].
|
58
48
|
|
59
|
-
|
49
|
+
== Features
|
60
50
|
|
61
|
-
|
51
|
+
{adl} renders inline and displayed mathematical, and it supports a construct akin to LaTeX environments
|
52
|
+
for theorems, equations, etc. These and other features are described briefly below and more fully in <<Asciidoc-LaTeX environments>>.
|
62
53
|
|
63
|
-
|
54
|
+
=== Inline and displayed formulas
|
64
55
|
|
65
|
-
|
66
|
-
|
67
|
-
|
56
|
+
ifdef::env_standard[]
|
57
|
+
.Example
|
58
|
+
Imagine that `foo.adoc` contains the text below.
|
59
|
+
The inline and displayed formulas will be correctly rendered as html or tex.
|
60
|
+
----
|
61
|
+
The formula $a^2 + b^2 = c^2$ relates the sides
|
62
|
+
and hypotenuse of a right triangle. The formula
|
63
|
+
\[
|
64
|
+
\int_0^1 x^n dx = \frac{1}{n+1}
|
65
|
+
\]
|
66
|
+
is something we all learn in Calculus
|
67
|
+
----
|
68
|
+
endif::[]
|
68
69
|
|
69
|
-
|
70
|
+
ifndef::env_standard[]
|
70
71
|
|
71
|
-
|
72
|
+
.Example
|
73
|
+
Imagine that `foo.adoc` contains the text below.
|
74
|
+
It will be correctly rendered as html or tex.
|
75
|
+
----
|
76
|
+
The formula \$a^2 + b^2 = c^2\$ relates the sides
|
77
|
+
and hypotenuse of a right triangle. The formula
|
78
|
+
\[
|
79
|
+
\int_0^1 x^n dx = \frac{1}{n+1}
|
80
|
+
\]
|
81
|
+
is something we all learn in Calculus
|
82
|
+
----
|
72
83
|
|
73
|
-
|
84
|
+
.Rendered Text
|
85
|
+
[blue]#The formula $a^2 + b^2 = c^2$ relates the sides
|
86
|
+
and hypotenuse of a right triangle. The formula
|
87
|
+
\[
|
88
|
+
\int_0^1 x^n dx = \frac{1}{n+1}
|
89
|
+
\]
|
90
|
+
is something we all learn in Calculus.#
|
91
|
+
endif::[]
|
74
92
|
|
75
|
-
|
93
|
+
=== Environments
|
76
94
|
|
95
|
+
ifdef::env_standard[]
|
96
|
+
.Example
|
97
|
+
--
|
98
|
+
--
|
99
|
+
|
100
|
+
----
|
101
|
+
[env.theorem]
|
102
|
+
--
|
103
|
+
The Diophantine equation
|
104
|
+
\[
|
105
|
+
x^n + y^n = z^n
|
106
|
+
\]
|
107
|
+
for \$n > 2\$ has only trivial solutions
|
108
|
+
--
|
77
109
|
----
|
78
|
-
|
110
|
+
endif::[]
|
111
|
+
|
112
|
+
ifndef::env_standard[]
|
113
|
+
.Example
|
114
|
+
|
79
115
|
----
|
116
|
+
[env.theorem]
|
117
|
+
--
|
118
|
+
The Diophantine equation
|
119
|
+
\[
|
120
|
+
x^n + y^n = z^n
|
121
|
+
\]
|
122
|
+
for \$n > 2\$ has only trivial solutions
|
123
|
+
--
|
124
|
+
----
|
125
|
+
|
126
|
+
.Rendered Text
|
127
|
+
--
|
128
|
+
--
|
129
|
+
|
130
|
+
[env.theorem]
|
131
|
+
--
|
132
|
+
The Diophantine equation
|
133
|
+
\[
|
134
|
+
x^n + y^n = z^n
|
135
|
+
\]
|
136
|
+
for $n > 2$ has only trivial solutions.
|
137
|
+
--
|
138
|
+
endif::[]
|
139
|
+
|
140
|
+
|
141
|
+
=== Click blocks
|
142
|
+
|
143
|
+
A click block displays its title but not its body.
|
144
|
+
If you click on the title, the body is displayed.
|
145
|
+
Click on the title again to hide the body.
|
146
|
+
|
147
|
+
The title of a click block is displayed in blue.
|
148
|
+
|
149
|
+
ifdef::env_standard[]
|
150
|
+
.Example
|
151
|
+
--
|
152
|
+
--
|
153
|
+
|
154
|
+
----
|
155
|
+
[env.question]
|
156
|
+
--
|
157
|
+
What is the speed of light?
|
158
|
+
--
|
159
|
+
|
160
|
+
[click.answer]
|
161
|
+
--
|
162
|
+
300,000 km/sec
|
163
|
+
--
|
164
|
+
----
|
165
|
+
endif::[]
|
166
|
+
|
167
|
+
ifndef::env_standard[]
|
168
|
+
.Example
|
169
|
+
--
|
170
|
+
--
|
171
|
+
|
172
|
+
----
|
173
|
+
[env.question]
|
174
|
+
--
|
175
|
+
What is the speed of light?
|
176
|
+
--
|
177
|
+
|
178
|
+
[click.answer]
|
179
|
+
--
|
180
|
+
300,000 km/sec
|
181
|
+
--
|
182
|
+
----
|
183
|
+
|
184
|
+
.Rendered Text
|
185
|
+
--
|
186
|
+
--
|
187
|
+
|
188
|
+
[env.question]
|
189
|
+
--
|
190
|
+
What is the speed of light?
|
191
|
+
--
|
192
|
+
|
193
|
+
[click.answer]
|
194
|
+
--
|
195
|
+
300,000 km/sec
|
196
|
+
--
|
197
|
+
|
198
|
+
endif::[]
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
== Installation
|
203
|
+
|
204
|
+
=== From Rubygems
|
205
|
+
|
206
|
+
Run `gem install asciidoc-latex` to install from
|
207
|
+
https://rubygems.org/gems/asciidoctor-latex[RubyGems.org].
|
208
|
+
See the https://github.com/asciidoctor/asciidoctor-latex/blob/master/CHANGELOG.adoc[change log]
|
209
|
+
for a list of updates.
|
80
210
|
|
81
211
|
=== From GitHub
|
82
212
|
|
@@ -88,23 +218,65 @@ If you would like to install a development version from the repository, use:
|
|
88
218
|
$ gem install *.gem
|
89
219
|
|
90
220
|
|
91
|
-
==
|
221
|
+
== Contributing
|
92
222
|
|
93
|
-
|
223
|
+
If you wish to contribute to the
|
224
|
+
https://github.com/asciidoctor/asciidoctor-latex[asciidoctor-latex project], you should set up your environments to use
|
225
|
+
Jakub Jirutka's https://github.com/asciidoctor/asciidoctor-doctest[asciidoctor-doctest]. At the moment you will need to
|
226
|
+
use the https://github.com/jxxcarlson/asciidoctor-doctest[version which handles dialects] using
|
227
|
+
```
|
228
|
+
gem 'asciidoctor-doctest', github: 'jxxcarlson/asciidoctor-doctest', ref: 'latex'
|
229
|
+
```
|
230
|
+
in your Gemfile. Run all tests with `rake doctest`,
|
231
|
+
or run individual tests with `rake doctest:html` or
|
232
|
+
`rake doctest:tex`.
|
94
233
|
|
95
|
-
|
96
|
-
Use `$ asciidoctor-latex -b html foo.adoc` to produce `foo.html`.
|
97
|
-
With this command the Asciidoc-LaTeX syntax and extensions will be rendered.
|
234
|
+
At the moment the tests are for the latex dialect.
|
98
235
|
|
236
|
+
== Dialects
|
99
237
|
|
100
|
-
|
101
|
-
to produce `foo.tex`.
|
238
|
+
`Asciidoctor-LaTeX` processes three dialects of the core Asciidoc language:
|
102
239
|
|
240
|
+
- `asciidoc` (the core language)
|
241
|
+
- `manuscript`
|
242
|
+
- `latex`
|
103
243
|
|
104
|
-
|
244
|
+
`Asciidoc-latex` is the default dialect. Dialects can be set with the `:dialect` on the
|
245
|
+
command line as in this example:
|
246
|
+
|
247
|
+
```
|
248
|
+
asciidoctor-latex -a dialect=manuscript foo.adoc
|
249
|
+
```
|
250
|
+
To set the dialect with the Ruby API, use for example :
|
251
|
+
|
252
|
+
```
|
253
|
+
Asciidoctor.convert str, { 'dialect' => 'latex' }
|
254
|
+
```
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
== Macros
|
261
|
+
|
262
|
+
Macros can be included in the body of an Asciidoc-LaTeX
|
263
|
+
file using the `texmacro` environment, as in the example
|
264
|
+
below.
|
265
|
+
|
266
|
+
----
|
267
|
+
|
268
|
+
[env.texmacro]
|
269
|
+
--
|
270
|
+
\def\AA{\mathbb{A}}
|
271
|
+
\def\BB{\mathbb{B}}
|
272
|
+
|
273
|
+
\newcommand{\set}[1]{ \{\,#1\, \} }
|
274
|
+
\newcommand{\sett}[2]{ \{\,#1\, \mid\, #2\, \} }
|
275
|
+
--
|
276
|
+
----
|
105
277
|
|
106
278
|
To include a LaTeX macro file MACRO_FILE, insert the code
|
107
|
-
`include_latex_macros::MACRO_FILE[]`.
|
279
|
+
`include_latex_macros::MACRO_FILE[]`. Here MACRO_FILE can be a file name or a an absolute or relative path. Included macros work
|
108
280
|
for both the html and tex backends.
|
109
281
|
|
110
282
|
|
@@ -112,7 +284,7 @@ NOTE: Automatic inclusion of the file `macros.tex`
|
|
112
284
|
has been discontinued.
|
113
285
|
|
114
286
|
|
115
|
-
|
287
|
+
== Switches
|
116
288
|
|
117
289
|
.Tex header
|
118
290
|
To generate a tex file with a minimal header, do:
|
@@ -141,7 +313,7 @@ Asciidoctor supports two closely-related
|
|
141
313
|
math formats, [blue]#Asciidoc-LaTeX#
|
142
314
|
and [blue]#AsciiMath#.
|
143
315
|
In Asciidoc-LaTeX,
|
144
|
-
one can write
|
316
|
+
one can write `\$ a^2 + b^2 = c^2 \$` and
|
145
317
|
----
|
146
318
|
\[
|
147
319
|
e^{2\pi \sqrt{-1}} = 1,
|
@@ -163,7 +335,7 @@ and
|
|
163
335
|
++++
|
164
336
|
----
|
165
337
|
|
166
|
-
|
338
|
+
ifdef::env_standard[]
|
167
339
|
== Asciidoc-LaTeX environments
|
168
340
|
|
169
341
|
Asciidoc-LaTeX supports an `env` construct that maps to LaTeX environments.
|
@@ -177,6 +349,119 @@ There exist infinitely many prime numbers.
|
|
177
349
|
renders as an automatically numbered theorem.
|
178
350
|
Environments can contain in-line and display mathematics, e.g.,
|
179
351
|
----
|
352
|
+
[env.theorem]
|
353
|
+
--
|
354
|
+
A two-by-two matrix is invertible if
|
355
|
+
its determinant is nonzero, i.e., if
|
356
|
+
\[
|
357
|
+
\left|\begin{matrix}
|
358
|
+
a & b \\
|
359
|
+
c & d
|
360
|
+
\end{matrix}\right| \ne 0
|
361
|
+
\]
|
362
|
+
This result extends to $n\times n$ matrices.
|
363
|
+
--
|
364
|
+
----
|
365
|
+
|
366
|
+
There is complete freedom in parameter `NAME`
|
367
|
+
of `[env.NAME]`, Thus,one can write
|
368
|
+
----
|
369
|
+
[env.definition]
|
370
|
+
--
|
371
|
+
An integer $n$ is *prime* if (a) it is not
|
372
|
+
$\pm 1$ and (b) it has no divisors other
|
373
|
+
than $\pm 1$ and $\pm n$.
|
374
|
+
--
|
375
|
+
----
|
376
|
+
or
|
377
|
+
----
|
378
|
+
[env.joke]
|
379
|
+
--
|
380
|
+
A mathematician, a philosopher, and
|
381
|
+
a lawyer met at the local bar
|
382
|
+
for a drink. The lawyer said ...
|
383
|
+
--
|
384
|
+
----
|
385
|
+
One can make cross references by labeling
|
386
|
+
the environment as in
|
387
|
+
----
|
388
|
+
[env.joke#mathjoke1]
|
389
|
+
--
|
390
|
+
A mathematician, a philosopher, and
|
391
|
+
a lawyer met at the local bar
|
392
|
+
for a drink. The lawyer said ...
|
393
|
+
--
|
394
|
+
----
|
395
|
+
then referencing it later as +<<mathjoke1>>+
|
396
|
+
|
397
|
+
Certain environments receive special treatment.
|
398
|
+
For numbered equations, use `[env.equation]`
|
399
|
+
like this
|
400
|
+
|
401
|
+
----
|
402
|
+
[env.equation]
|
403
|
+
--
|
404
|
+
a^{p-1} \equiv 1\ \text{mod}\ p
|
405
|
+
--
|
406
|
+
----
|
407
|
+
|
408
|
+
An equation number will be displayed only when
|
409
|
+
a label for cross-referencing is provided, e.g.,
|
410
|
+
|
411
|
+
----
|
412
|
+
[env.equation#little-fermat]
|
413
|
+
--
|
414
|
+
a^{p-1} \equiv 1\ \text{mod}\ p
|
415
|
+
--
|
416
|
+
----
|
417
|
+
|
418
|
+
For sets of equations, use `[env,equationalign]`:
|
419
|
+
----
|
420
|
+
[env.equationalign]
|
421
|
+
--
|
422
|
+
A & = 4\pi r^2 \\
|
423
|
+
V & = \frac{4}{3} \pi r^3
|
424
|
+
--
|
425
|
+
----
|
426
|
+
|
427
|
+
endif::[]
|
428
|
+
|
429
|
+
|
430
|
+
ifndef::env_standard[]
|
431
|
+
== Asciidoc-LaTeX environments
|
432
|
+
|
433
|
+
Asciidoc-LaTeX supports an `env` construct that maps to LaTeX environments.
|
434
|
+
Thus
|
435
|
+
----
|
436
|
+
[env.theorem]
|
437
|
+
--
|
438
|
+
There exist infinitely many prime numbers.
|
439
|
+
--
|
440
|
+
----
|
441
|
+
renders as an automatically numbered theorem:
|
442
|
+
|
443
|
+
|
444
|
+
[env.theorem]
|
445
|
+
--
|
446
|
+
There exist infinitely many prime numbers.
|
447
|
+
--
|
448
|
+
|
449
|
+
Environments can contain in-line and display mathematics, e.g.,
|
450
|
+
----
|
451
|
+
[env.theorem]
|
452
|
+
--
|
453
|
+
A two-by-two matrix is invertible if
|
454
|
+
its determinant is nonzero, i.e., if
|
455
|
+
\[
|
456
|
+
\left|\begin{matrix}
|
457
|
+
a & b \\
|
458
|
+
c & d
|
459
|
+
\end{matrix}\right| \ne 0
|
460
|
+
\]
|
461
|
+
This result extends to $n\times n$ matrices.
|
462
|
+
--
|
463
|
+
----
|
464
|
+
|
180
465
|
[env.theorem]
|
181
466
|
--
|
182
467
|
A two-by-two matrix is invertible if
|
@@ -189,19 +474,28 @@ its determinant is nonzero, i.e., if
|
|
189
474
|
\]
|
190
475
|
This result extends to $n\times n$ matrices.
|
191
476
|
--
|
192
|
-
|
477
|
+
|
193
478
|
|
194
479
|
There is complete freedom in parameter `NAME`
|
195
480
|
of `[env.NAME]`, Thus,one can write
|
196
481
|
----
|
482
|
+
[env.definition]
|
483
|
+
--
|
484
|
+
An integer \$n\$ is *prime* if (a) it is not
|
485
|
+
\$\pm 1\$ and (b) it has no divisors other
|
486
|
+
than \$\pm 1\$ and \$\pm n\$.
|
487
|
+
--
|
488
|
+
----
|
489
|
+
to obtain
|
490
|
+
|
197
491
|
[env.definition]
|
198
492
|
--
|
199
493
|
An integer $n$ is *prime* if (a) it is not
|
200
494
|
$\pm 1$ and (b) it has no divisors other
|
201
495
|
than $\pm 1$ and $\pm n$.
|
202
496
|
--
|
203
|
-
|
204
|
-
|
497
|
+
|
498
|
+
Or one could write
|
205
499
|
----
|
206
500
|
[env.joke]
|
207
501
|
--
|
@@ -210,6 +504,15 @@ a lawyer met at the local bar
|
|
210
504
|
for a drink. The lawyer said ...
|
211
505
|
--
|
212
506
|
----
|
507
|
+
|
508
|
+
[env.joke]
|
509
|
+
--
|
510
|
+
A mathematician, a philosopher, and
|
511
|
+
a lawyer met at the local bar
|
512
|
+
for a drink. The lawyer said ...
|
513
|
+
--
|
514
|
+
|
515
|
+
|
213
516
|
One can make cross references by labeling
|
214
517
|
the environment as in
|
215
518
|
----
|
@@ -220,7 +523,7 @@ a lawyer met at the local bar
|
|
220
523
|
for a drink. The lawyer said ...
|
221
524
|
--
|
222
525
|
----
|
223
|
-
then referencing it later as
|
526
|
+
then referencing it later as +<<mathjoke1>>+
|
224
527
|
|
225
528
|
Certain environments receive special treatment.
|
226
529
|
For numbered equations, use `[env.equation]`
|
@@ -232,38 +535,46 @@ like this
|
|
232
535
|
a^{p-1} \equiv 1\ \text{mod}\ p
|
233
536
|
--
|
234
537
|
----
|
538
|
+
Here is the rendered version:
|
235
539
|
|
236
|
-
|
237
|
-
----
|
238
|
-
[env.equationalign]
|
540
|
+
[env.equation]
|
239
541
|
--
|
240
|
-
|
241
|
-
V & = \frac{4}{3} \pi r^3
|
542
|
+
a^{p-1} \equiv 1\ \text{mod}\ p
|
242
543
|
--
|
243
|
-
----
|
244
|
-
|
245
544
|
|
545
|
+
An equation number will be displayed only when
|
546
|
+
a label for cross-referencing is provided, e.g.,
|
246
547
|
|
548
|
+
----
|
549
|
+
[env.equation#little-fermat]
|
550
|
+
--
|
551
|
+
a^{p-1} \equiv 1\ \text{mod}\ p
|
552
|
+
--
|
553
|
+
----
|
247
554
|
|
248
|
-
|
555
|
+
so that now one has
|
249
556
|
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
557
|
+
[env.equation#little-fermat]
|
558
|
+
--
|
559
|
+
a^{p-1} \equiv 1\ \text{mod}\ p
|
560
|
+
--
|
254
561
|
|
562
|
+
For sets of equations, use `[env,equationalign]`:
|
255
563
|
----
|
256
|
-
[
|
564
|
+
[env.equationalign]
|
565
|
+
--
|
566
|
+
A & = 4\pi r^2 \\
|
567
|
+
V & = \frac{4}{3} \pi r^3
|
257
568
|
--
|
258
|
-
It is sometimes useful to "hide" a comment
|
259
|
-
in a click block so as not to unduly
|
260
|
-
disturb the flow of the prose. Click
|
261
|
-
blocks are also useful for problem sets,
|
262
|
-
since one can make hints, solutions, etc.
|
263
|
-
clickable.
|
264
569
|
----
|
570
|
+
This text renders as
|
571
|
+
[env.equationalign#area-volume]
|
572
|
+
--
|
573
|
+
A & = 4\pi r^2 \\
|
574
|
+
V & = \frac{4}{3} \pi r^3
|
575
|
+
--
|
576
|
+
|
577
|
+
endif::[]
|
578
|
+
|
265
579
|
|
266
580
|
|
267
|
-
The default for click blocks is not to number them.
|
268
|
-
See the file `click.adoc` in the `exampless` directory
|
269
|
-
for more information.
|
data/data/extras.css
CHANGED
@@ -513,10 +513,8 @@ module Asciidoctor::LaTeX
|
|
513
513
|
preprocessor MacroInsert if (File.exist? 'macros.tex')
|
514
514
|
|
515
515
|
inline_macro ChemInlineMacro
|
516
|
-
|
517
516
|
block_macro IncludeLatexBlockMacro
|
518
517
|
|
519
|
-
postprocessor InjectHTML unless document.attributes['inject_javascript'] == 'no'
|
520
518
|
postprocessor Chem if document.basebackend? 'html'
|
521
519
|
postprocessor HTMLPostprocessor if document.basebackend? 'html'
|
522
520
|
postprocessor TexPostprocessor if document.basebackend? 'tex'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-latex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0.
|
4
|
+
version: 1.5.0.16.dev
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Carlson
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-06-
|
13
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: asciidoctor
|
@@ -320,7 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
320
320
|
version: 1.3.1
|
321
321
|
requirements: []
|
322
322
|
rubyforge_project:
|
323
|
-
rubygems_version: 2.
|
323
|
+
rubygems_version: 2.6.2
|
324
324
|
signing_key:
|
325
325
|
specification_version: 4
|
326
326
|
summary: Converts AsciiDoc documents to LaTeX, provides LaTeX extensions to Asciidoc
|