What is the current status of epub support in ConTeXt? I have never followed ConTeXt's development on the XML front too closely, but recently I have been asked to help format a text-only manuscript for publishing on platforms such as Kindle or Apple Books Store. Can ConTeXt be used (or perhaps even recommended) for that? Or would I have better luck with the proprietary tools (Kindle Create, iBooks Author)? Nicola
Am 09.12.19 um 22:13 schrieb Nicola:
Sorry, no info concerning ConTeXT. You don't have to use proprietary tools. An easy way to create ebooks from Markdown files (or other sources) is Pandoc. https://pandoc.org/ I produce all of my ebooks in this way. In most cases they validate without errors. If there are some errors though I use Calibre to fix them manually. HTH juh
On 2019-12-10, Jan U. Hasecke
Thanks, I didn't think of Pandoc, I'll give it a try. In the past, I have tried to create some simple content (slides) with Markdown, but my conclusion was that if you know TeX, it doesn't make sense to use Markdown :) Perhaps this is a silly question (excuse my ignorance about the topic): what if you want to add some stylistic touches to your ebooks, such as initials? Or Non-breaking spaces? How about adding, say, a text box with a different background and a smaller font? *** Or fine control page numbering, headers, footnotes, ligatures, or the spacing between paragraphs, or center a separator as above? Do you need to modify the generated CSS for that, or would ConTeXt (or Pandoc) allow you to take care of (some of) those things? Nicola
For Pandoc: Some things can be tweaked with pandoc, but for anything that is a bit more advanced you'll probably need a custom CSS. For special content you can use spans and divs. In your custom CSS you can define how those elements should be rendered. Sounds pretty similar to what Hans wrote in his response. Probably the main questions are if you prefer to work with pandoc markdown or with ConTeXt sources, and if you need additional output formats. Denis
The problem is that custom CSS must be tuned for every single ePub reader (app or device), it’s like the browser wars. Most readers interprete only a strange subset of CSS2, it’s completely unreliable in my (limited) experience. Have a look at https://wiki.contextgarden.net/ePub WRT ePub ot of ConTeXt, also at the old docs; unfortunately I never finished writing these pages, but I must review my ePub workflow soon-ish. Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
On 2019-12-10, Henning Hraban Ramm
The current need is only for epub. In any case, I'd like to have a single source of truth for the content. I have experimented a bit with Pandoc and, in fact, it can generate an .epub file that can be imported by iBooks Author and converted with kindlegen. As for the style, it seems that modifying the CSS gives the most control and can't be avoided for advanced tweaks, even if I'd use ConTeXt. As for ConTeXt, I have tried the latest beta with: context mybook.tex mtxrun --script epub --make mybook This, among the rest, creates an .epub file, which unfortunately the above mentioned tools do not like (maybe, that output is still experimental?). I'll try to follow the more complex steps at https://wiki.contextgarden.net/Epub_Sample.
That's... sad.
Thanks, I'll give it a shot! Nicola
Am 10.12.19 um 20:38 schrieb Nicola:
You can validate epubs with epubcheck: https://github.com/w3c/epubcheck I don't know if ConTeXt produces epub2 or epub3. http://idpf.org/epub/30/ HTH juh -- Das ZEN von Pandoc Bücher und E-Books einfach und professionell produzieren http://www.amazon.de/Das-ZEN-von-Pandoc-professionell/dp/1505218799/ Paperback (232 Seiten) und E-Book
Am 10.12.19 um 08:50 schrieb Nicola:
On 2019-12-10, Jan U. Hasecke
wrote:
Ebooks are xhtml so styles are limited to the capabilities of css. I fear that initials has to be left flowing images.
No page numbers in E-Books and I would avoid headers. Footnotes are endnotes. Ligatures might be possible if directly inserted, sorry never tried this in an ebook. You can modify the css to achieve what is possible in xhtml, though. I have to confess that I never managed to create an ebook with context right aways. AFAIK, please correct me Hans, you end up with an epub folder not the compressed epub itself. I would guess that it is a good thing if you want to postprocess the book manually by editing content files or css. What I can say about epub generally is: It's better to avoid fancy styling at all and use the default fonts and styles of the ebook devices. HTH juh
On 12/11/2019 7:10 AM, Jan U. Hasecke wrote:
(btw, it's a pitty that pdf viewers can't handle very high pages well because having a book with every chapter one page would be nice ... no float issue then; i tried that but the problem is that viewers don't remember the vertical positions when you go backward) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 12/11/2019 01:10, Jan U. Hasecke wrote:
Ebooks are xhtml so styles are limited to the capabilities of css. I fear that initials has to be left flowing images.
Sorry, but if I understand what you mean by initials, that is not the case. Consider .lettrine>p::first-letter { font-size : 3rem ; line-height : 0 ; } This produces a raised large character at the beginning of a paragraph. It does not automatically accommodate leading quotation marks and such, so some tuning may be needed, and of course you have to tag the paragraph with the appropriate class. Similarly, you can set the first line of a paragraph to smallcap. -- Rik
On 12/9/2019 10:13 PM, Nicola wrote: transform the xml to whatever wanted) ... for more complex setups i think there are no generic solutions (unless all books should look alike) ... of course for 'proze, itemize, simple table, simple sectioning' not much is needed (i gave away my ebook device so i can't check what's the fashion right now but as color e-ink seems to be on it's way ...) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (7)
-
Denis Maier
-
Hans Hagen
-
Henning Hraban Ramm
-
Jan U. Hasecke
-
Nicola
-
Rik Kabel
-
Rik Kabel