This page provides a comprehensive guide to Asciidoctor syntax, a powerful markup language for writing documents, books, and articles. Asciidoctor allows you to convert plain text into structured, well-formatted documents with ease.
Asciidoctor uses a simple syntax for defining document structure, including headers of different levels. The primary keyword for this section is "document structure".
= Document Title (H1)
Author Name
:toc:
:icons: font
== Section Title (H2)
Content for the H2 section.
=== Subsection Title (H3)
Content for the H3 subsection.
Learn how to format various content blocks, including quotes, notes, warnings, and more. This section focuses on "content formatting" within Asciidoctor.
[quote, Author, Source]
____
This is a block quote.
____
NOTE: This is an informational note.
[WARNING]
====
This is a warning block.
====
This is a paragraph.
Asciidoctor supports rich list types (ordered, unordered, description) and powerful table creation. Key terms here are "list syntax" and "table formatting".
.Unordered List
* Item 1
** Sub-item 1.1
- Item 2
.Ordered List
. First item
. Second item
Description list item:: Definition for the item.
.Table Example
|===
| Header 1 | Header 2
| Row 1 Col 1 | Row 1 Col 2
| Row 2 Col 1 | Row 2 Col 2
|===
Incorporate external and internal links, embed images, and include code snippets with syntax highlighting. This covers "link creation", "image embedding", and "code blocks".
// Links
Automatic link: http://example.com
Link with title: http://example.com[Example Website]
Relative link: link:../README.adoc[README]
// Images
image:image.png[Alt text]
.Block Image Title
image::image.jpg[Alt text, 300, 200]
// Code Blocks
....
This is a literal block.
....
[source,python]
----
print("Hello, Asciidoctor!")
----
Explore advanced formatting options like bold, italic, monospace, and how to include content from other files. This section highlights "advanced formatting" and "content inclusion".
*bold*, _italic_, `monospace`
[blue]
This text is blue.
include::another_file.adoc[]
For more in-depth information and advanced usage, refer to the official Asciidoctor documentation and related resources.