AsciiDoc to HTML, PDF and ePub rendering examples
I write about Elixir, Elm, Software Development, and eBook writing.
Search for a command to run...
I write about Elixir, Elm, Software Development, and eBook writing.
No comments yet. Be the first to comment.
Approaches to edit LiveView forms that use live_file_input

Collect Elixir metrics, aggregate them with StatsD and visualize them with Graphite

A couple of weeks ago I presented my talk: Elixir, Kubernetes, and minikube in the Elixir Meetup #5 organized by the fine people on curiosum.com. This talk is based on chapter 4 of my book "Deploying Elixir: Advanced Topics". If you haven't gotten t...

Deploying Elixir clusters to Production using Kubernetes

A couple of weeks ago I was invited to talk on the Elixir Wizards podcast by Smartlogic. We talk about Elixir in polyglot environments (that is, where you have a lot of languages used at the same time), my beginnings in the software field, my books, ...

Ok, last time I mentioned the advantages of AsciiDoc compared to simple Markdown for writing complex works like books.
I also said that you can use the same AsciiDoc source file and process it to generate different formats like HTML, PDF and ePUB.
Today I am going to show you how some basic and advanced elements appear in each output format.
Let's see some examples.
Bold *text*. Don't f**org**et chars!
Italic _text_. Also wi__thi__n a word.
Monospace `text` too.

This text is #highlighted#

The water formula is H~2~O
Einstein's formula is E=mc^2^

We have unordered lists
* unordered
** and nested
** short
* list
ordered lists
. ordered
.. and nested
.. short
. list
and checklists
* [*] this is done
* [x] this too
* [ ] this is not even on the horizon

Some Concept:: Some definition
Dog:: Your best friend

Sometimes you need themfootnote:[They look very smart]

kbd:[F11]
kbd:[Command+X]
Press the btn:[OK]
Select menu:View[Zoom > Reset]

WARNING: Watch you step
TIP: Some info
NOTE: Remember the milk

[quote, attribution, citation title and information]
Quote or excerpt text
[verse, Carl Sandburg, two lines from the poem Fog]
The fog comes
on little cat feet.

stem:[sqrt(4) = 2]
stem:[[[a,b\],[c,d\]\]((n),(k))]

As you can see, it is worth investing in writing in AsciiDoc as this allows you generate a full range of popular formats like HTML, PDF, ePub, DocBook, among others. Here I showed you how it looks in PDF and ePub formats that are very popular in the eBook world.
One more thing, the output can be further customized by tweaking the style used to generate the output so you can even get a different ePub or PDF visual style from the same source by changing the default styles the AsciiDoc processor uses to generate its output.
I'll talk about that in a future post.
I'm Miguel Cobá. I write about Elixir, Elm, Software Development, and eBook writing.