Asciidoc is a rich text based markup language. A document written with Asciidoc can easily be converted to HTML, PDF, Docbook, Mobi, Epub, and Odt formats. This cheatsheet shows you the common features of Asciidoc Markup language.
There are 6 Level titles as HTML. First one is for document title.
= Level 1
Content ...
== Level 2
Content ...
=== Level 3
Content ...
==== Level 4
Content ...
===== Level 5
Content ...
There are ordered, unordered, checked and labeled list elements.
-
deep 1
-
deep 2
-
deep 3
-
deep 4
-
deep 5
-
-
-
-
-
deep 1
-
Order 1
-
Order 2
-
Order 2a
-
Order 2b
-
-
Order 3
-
✓ checked
-
✓ checked
-
❏ unchecked
-
normal
- CPU
-
The brain of the computer.
- Hard drive
-
Permanent storage for operating system and/or user files.
You can declare inline or block based codes with Asciidoc syntax.
Reference code like types
or methods
inline.
public interface Hello {
void hello();
}
You can use numbered elements named callouts
in Asciidoc.
require 'sinatra' // (1)
get '/hi' do // (2)
"Hello World!" // (3)
end
-
Library import
-
URL mapping
-
Content for response
You can use blocks to put emphasis on specific document section or provide contextual information
Grocery list:
- Garlic
- Bread
- Salami
And wherever men are fighting against barbarism, tyranny, and massacre, for freedom, law, and honour, let them remember that the fame of their deeds, even though they themselves be exterminated, may perhaps be celebrated as long as the world rolls round.
Birth Of Britain
Asciidoc permits the use of 5 types of admonitions to fit different information needs.
Note
|
Note
An additional information |
Tip
|
Tip
A useful information or trick |
Important
|
Important
Ensure something is known |
Caution
|
Caution
Advise the reader to act carefully (i.e., exercise care) |
Warning
|
Warning
Inform the reader of danger, harm, or consequences that exist. |
Asciidoc allows the creation of tables
Col 1 | Col 2 | Col 3 |
---|---|---|
1 |
Item 1 |
a |
2 |
Item 2 |
b |
3 |
Item 3 |
c |
6 |
Three items |
d |
AsciidocFX integrates plugins to produce UML diagrams, complex matematical formulas and JavaFX Chart.
JavaFX has 8 kind of Chart component and AsciidocFX supports all of them.
1, 4 3, 10 6, 15 9, 8 12, 5
1, 20 3, 15 6, 13 9, 12 12, 14
For other charts and available options, look at Chart extension wiki page!
PlantUML is a UML diagram extension embedded in AsciidocFX. Note that some diagram generation may require you to install Graphviz externally.
abstract class AbstractList abstract AbstractCollection interface List interface Collection
List <|-- AbstractList Collection <|-- AbstractCollection
Collection <|- List AbstractCollection <|- AbstractList AbstractList <|-- ArrayList
class ArrayList { Object[] elementData size() }
enum TimeUnit { DAYS HOURS MINUTES }
annotation SuppressWarnings
@startditaa -------- ------- ------- | --- ditaa --> | | | Text | +------- |diagram| |Document| |!magic!| | | | {d}| | | | | -------+ ------- ------- : ^ | Lots of work | ------------------------- @endditaa
@startdot digraph foo { node [style=rounded] node1 [shape=box] node2 [fillcolor=yellow, style="rounded,filled", shape=diamond] node3 [shape=record, label="{ a | b | c }"]
node1 -> node2 -> node3 } @enddot
AsciidocFX supports MathJAX, which visually outputs various languages (MathML, Tex, AsciiMath) in which complex mathematical formulas are expressed textually. You can use complex formulas in AsciidocFX and MathML and Tex formats that will be inserted as PNG images in your documents.
\begin{align} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xyp \end{align}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mi>x</mi> <mo>=</mo> <mrow> <mfrac> <mrow> <mo>−</mo> <mi>b</mi> <mo>±</mo> <msqrt> <msup> <mi>b</mi> <mn>2</mn> </msup> <mo>−</mo> <mn>4</mn> <mi>a</mi> <mi>c</mi> </msqrt> </mrow> <mrow> <mn>2</mn> <mi>a</mi> </mrow> </mfrac> </mrow> <mtext>.</mtext> </math>
You may generate a visual representation of a file system as a "Tree" structure.
booksample asciidoctor.css book.adoc chapter-01.adoc chapter-02.adoc chapter-03.adoc chapter-04.adoc chapter-05.adoc chapter-06.adoc images #kodcu.png #mathml-formula.png #tex-formula.png ##uml-diagram.png
root |-- photos | |-- camp.gif | |-- festival.png | `-- balloon.jpg |-- videos | |-- car-video.avi | |-- dance.mp4 | |-- dance01.mpg | |-- another video.divx | `-- school videos | `-- firstday.flv |-- documents | |-- jsfile.js | |-- powerpoint.ppt | |-- chapter-01.adoc | |-- archive-db.zip | |-- .gitignore | |-- README | `-- configuration.conf `-- etc.
This document is open to development and suggestions.
Thanks.