Introduction
AsciiDoc is a plain text markup language for documentation and books, first released by Stuart Rackham in 2002. It covers what technical writing needs, such as tables, admonitions, cross references, footnotes and includes, while staying readable as written. Today it is processed mostly by Asciidoctor, and the Eclipse Foundation hosts work on a formal specification.
Files use .adoc, or .asciidoc and older
.txt.
Structure
The syntax is set out on three pages:
header, attributes and sections,
blocks, lists and tables, and
inline formatting and macros.
An AsciiDoc file is plain text, normally UTF-8. The document title starts with
=, and section titles with ==, === and so on.
Lines such as :toc: set attributes, which control output and can be used
as variables. *bold* and _italic_ mark text inline. Blocks are
set apart by delimiter lines, such as four hyphens for a listing, and can be given a
style in square brackets above them, such as [source,python]. Lines like
NOTE: start admonitions, and include::chapter.adoc[] pulls in
another file.
= User Guide
:toc:
== Installation
Run the installer, then check the version:
[source,console]
----
$ tool --version
----
NOTE: You need *administrator* rights on Windows.
Not described
AsciiDoc has no finished formal specification (the Eclipse AsciiDoc Language project is writing one); the pages follow the Asciidoctor language documentation.
Known, not yet covered
- Reference: the complete built-in attribute catalogue (many are specific to one output format), see built-in attributes.
- Reference: converter-specific options such as the PDF theme keys, and Asciidoctor extensions.
- Viewer: the file opens as plain text; the header, blocks and macros are not interpreted.
Unknown
- Reference: behaviour where the language documentation and the implementation differ, until the formal specification is published.
Links
Software
- Asciidoctor – the main AsciiDoc processor, converting to HTML, PDF and more (Ruby, with JavaScript and Java versions)
- Antora – documentation site generator for AsciiDoc (Node.js)
- GitHub – code hosting site that shows .adoc files as formatted pages (web browsers)
Reference
- AsciiDoc Language Documentation – Asciidoctor’s full description of the language
- AsciiDoc Language – the Eclipse Foundation project writing the formal specification