AsciiDoc Guide
1. Document Attributes
Set in a document, usually just below header. Details here
:author: John Smith :email: john@smith.com :doctype: article | book | inline | manpage :toc: auto | left | right | macro | preamble :toc-title: Contents :toclevels: 3 (1-5) :revnumber: 0.9 :revdate: 31st July 2021 :revremark: Draft :experimental: :imagedir: .\images :numbered: :keywords: comma, separated, list, will, appear, in html keywords :description: adds a meta \ description that will appear in html header \ use backslash to span many lines
2. The Basics
2.1. Headers
= Document Title (Level 0) PREAMBLE : Any text between Document title and first Level 1 header appears in a larger font, it's termed a `leadrole` you can use the attribute [.lead] to promote any paragraph or you can disable it in the preamble by using [.normal] == Level 1 Section Title // Level 1 will get a <hr> below it === Level 2 Section Title ==== Level 3 Section Title ===== Level 4 Section Title ====== Level 5 Section Title == Another Level 1 Section Title
2.2. Paragraphs
Separated by blank lines
We were somewhere around Barstow on the edge of the desert when the drugs began to take hold. I remember saying something like "I feel a bit lightheaded; maybe you should drive...." And suddenly there was a terrible roar all around us and the sky was full of what looked like huge bats, all swooping and screeching and diving around the car, which was going about a hundred miles an hour with the top down to Las Vegas.
Renders as
We were somewhere around Barstow on the edge of the desert when the drugs began to take hold. I remember saying something like "I feel a bit lightheaded; maybe you should drive…."
And suddenly there was a terrible roar all around us and the sky was full of what looked like huge bats, all swooping and screeching and diving around the car, which was going about a hundred miles an hour with the top down to Las Vegas.
2.2.1. Hard line breaks
Rubies are red, + Topazes are blue.
Or use the hardbreaks option
[%hardbreaks] Ruby is red. Java is beige.
2.2.2. Paragraph Justification
Use text-<alignment>
where alignment can be left
, center
, right
, justify
[.text-justify] We were somewhere around Barstow on the edge of the desert when the drugs began to take hold. I remember saying something like "I feel a bit lightheaded; maybe you should drive...."
2.3. Text Formatting
2.3.1. Text Formatting
Item | Description |
---|---|
*Bold* |
Bold |
Par**bold** is a place in Lancashire |
Parbold is a place in Lancashire |
_Italic_ |
Italic |
The word __Italic__ized scores 22 points in scrabble |
The word Italicized scores 22 points in scrabble |
`Monospace` |
|
Moon Space is an anagram of ``Monospace`` |
Moon Space is an anagram of |
You can monospace attributes like this `+{author}+` |
You can monospace attributes like this |
Compare with `{author}` |
Compare with |
This text is #highlighted# |
This text is highlighted |
Subscript : H~2~O |
Subscript : H2O |
Superscript : E=mc^2^ |
Superscript : E=mc2 |
2.3.2. Text Decoration
Item | Description |
---|---|
[.underline]#underline me# |
underline me |
[.overline]#overline me# |
overline me |
[.line-through]#strike through# |
strike through |
[.nobreak]#An un broken string of text as a long line of text that will never be split# |
An un broken string of text as a long line of text that will never be split |
[.nowrap]#Do not wrap this text# |
Do not wrap this text |
[.pre-wrap]#All spaces are preserved s# |
All spaces are preserved s |
2.4. Text Symbols
Item | Description |
---|---|
(C) (R) (TM) |
© ® ™ |
© ® ™ |
© ® ™ |
-> => <- <= |
→ ⇒ ← ⇐ |
→ ⇒ ← ⇐ |
→ ⇒ ← ⇐ |
♥ ♣ ♦ ♠ |
♥ ♣ ♦ ♠ |
{pp} {plus} {deg} {cpp} |
++ + ° C++ |
2.4.1. Menu, Button & Keyboard Macro
You need to enable the experimental attribute in AsciiDoc
|
Item | Description |
---|---|
Select menu:File[View > Zoom > 150%] |
Select |
Press the btn:[OK] button when you are finished |
Press the OK button when you are finished |
Press kbd:[Ctrl+Alt+Delete] to log out |
Press Ctrl+Alt+Delete to log out |
2.4.2. Font size adjustment
Depreciated
We will teach our twisted speech
To the young believers
We will train our blue-eyed men
To be young believers
[%collapsible] does not work in Antora |
[.big]#We will teach our twisted speech# [.small]#To the young believers# [.big]#We will train our blue-eyed men# [.small]#To be young believers#
2.5. Apostrophes and Quotes
Item | Description |
---|---|
“The horror! The horror!” |
“The horror! The horror!” |
'The horror! The horror!' |
'The horror! The horror!' |
"\n\t" and '\n\t' |
"\n\t" and '\n\t' |
"`Joseph Conrad’s “Heart of Darkness.”`" |
“Joseph Conrad’s “Heart of Darkness.”” |
Conrad’s and Conrad\’s |
Conrad’s and Conrad\’s |
``vi```'s my favourite text editor |
|
-
See Asciidoctor Docs for details