| 1 |
[id="a-title"] |
| 2 |
= A title |
| 3 |
|
| 4 |
This is a regular paragraph. It contains *bold*, _italic_, and `monospace` text. Parts of words can use markup using "unconstrained quotes": abc**d**efg__h__ijk. |
| 5 |
|
| 6 |
.List title |
| 7 |
* This is |
| 8 |
* An unordered list |
| 9 |
|
| 10 |
.List title |
| 11 |
. This is |
| 12 |
. An ordered list |
| 13 |
|
| 14 |
.A labeled list |
| 15 |
Item 1:: A description. |
| 16 |
Item 2:: |
| 17 |
Another description. |
| 18 |
|
| 19 |
A command to display the `file.asciidoc` file using `cat`: |
| 20 |
|
| 21 |
---- |
| 22 |
$ cat file.asciidoc |
| 23 |
---- |
| 24 |
|
| 25 |
NOTE: This is a note. |
| 26 |
|
| 27 |
[WARNING] |
| 28 |
==== |
| 29 |
A longer note-like block. |
| 30 |
|
| 31 |
This one is a warning. |
| 32 |
==== |
| 33 |
|
| 34 |
link:https://gitlab.gnome.org/[A hypertext link] |
| 35 |
|
| 36 |
// A single-line comment |
| 37 |
|
| 38 |
//// |
| 39 |
A multi-line |
| 40 |
comment |
| 41 |
block |
| 42 |
//// |
| 43 |
|
| 44 |
:an-attribute: the content of an attribute (a variable), defined here |
| 45 |
|
| 46 |
This paragraph includes {an-attribute}. |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
// from https://powerman.name/doc/asciidoc |
| 51 |
|
| 52 |
// Document header |
| 53 |
|
| 54 |
Main Header |
| 55 |
=========== |
| 56 |
Optional Author Name <[email protected]> |
| 57 |
Optional version, optional date |
| 58 |
:Author: AlternativeWayToSetOptional Author Name |
| 59 |
:Email: <[email protected]> |
| 60 |
:Date: AlternativeWayToSetOptional date |
| 61 |
:Revision: AlternativeWayToSetOptional version |
| 62 |
|
| 63 |
|
| 64 |
// Attributes |
| 65 |
|
| 66 |
Author is {author} |
| 67 |
|
| 68 |
Version is {revision} |
| 69 |
|
| 70 |
:My name: Alex Efros |
| 71 |
My name is {myname} |
| 72 |
|
| 73 |
Line |
| 74 |
with bad attribute {qwe} will be |
| 75 |
deleted |
| 76 |
|
| 77 |
Escaped: \{qwe} and +++{qwe}+++ |
| 78 |
|
| 79 |
|
| 80 |
// Headers |
| 81 |
|
| 82 |
Level 1 |
| 83 |
------- |
| 84 |
Text. |
| 85 |
|
| 86 |
Level 2 |
| 87 |
~~~~~~~ |
| 88 |
Text. |
| 89 |
|
| 90 |
Level 3 |
| 91 |
^^^^^^^ |
| 92 |
Text. |
| 93 |
|
| 94 |
Level 4 |
| 95 |
+++++++ |
| 96 |
Text. |
| 97 |
|
| 98 |
== Level 1 |
| 99 |
Text. |
| 100 |
|
| 101 |
=== Level 2 |
| 102 |
Text. |
| 103 |
|
| 104 |
==== Level 3 |
| 105 |
Text. |
| 106 |
|
| 107 |
===== Level 4 |
| 108 |
Text. |
| 109 |
|
| 110 |
|
| 111 |
// Paragraphs |
| 112 |
|
| 113 |
.Optional Title |
| 114 |
|
| 115 |
Usual |
| 116 |
paragraph. |
| 117 |
|
| 118 |
.Optional Title |
| 119 |
|
| 120 |
Literal paragraph. |
| 121 |
Must be indented. |
| 122 |
|
| 123 |
.Optional Title |
| 124 |
|
| 125 |
[source,perl] |
| 126 |
die 'connect: '.$dbh->errstr; |
| 127 |
|
| 128 |
Not a code in next paragraph. |
| 129 |
|
| 130 |
.Optional Title |
| 131 |
NOTE: This is an example |
| 132 |
single-paragraph note. |
| 133 |
|
| 134 |
.Optional Title |
| 135 |
[NOTE] |
| 136 |
This is an example |
| 137 |
single-paragraph note. |
| 138 |
|
| 139 |
TIP: Tip. |
| 140 |
|
| 141 |
IMPORTANT: Important. |
| 142 |
|
| 143 |
WARNING: Warning. |
| 144 |
|
| 145 |
CAUTION: Caution. |
| 146 |
|
| 147 |
|
| 148 |
// Blocks |
| 149 |
|
| 150 |
.Optional Title |
| 151 |
---- |
| 152 |
*Listing* Block |
| 153 |
|
| 154 |
Use: code or file listings |
| 155 |
---- |
| 156 |
|
| 157 |
.Optional Title |
| 158 |
[source,perl] |
| 159 |
---- |
| 160 |
# *Source* block |
| 161 |
# Use: highlight code listings |
| 162 |
# (require `source-highlight` or `pygmentize`) |
| 163 |
use DBI; |
| 164 |
my $dbh = DBI->connect('...',$u,$p) |
| 165 |
or die "connect: $dbh->errstr"; |
| 166 |
---- |
| 167 |
|
| 168 |
.Optional Title |
| 169 |
**** |
| 170 |
*Sidebar* Block |
| 171 |
|
| 172 |
Use: sidebar notes :) |
| 173 |
**** |
| 174 |
|
| 175 |
.Optional Title |
| 176 |
========================== |
| 177 |
*Example* Block |
| 178 |
|
| 179 |
Use: examples :) |
| 180 |
|
| 181 |
Default caption "Example:" |
| 182 |
can be changed using |
| 183 |
|
| 184 |
[caption="Custom: "] |
| 185 |
|
| 186 |
before example block. |
| 187 |
========================== |
| 188 |
|
| 189 |
.Optional Title |
| 190 |
[NOTE] |
| 191 |
=============================== |
| 192 |
*NOTE* Block |
| 193 |
|
| 194 |
Use: multi-paragraph notes. |
| 195 |
=============================== |
| 196 |
|
| 197 |
//// |
| 198 |
*Comment* block |
| 199 |
|
| 200 |
Use: hide comments |
| 201 |
//// |
| 202 |
|
| 203 |
++++ |
| 204 |
*Passthrough* Block |
| 205 |
<p> |
| 206 |
Use: backend-specific markup like |
| 207 |
<table border="1"> |
| 208 |
<tr><td>1<td>2 |
| 209 |
</table> |
| 210 |
++++ |
| 211 |
|
| 212 |
.Optional Title |
| 213 |
.... |
| 214 |
*Literal* Block |
| 215 |
|
| 216 |
Use: workaround when literal |
| 217 |
paragraph (indented) like |
| 218 |
1. First. |
| 219 |
2. Second. |
| 220 |
incorrectly processed as list. |
| 221 |
.... |
| 222 |
|
| 223 |
.Optional Title |
| 224 |
[quote, cite author, cite source] |
| 225 |
____ |
| 226 |
*Quote* Block |
| 227 |
|
| 228 |
Use: cite somebody |
| 229 |
____ |
| 230 |
|
| 231 |
|
| 232 |
// Text |
| 233 |
|
| 234 |
forced + |
| 235 |
line break |
| 236 |
|
| 237 |
normal, _italic_, *bold*, +mono+. |
| 238 |
|
| 239 |
``double quoted'', `single quoted'. |
| 240 |
|
| 241 |
normal, ^super^, ~sub~. |
| 242 |
|
| 243 |
Command: `ls -al` |
| 244 |
|
| 245 |
+mono *bold*+ |
| 246 |
|
| 247 |
`passthru *bold*` |
| 248 |
|
| 249 |
Path: '/some/filez.txt', '.b' |
| 250 |
|
| 251 |
[red]#red text# [yellow-background]#on yellow# |
| 252 |
[big]#large# [red yellow-background big]*all bold* |
| 253 |
|
| 254 |
Chars: n__i__**b**++m++[red]##r## |
| 255 |
|
| 256 |
// Comment |
| 257 |
|
| 258 |
(C) (R) (TM) -- ... -> <- => <= ¶ |
| 259 |
|
| 260 |
'''' |
| 261 |
|
| 262 |
Escaped: |
| 263 |
\_italic_, +++_italic_+++, |
| 264 |
t\__e\__st, +++t__e__st+++, |
| 265 |
+++<b>bold</b>+++, $$<b>normal</b>$$ |
| 266 |
\¶ |
| 267 |
\`not single quoted' |
| 268 |
\`\`not double quoted'' |
| 269 |
|
| 270 |
|
| 271 |
// Macros: links, images & include |
| 272 |
|
| 273 |
[[anchor-1]] |
| 274 |
Paragraph or block 1. |
| 275 |
|
| 276 |
anchor:anchor-2[] |
| 277 |
Paragraph or block 2. |
| 278 |
|
| 279 |
<<anchor-1>>, |
| 280 |
<<anchor-1,First anchor>>, |
| 281 |
xref:anchor-2[], |
| 282 |
xref:anchor-2[Second anchor]. |
| 283 |
|
| 284 |
link:asciidoc[This document] |
| 285 |
link:asciidoc.html[] |
| 286 |
link:/index.html[This site root] |
| 287 |
|
| 288 |
http://google.com |
| 289 |
http://google.com[Google Search] |
| 290 |
mailto:root@localhost[email admin] |
| 291 |
|
| 292 |
First home |
| 293 |
image:images/icons/home.png[] |
| 294 |
, second home |
| 295 |
image:images/icons/home.png[Alt text] |
| 296 |
. |
| 297 |
|
| 298 |
.Block image |
| 299 |
image::images/icons/home.png[] |
| 300 |
image::images/icons/home.png[Alt text] |
| 301 |
|
| 302 |
.Thumbnail linked to full image |
| 303 |
image:/images/font/640-screen2.gif[ |
| 304 |
"My screenshot",width=128, |
| 305 |
link="/images/font/640-screen2.gif"] |
| 306 |
|
| 307 |
This is example how files |
| 308 |
can be included. |
| 309 |
It's commented because |
| 310 |
there no such files. :) |
| 311 |
|
| 312 |
// include::footer.txt[] |
| 313 |
|
| 314 |
// [source,perl] |
| 315 |
// ---- |
| 316 |
// include::script.pl[] |
| 317 |
// ---- |
| 318 |
|
| 319 |
|
| 320 |
// Lists |
| 321 |
|
| 322 |
.Bulleted |
| 323 |
* bullet |
| 324 |
* bullet |
| 325 |
- bullet |
| 326 |
- bullet |
| 327 |
* bullet |
| 328 |
** bullet |
| 329 |
** bullet |
| 330 |
*** bullet |
| 331 |
*** bullet |
| 332 |
**** bullet |
| 333 |
**** bullet |
| 334 |
***** bullet |
| 335 |
***** bullet |
| 336 |
**** bullet |
| 337 |
*** bullet |
| 338 |
** bullet |
| 339 |
* bullet |
| 340 |
|
| 341 |
.Bulleted 2 |
| 342 |
- bullet |
| 343 |
* bullet |
| 344 |
|
| 345 |
.Ordered |
| 346 |
. number |
| 347 |
. number |
| 348 |
.. letter |
| 349 |
.. letter |
| 350 |
. number |
| 351 |
.. loweralpha |
| 352 |
.. loweralpha |
| 353 |
... lowerroman |
| 354 |
... lowerroman |
| 355 |
.... upperalpha |
| 356 |
.... upperalpha |
| 357 |
..... upperroman |
| 358 |
..... upperroman |
| 359 |
.... upperalpha |
| 360 |
... lowerroman |
| 361 |
.. loweralpha |
| 362 |
. number |
| 363 |
|
| 364 |
.Ordered 2 |
| 365 |
a. letter |
| 366 |
b. letter |
| 367 |
.. letter2 |
| 368 |
.. letter2 |
| 369 |
. number |
| 370 |
. number |
| 371 |
1. number2 |
| 372 |
2. number2 |
| 373 |
3. number2 |
| 374 |
4. number2 |
| 375 |
. number |
| 376 |
.. letter2 |
| 377 |
c. letter |
| 378 |
|
| 379 |
.Labeled |
| 380 |
Term 1:: |
| 381 |
Definition 1 |
| 382 |
Term 2:: |
| 383 |
Definition 2 |
| 384 |
Term 2.1;; |
| 385 |
Definition 2.1 |
| 386 |
Term 2.2;; |
| 387 |
Definition 2.2 |
| 388 |
Term 3:: |
| 389 |
Definition 3 |
| 390 |
Term 4:: Definition 4 |
| 391 |
Term 4.1::: Definition 4.1 |
| 392 |
Term 4.2::: Definition 4.2 |
| 393 |
Term 4.2.1:::: Definition 4.2.1 |
| 394 |
Term 4.2.2:::: Definition 4.2.2 |
| 395 |
Term 4.3::: Definition 4.3 |
| 396 |
Term 5:: Definition 5 |
| 397 |
|
| 398 |
.Labeled 2 |
| 399 |
Term 1;; |
| 400 |
Definition 1 |
| 401 |
Term 1.1:: |
| 402 |
Definition 1.1 |
| 403 |
|
| 404 |
[horizontal] |
| 405 |
.Labeled horizontal |
| 406 |
Term 1:: Definition 1 |
| 407 |
Term 2:: Definition 2 |
| 408 |
[horizontal] |
| 409 |
Term 2.1;; |
| 410 |
Definition 2.1 |
| 411 |
Term 2.2;; |
| 412 |
Definition 2.2 |
| 413 |
Term 3:: |
| 414 |
Definition 3 |
| 415 |
Term 4:: Definition 4 |
| 416 |
[horizontal] |
| 417 |
Term 4.1::: Definition 4.1 |
| 418 |
Term 4.2::: Definition 4.2 |
| 419 |
[horizontal] |
| 420 |
Term 4.2.1:::: Definition 4.2.1 |
| 421 |
Term 4.2.2:::: Definition 4.2.2 |
| 422 |
Term 4.3::: Definition 4.3 |
| 423 |
Term 5:: Definition 5 |
| 424 |
|
| 425 |
[qanda] |
| 426 |
.Q&A |
| 427 |
Question 1:: |
| 428 |
Answer 1 |
| 429 |
Question 2:: Answer 2 |
| 430 |
|
| 431 |
.Indent is optional |
| 432 |
- bullet |
| 433 |
* another bullet |
| 434 |
1. number |
| 435 |
. again number |
| 436 |
a. letter |
| 437 |
.. again letter |
| 438 |
|
| 439 |
.. letter |
| 440 |
. number |
| 441 |
|
| 442 |
* bullet |
| 443 |
- bullet |
| 444 |
|
| 445 |
.Break two lists |
| 446 |
. number |
| 447 |
. number |
| 448 |
|
| 449 |
Independent paragraph break list. |
| 450 |
|
| 451 |
. number |
| 452 |
|
| 453 |
.Header break list too |
| 454 |
. number |
| 455 |
|
| 456 |
-- |
| 457 |
. List block define list boundary too |
| 458 |
. number |
| 459 |
. number |
| 460 |
-- |
| 461 |
|
| 462 |
-- |
| 463 |
. number |
| 464 |
. number |
| 465 |
-- |
| 466 |
|
| 467 |
.Continuation |
| 468 |
- bullet |
| 469 |
continuation |
| 470 |
. number |
| 471 |
continuation |
| 472 |
* bullet |
| 473 |
|
| 474 |
literal continuation |
| 475 |
|
| 476 |
.. letter |
| 477 |
+ |
| 478 |
Non-literal continuation. |
| 479 |
+ |
| 480 |
---- |
| 481 |
any block can be |
| 482 |
|
| 483 |
included in list |
| 484 |
---- |
| 485 |
+ |
| 486 |
Last continuation. |
| 487 |
|
| 488 |
.List block allow sublist inclusion |
| 489 |
- bullet |
| 490 |
* bullet |
| 491 |
+ |
| 492 |
-- |
| 493 |
- bullet |
| 494 |
* bullet |
| 495 |
-- |
| 496 |
* bullet |
| 497 |
- bullet |
| 498 |
. number |
| 499 |
.. letter |
| 500 |
+ |
| 501 |
-- |
| 502 |
. number |
| 503 |
.. letter |
| 504 |
-- |
| 505 |
.. letter |
| 506 |
. number |
| 507 |
|
| 508 |
|
| 509 |
// Tables |
| 510 |
|
| 511 |
.An example table |
| 512 |
[options="header,footer"] |
| 513 |
|======================= |
| 514 |
|Col 1|Col 2 |Col 3 |
| 515 |
|1 |Item 1 |a |
| 516 |
|2 |Item 2 |b |
| 517 |
|3 |Item 3 |c |
| 518 |
|6 |Three items|d |
| 519 |
|======================= |
| 520 |
|
| 521 |
.CSV data, 15% each column |
| 522 |
[format="csv",width="60%",cols="4"] |
| 523 |
[frame="topbot",grid="none"] |
| 524 |
|====== |
| 525 |
1,2,3,4 |
| 526 |
a,b,c,d |
| 527 |
A,B,C,D |
| 528 |
|====== |
| 529 |
|
| 530 |
[grid="rows",format="csv"] |
| 531 |
[options="header",cols="^,<,<s,<,>m"] |
| 532 |
|=========================== |
| 533 |
ID,FName,LName,Address,Phone |
| 534 |
1,Vasya,Pupkin,London,+123 |
| 535 |
2,X,Y,"A,B",45678 |
| 536 |
|=========================== |
| 537 |
|
| 538 |
.Multiline cells, row/col span |
| 539 |
|==== |
| 540 |
|Date |Duration |Avg HR |Notes |
| 541 |
|
| 542 |
|22-Aug-08 .2+^.^|10:24 | 157 | |
| 543 |
Worked out MSHR (max sustainable |
| 544 |
heart rate) by going hard |
| 545 |
for this interval. |
| 546 |
|
| 547 |
|22-Aug-08 | 152 | |
| 548 |
Back-to-back with previous interval. |
| 549 |
|
| 550 |
|24-Aug-08 3+^|none |
| 551 |
|
| 552 |
|==== |
| 553 |
|
| 554 |
|
| 555 |
// System macros |
| 556 |
|
| 557 |
include::chapter1.txt[tabsize=4] |
| 558 |
|
| 559 |
ifdef::revnumber[Version number 42] |
| 560 |
|
| 561 |
ifdef::revnumber[] |
| 562 |
Version number 42 |
| 563 |
endif::revnumber[] |
| 564 |
|
| 565 |
ifeval::[{rs458}==2] |
| 566 |
: |
| 567 |
endif::[] |
| 568 |
|
| 569 |
sys::[ls -l *.txt] |
| 570 |
|
| 571 |
template::[admonitionblock] |
| 572 |
|
| 573 |
|
| 574 |
// Page break |
| 575 |
|
| 576 |
<<< |