A brief reference of the most commonly used AsciiDoc syntax. You can find the full documentation for the AsciiDoc syntax at https://asciidoctor.org/docs.
Paragraphs
A normal paragraph. Line breaks are not preserved.
A blank line separates paragraphs.
This paragraph is marked with the hardbreaks
option.
Notice how line breaks are now preserved.
An indented (literal) paragraph disables text formatting, preserves spaces and line breaks, and is displayed in a monospaced font.
An admonition paragraph, like this note, grabs the reader’s attention. |
Convert this document using the asciidoctor command to see the output produced from it.
|
Text Formatting
strong importance (aka bold)
stress emphasis (aka italic)
monospaced
(aka typewriter text)
“double” and ‘single’ typographic quotes
passthrough text (substitutions disabled)
literal text
(monospaced with substitutions disabled)
a mark to remember (highlighted for notation)
Create, Read, Update, and Delete (CRUD)
fanfreakintastic
mono
culture
markup your text
A long time ago in a galaxy far, far away…
© 1976 Arty Artisan
I believe I shall—no, actually I won’t.
delete me
the images directory
a wibble does wobble
The European is blue & contains ************ arranged in a .
The -> operator is often referred to as the stabby lambda.
Since ++
has strong priority in AsciiDoc, you can rewrite C++ ⇒ C++.
\$sqrt(4) = 2\$
Attributes
// define attributes in the document header; must be flush with left margin :name: value
You can download and install Asciidoctor 2.0.18 from https://rubygems.org/gems/asciidoctor. C++ is not required, only Ruby. Use a leading backslash to output a word enclosed in curly braces, like {name}.
Anchors
A paragraph (or any block) with an anchor (aka ID) and reftext.
This paragraph has a footnote.[1]
Lists
Unordered
-
level 1
-
level 2
-
level 3
-
level 4
-
etc.
-
-
-
-
-
back at level 1
Attach a block or paragraph to a list item using a list continuation (which you can enclose in an open block).
-
Edgar Allen Poe
-
Sheri S. Tepper
-
Bill Bryson
Ordered
-
Step 1
-
Step 2
-
Step 2a
-
Step 2b
-
-
Step 3
-
is one
-
is two
-
is three
Checklist
-
checked
-
not checked
Callout
puts 'Hello, World!' (1)
1 | Prints Hello, World! to the console. |
Description
- first term
-
description of first term
- second term
-
description of second term
Document Structure
Header
// header must be flush with left margin = Document Title Author Name <author@example.org> v1.0, 2019-01-01
Sections
// must be flush with left margin = Document Title (Level 0) == Level 1 === Level 2 ==== Level 3 ===== Level 4 ====== Level 5 == Back at Level 1
Includes
// must be flush with left margin include::basics.adoc[]
// define -a allow-uri-read to allow content to be read from URI include::https://example.org/installation.adoc[]
Blocks
open - a general-purpose content wrapper; useful for enclosing content to attach to a list item
admonition - a notice for the reader, ranging in severity from a tip to an alert |
example - a demonstration of the concept being documented
Toggle Me
collapsible - these details are revealed by clicking the title
literal - an exhibit that features program output
listing - an exhibit that features program input, source code, or the contents of a file
source - a listing that is embellished with (colorized) syntax highlighting
fenced code - a shorthand syntax for the source block
quote - a quotation or excerpt; attribution with title of source are optional
citetitle
verse - a literary excerpt, often a poem; attribution with title of source are optional
citetitle
Tables
Attribute Name | Values |
---|---|
options |
header,footer,autowidth |
cols |
colspec[;colspec;…] |
grid |
all | cols | rows | none |
frame |
all | sides | ends | none |
stripes |
all | even | odd | none |
width |
(0%..100%) |
format |
psv | csv | dsv |
Multimedia

Press to reload the page.