User login

Writing in ASCIIdoc with Asciidoctor for easy creation of book-quality PDFs

Note: I'm doing this because Leanpub (like appears to be keeping proprietary the software for generating PDFs, ePub, Mobi etc from their open standard Markua. At least i couldn't find anything searching 'publish "markua" to PDF'. And Leanpub charges $99 to start writing a book with their toolset.

I followed the Debian instructions at

Also gets a mention here:

And I followed the gem install instructions for Asciidoctor PDF:

Which is basically the same instructions as at

asciidoctor-pdf basic-example.adoc

Which they say is shorthand for "asciidoctor -r asciidoctor-pdf -b pdf basic-example.adoc" but i'm a bit worried since the man page of my asciidoctor doesn't show an "r" flag.



See also, this fact from home page:

Asciidoctor also runs in JavaScript. We use Opal to transcompile the Ruby source to JavaScript to produce Asciidoctor.js, a fully-functional version of Asciidoctor that works in any JavaScript environment, such as a web browser or Node.js. Asciidoctor.js is used to power the AsciiDoc preview extensions for Chrome, Atom, Brackets and other web-based tooling.


using a2x with asciidoc make pdf

Never did figure out tha a2x approaches, which seem to assume an older way of installing asciidoc...

What an ASCIIdoc document looks like,

= Document Title
Doc Writer <>
:doctype: book
//:source-highlighter: coderay
:source-highlighter: rouge
:listing-caption: Listing
// Uncomment next line to set page size (default is A4)
//:pdf-page-size: Letter

A simple[AsciiDoc] document.

== Introduction

A paragraph followed by a simple list with square bullets.

* item 1
* item 2

Here's how you say "`Hello, World!`" in Prawn:

.Create a basic PDF document using Prawn
require 'prawn'

Prawn::Document.generate 'example.pdf' do
  text 'Hello, World!'


Searched words: 
simple markup to PDF, Mobi, epub


Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.