User login

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:
https://github.com/asciidoctor/asciidoctor-pdf

Which is basically the same instructions as at http://asciidoctor.org/docs/convert-asciidoc-to-pdf/

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.


Next: http://asciidoctor.org/docs/asciidoc-writers-guide

And: https://daveyshafik.com/archives/70014-authoring-with-the-atom-text-editor.html

See also, this fact from asciidoctor.org 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.


Reference:

http://www.linuxquestions.org/questions/linux-newbie-8/asciidoc-pdf-output-4175459992/

using a2x with asciidoc make pdf

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

http://asciidoc.org/a2x.1.html

http://stackoverflow.com/questions/21291103/shell-script-to-create-pdf-from-asciidoc


What an ASCIIdoc document looks like,

= Document Title
Doc Writer <doc@example.com>
:doctype: book
:reproducible:
//: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 http://asciidoc.org[AsciiDoc] document.

== Introduction

A paragraph followed by a simple list with square bullets.

[square]
* item 1
* item 2

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

.Create a basic PDF document using Prawn
[source,ruby]
----
require 'prawn'

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

via https://raw.githubusercontent.com/asciidoctor/asciidoctor-pdf/master/examples/basic-example.adoc

Searched words: 
simple markup to PDF, Mobi, epub

Comments

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>
  • Lines and paragraphs break automatically.

More information about formatting options

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