Writing in ASCIIdoc with Asciidoctor for easy creation of book-quality PDFs
Note: I'm doing this because Leanpub (like atlas.oreilly.com) 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 http://asciidoctor.org/
Also gets a mention here: http://asciidoc.org/INSTALL.html
And I followed the gem install instructions for Asciidoctor PDF:
Which is basically the same instructions as at http://asciidoctor.org/docs/convert-asciidoc-to-pdf/
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 asciidoctor.org home page:
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 <[email protected]>
// Uncomment next line to set page size (default is A4)
A simple http://asciidoc.org[AsciiDoc] document.
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
Prawn::Document.generate 'example.pdf' do
text 'Hello, World!'