[NTG-context] Best strategy for ConTeXt to ePub update

Henning Hraban Ramm texml at fiee.net
Tue Feb 5 09:00:20 CET 2019


Am 2019-02-04 um 20:26 schrieb Martin Bruchanov <bruxy at regnet.cz>:

> While ago I wrote a book (http://sstv-handbook.com/) in ConTeXt and I have started to thinking about possibility to export also ePub and xHTML besides the PDF version.
> 
> Few questions:
> 
> 1. What is current support of ePub, will it export pictures automatically?

it will, but you need postprocessing to make them usable for HTML/ePub

> 2. Do I need to rewrite source code to use those verbose \startsXXX of every element (paragraph, item,...) or is there any simplier way how to handle sources as they are now?

Yes. No.
For a proper XML/XHTML export you need this markup. Also use \definehighlighting instead of switches like \em or \bf.

In my experience, you can work with the exported raw XML if your markup is good, but you must convert it to usable HTML yourself.

Unfortunately I never completed my workflow notes at:
https://wiki.contextgarden.net/Export
https://wiki.contextgarden.net/ePub

Export got better since then, but I’m not up to date about the current state. My latest attempts to get an ePub from a book worked quite well with my conversion workflow (where I use ConTeXt’s export and ePub script, but re-make most of the ePub files via Python and XSLT).
Footnotes and such are a PITA, because there’s no working mechanism in ePub for them.

ePub reader compatibility is still a big mess.



Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD



More information about the ntg-context mailing list