Table of contents
ascii doctor
cli
default file extension
.adoc
generate html
asciidoctor [file]
asciidoctor [file] -o /tmp/output.html
generate adoc from html
pandoc input.html -f html -t asciidoc -o output.adoc
generate word document (from html)
pandoc document.html -o document.docx
generate pdf
asciidoctor-pdf [file]
syntax
remove auto generated last-update footer
:docdatetime:
:last-update-label:
table of contents (must be directly under document title)
= [title]
:toc:
:toc-title: Contents
headers
= document title
== section level 1
=== section level 2
==== section level 3
text formatting
*bold*
_italic_
`monospace`
*_bold italic_*
code block
[source,python]
----
print("Hello, AsciiDoc!")
----notes
NOTE: This is a note.
WARNING: Be careful!
TIP: Useful tip.
lists
unordered list
* item 1
* item 2
** subitem
ordered
. first
. second
.. subitem
definition lists
question 1?::
answer 1
question 2?::
answer 2
tables
change the prefix for table captions
:table-caption: myprefix
table
[title="caption"]
|===
| id | name
| 0 | foo
| 1 | bar
|===
table right align cells
[title="caption"]
|===
| id | value
>| 0 >| 123
>| 1 >| 4
|===
table center align cells
[title="caption"]
|===
| id | value
^| 0 ^| 123
^| 1 ^| 4
|===
table left align (default)
[title="caption"]
|===
| id | value
<| 0 <| 123
<| 1 <| 4
|===
images
include image
.title for image
image::myimage.png[]
documentation
quick reference
https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/