AsciiDoc Kitchen Sink
Updated 2021-August-3

Page contents


2021-May-11  As of today, this article has been on Infinite Ink for 1 year.🎂

About this page

The next section was forked⁠[1] from Dan Allen's That gist is “a sample AsciiDoc file for testing Asciidoctor” and uses some legacy AsciiDoc syntax.


If you use Asciidoctor and want to use legacy AsciiDoc syntax in an article, put the following in the article’s AsciiDoc document header.



Forked “Asciidoctor Demo”🍴


This is a demonstration of Asciidoctor. And this is the preamble of this document.


This document exercises many of the features of AsciiDoc to test the Asciidoctor implementation.

If you want the output to look familiar, copy (or link) the AsciiDoc stylesheet, asciidoc.css, to the output directory.
Items marked with TODO are either not yet supported or a work in progress.

First steps with AsciiDoc

Inline markup
  • underscores around a phrase place emphasis

  • asterisks around a phrase make the text bold

  • double asterisks around one or more letters in a word make those letters bold

  • double underscore around a substring in a word emphasize that substring

  • use carets around characters to make them superscript

  • use tildes around characters to make them subscript

  • to pass through HTML directly, surround the text with triple plus

  • characters can be escaped using a \

    • for instance, you can escape a quote inside emphasized text like Here's Johnny!

  • you can safely use reserved XML characters like <, > and &, which are escaped when rendering

  • force a space between inline elements using the {sp} attribute

  • hold text together with an intrinsic non-breaking space attribute, {nbsp}

  • handle words with unicode characters like in the name Gregory Romé

  • claim your copyright ©, registered trademark ® or trademark ™

You can write text with inline links, optionally using an explicit link prefix. In either case, the link can have a query string.

If you want to break a line
just end it in a + sign
and continue typing on the next line.

Lists upon lists

Adjacent lists
  • this list

  • should join

  • to have

  • four items

Numbered lists
  1. These items

  2. will be auto-numbered

    1. and can be nested

  3. A numbered list can nest

    • unordered

    • list

    • items


I swear I left it in Guy's car. Let's go look for it.


definition line two

another term

another definition, which can be literal (indented) or regular paragraph

This should be a standalone paragraph, not grabbed by the definition list.

  • first level written on two lines

  • first level

    with this literal text
    • second level

      • third level

        • fourth level

  • back to
    first level

Let’s make a horizontal rule…​

then take a break.

We’re back!

Want to see a Tiger

Do you feel safer with the tiger in a box?

Figure 1. Tiger in a box

Included section

Look, I came from out of the blue!

I’m keepin' it open.

An open block, like this one, can contain other blocks.

It can also act as any other block. (TODO)

Asciidoctor usage example, should contain 3 lines
doc ="*This* is it!", :header_footer => false)

puts doc.render

Here’s what it outputs (using the built-in templates):

<div class="paragraph">
  <p><strong>This</strong> is it!</p>


AsciiDoc is so powerful!

This verse comes to mind.

La la la

Here’s another quote:

“When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.”

— Sir Arthur Conan Doyle
The Adventures of Sherlock Holmes

Getting literal

Want to get literal? Just prefix a line with a space (just one will do).
I'll join that party, too.

We forgot to mention in Numbered lists that you can change the numbering style.

  1. first item (yeah!)

  2. second item, looking so mono

  3. third item, mono it is!


AsciiDoc is quite cool, you should try it!

Go to this URL to learn more about it:

Or you could return to the First Steps or Purpose.

Here’s a reference to the definition of another term, in case you forgot it.

One more thing. Happy documenting!

When all else fails, head over to


How I included the above “Asciidoctor Demo” on this page

The source of the previous section of this article looks like this:

== Forked &ldquo;Asciidoctor Demo&rdquo;&#x1F374;

         this type of path is used by Hugo


To learn about AsciiDoc include directives and the leveloffset attribute, see


See also


1. Infinite Ink’s fork of Dan Allen’s gist corrected some typos, changed the section headings to Infinite Ink’s style, and changed google to duckduckgo.

Comments 👍 📝

Please leave a comment so I know I'm not speaking into the void. Also, your comment might improve this page or help me to improve this page.🤩