# [NTG-context] ConTeXt epub workflow

Thu Jul 3 05:42:22 CEST 2014

On Wed, 2 Jul 2014, Idris Samawi Hamid ادريس   سماوي حامد wrote:

> Dear gang,
>
> I have an urgent project that needs three outputs: pdf, epub, and kindle. The
> formatting needs are pretty basic. In your experience:
>
> What is the recommended, more efficient workflow for this sort of thing?
> Should I start with markdown and then generate context and epub (then convert
> epub=>kindle I presume)? Or does one context file with pdf and epub outputs
> work well?

If you are short on time and your formatting needs are basic, I would
to convert it to epub and context. There are various tools to do epub to
kindle conversion.

Markdown in a very primitive input format. For anything non-trivial
(multiple types of floats, multiple types of emphasis, etc.) you have to
resort to some sort of pre-processing of input.

Pandoc is the only tool that does Markdown to ConTeXt conversion. There
are more tools for Markdown to LaTeX conversion. The ConTeXt markup
generated by pandoc is not ideal (\bf, \em, etc instead of semantic
markup); it is possible to change the output, but you need to learn how to

XML+CSS rather than "pure" XHTML. Most browsers can handle XML+CSS, but
most (all?) epub readers cannot. So, the output is not usable without some
post-processing (this might have changed, I haven't tested ConTeXt epub in
a year or so).

In the long run, I think that the "easiest" way to generate multiple
output formats for non-trivial input text is to use XML as your input
format.