Skip to content

Commit 36e86d0

Browse files
committed
🐛 cp pre.adoc post.adoc
1 parent 533220f commit 36e86d0

File tree

1 file changed

+29
-42
lines changed

1 file changed

+29
-42
lines changed

example/post.adoc

Lines changed: 29 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,22 @@ The purpose of this example is to compare {adoc-math} and {adoctor-math}, and to
1717

1818
### `adoc-math`
1919

20-
We are about to discuss the <<cauchy-schwarz-ineq>>.
20+
We are about to discuss the famous <<cauchy-schwarz-ineq>>.
2121

2222
*Theorem {counter:counter-thms} (Cauchy-Schwarz Inequality)* Let
23-
// $n$ vertical_align_offset = -0.4ex
24-
image:imgs/adoc-math/a_inline_amath_n_f5d15920.svg[]
23+
$n$ vertical_align_offset = -0.4ex
2524
be a non-negative integer, and let
26-
// $a_0, a_1, ..., a_n,$ vertical_align_offset = -0.7ex
27-
image:imgs/adoc-math/a_inline_amath_a_0a_7458f93c.svg[]
28-
// $b_0, b_1, ..., b_n in bbb "R"$
29-
image:imgs/adoc-math/a_inline_amath_b_0b_986ceb00.svg[]
25+
$a_0, a_1, ..., a_n,$ vertical_align_offset = -0.7ex
26+
$b_0, b_1, ..., b_n in bbb "R"$
3027
where
31-
// $bbb "R"$
32-
image:imgs/adoc-math/a_inline_amath_bbbR_34f68880.svg[]
28+
$bbb "R"$
3329
is the set of real numbers. It follows that:
3430

3531
[#cauchy-schwarz-ineq]
3632
.Cauchy-Schwarz Inequality
37-
// $$
38-
// (a_0^2 + a_1^2 + ... + a_n^2)(b_0^2 + b_1^2 + ... + b_n^2) ≥ (a_0b_0 + a_1b_1 + ... + a_nb_n)^2
39-
// $$
40-
image::imgs/adoc-math/b_block_amath_(a_0_6354bc50.svg[align=center]
33+
$$
34+
(a_0^2 + a_1^2 + ... + a_n^2)(b_0^2 + b_1^2 + ... + b_n^2) ≥ (a_0b_0 + a_1b_1 + ... + a_nb_n)^2
35+
$$
4136

4237
### `asciidoctor-mathematical`
4338

@@ -71,8 +66,7 @@ a|
7166
----
7267
a|
7368
[.text-center]
74-
// $a/b$
75-
image:imgs/adoc-math/a_inline_amath_ab_dd460eca.svg[]
69+
$a/b$
7670
a|
7771
* The default language is {amath}.
7872
* Inline cells start with a `$`, and end with a `$`.
@@ -85,8 +79,7 @@ a|
8579
----
8680
a|
8781
[.text-center]
88-
// $a/b$ amath
89-
image:imgs/adoc-math/a_inline_amath_ab_bbcbf77a.svg[]
82+
$a/b$ amath
9083
.2+a|
9184
* Options come after the last `$` in inline cells.
9285
* You can override the default language with
@@ -106,8 +99,7 @@ a|
10699
----
107100
a|
108101
[.text-center]
109-
// $\dfrac{a}{b}$ tex
110-
image:imgs/adoc-math/a_inline_tex_dfra_c0bb0f86.svg[]
102+
$\dfrac{a}{b}$ tex
111103

112104
// Row
113105
a|
@@ -117,8 +109,7 @@ a|
117109
----
118110
a|
119111
[.text-center]
120-
// $a/b$ scale = 150%
121-
image:imgs/adoc-math/a_inline_amath_ab_3888804f.svg[]
112+
$a/b$ scale = 150%
122113
a|
123114
* You can scale your math.
124115

@@ -130,8 +121,7 @@ a|
130121
----
131122
a|
132123
[.text-center]
133-
// $a/b$ vertical_align_offset = 1ex
134-
image:imgs/adoc-math/a_inline_amath_ab_db32d819.svg[]
124+
$a/b$ vertical_align_offset = 1ex
135125
a|
136126
* You can move your math up or down.
137127

@@ -144,10 +134,9 @@ sum_(i=1)^n i^3=((n(n+1))/2)^2
144134
{empty}$$
145135
----
146136
a|
147-
// $$ amath
148-
// sum_(i=1)^n i^3=((n(n+1))/2)^2
149-
// $$
150-
image::imgs/adoc-math/b_block_amath_sum__57ebec07.svg[align=center]
137+
$$ amath
138+
sum_(i=1)^n i^3=((n(n+1))/2)^2
139+
$$
151140
a|
152141
* Block cells are written between lines of `$$`; the options will be on the first line.
153142

@@ -160,10 +149,9 @@ a^2 + b^2 = c^2
160149
{empty}$$
161150
----
162151
a|
163-
// $$ amath, right
164-
// a^2 + b^2 = c^2
165-
// $$
166-
image::imgs/adoc-math/b_block_amath_a2+b_c62fc84c.svg[align=right]
152+
$$ amath, right
153+
a^2 + b^2 = c^2
154+
$$
167155
a|
168156
* You can horizontally align block cells.
169157

@@ -182,16 +170,15 @@ a|
182170
{empty}$$
183171
----
184172
a|
185-
// $$ amath, max_lines = 8
186-
// 1 +
187-
// 2 +
188-
// 3 +
189-
// 4 +
190-
// 5 +
191-
// 6 =
192-
// 21
193-
// $$
194-
image::imgs/adoc-math/b_block_amath_1+2+_9f90f2f1.svg[align=center]
173+
$$ amath, max_lines = 8
174+
1 +
175+
2 +
176+
3 +
177+
4 +
178+
5 +
179+
6 =
180+
21
181+
$$
195182
a|
196183
* If you forget to close a cell, it can be difficult to find the culprit. To prevent this, block cells have a `max_lines` parameter (by default 6). You can override this with `max_lines=X`.
197184

@@ -200,4 +187,4 @@ a|
200187
| sum_(i=1)^n i^3=((n(n+1))/2)^2
201188
a|
202189
// $sum_(i=1)^n i^3=((n(n+1))/2)^2$
203-
|===
190+
|===

0 commit comments

Comments
 (0)