Re: [NTG-context] EPUB XHTML Format

2013-09-12 Thread Alan BRASLAU
On Thu, 5 Sep 2013 19:22:42 Aditya Mahajan adit...@umich.edu wrote: How easy is it to create a new export format. IIRC, context keeps track of the entire document tree, and flushes the XML output only at the end. Is it possible to make this pluggable so that users can write their own

Re: [NTG-context] EPUB XHTML Format

2013-09-07 Thread Hans Hagen
On 9/6/2013 10:20 PM, Thangalin wrote: Hi, The best reader imho is iBooks on the iPad, nothing else, from what I've seen, comes close. But that is one expensive eReader. :( We'll just have everybody in the world who has a Kindle, Kobo, or other reader exchange their existing hardware,

Re: [NTG-context] EPUB XHTML Format

2013-09-07 Thread Thangalin
Hi, so, i'd never claim that context produces epub but it can be used in a workflow that involves epub as it outputs xml which can be transformed That's a distinction that either might not matter or sometimes is lost: http://tex.stackexchange.com/a/17642/2148

Re: [NTG-context] EPUB XHTML Format

2013-09-06 Thread Mica Semrick
Another small note, since I just walked down the ePUB path: you'll be very sad to find out that a lot of rendering engines for popular readers are not consistent, won't render standard XHTML markup correctly (nest an ordered list within an unordered list and then look at it in adobe digital

Re: [NTG-context] EPUB XHTML Format

2013-09-06 Thread Hans Hagen
On 9/6/2013 12:00 AM, Thangalin wrote: That is a good point. The current XML structure produced by ConTeXt (Hans correct me here if I'm mistaken) is not accessible, as it doesn't adhere to strict XHTML. I suspect that div tags would not be accessible -- the only way to provide true

Re: [NTG-context] EPUB XHTML Format

2013-09-06 Thread Thangalin
Hi, The best reader imho is iBooks on the iPad, nothing else, from what I've seen, comes close. But that is one expensive eReader. :( We'll just have everybody in the world who has a Kindle, Kobo, or other reader exchange their existing hardware, and then purchase an iPad plus iBook. Problem

Re: [NTG-context] EPUB XHTML Format

2013-09-06 Thread Aditya Mahajan
On Fri, 6 Sep 2013, Thangalin wrote: Hi, never mind not being able to add the books to online marketplaces (such as Amazon) because, again, the output does not validate. I think the simplest thing to do would be to update the wiki and have a note that informs readers that while ConTeXt can

Re: [NTG-context] EPUB XHTML Format

2013-09-06 Thread Thangalin
Hi, never mind not being able to add the books to online marketplaces (such as Amazon) because, again, the output does not validate. I think the simplest thing to do would be to update the wiki and have a note that informs readers that while ConTeXt can be used to generate an EPUB, it is

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Hans Hagen
On 9/4/2013 7:55 PM, Thangalin wrote: Hi. of course we could alternatively export all as div class=tag-subtag-... but i don't like that too much; html itself is not rich enough for our purpose What about giving developers the ability to change the destination element? For example:

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Aditya Mahajan
On Thu, 5 Sep 2013, Hans Hagen wrote: On 9/4/2013 11:20 AM, Hans Hagen wrote: you get a representation in xml indeed, but not verbatim, but as close as possible to the genaric (parent) structure elements in context probably the most straightforward xhtml export is file with only div

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Hans Hagen
On 9/5/2013 7:57 PM, Khaled Hosny wrote: On Thu, Sep 05, 2013 at 09:57:59AM -0700, Thangalin wrote: Hi, div class=section ... div class=... ... div /div i.e. only divs and spans I think that would be a more robust output format, technically, easier to adapt, and more

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Hans Hagen
On 9/5/2013 8:20 PM, Aditya Mahajan wrote: The typical ConTeXt document has a lot of structure, and the XML export generates a well structured XML output. That can be directly used in most modern browsers that handle XML+CSS well. However, most (all?) EPUB readers don't. So, the question is

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Khaled Hosny
On Thu, Sep 05, 2013 at 09:57:59AM -0700, Thangalin wrote: Hi, div class=section ... div class=... ... div /div i.e. only divs and spans I think that would be a more robust output format, technically, easier to adapt, and more readily conform to the strict XHTML

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Michael Hallgren
Le 05/09/2013 20:24, Hans Hagen a écrit : On 9/5/2013 8:20 PM, Aditya Mahajan wrote: The typical ConTeXt document has a lot of structure, and the XML export generates a well structured XML output. That can be directly used in most modern browsers that handle XML+CSS well. However, most (all?)

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Hans Hagen
On 9/4/2013 11:20 AM, Hans Hagen wrote: you get a representation in xml indeed, but not verbatim, but as close as possible to the genaric (parent) structure elements in context probably the most straightforward xhtml export is file with only div class=section ... div class=... ...

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Thangalin
Hi, div class=section ... div class=... ... div /div i.e. only divs and spans I think that would be a more robust output format, technically, easier to adapt, and more readily conform to the strict XHTML tag subset. The other issue I encountered was this:

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Aditya Mahajan
On Thu, 5 Sep 2013, honyk wrote: On 2013-09-04 Thangalin wrote: What needs to happen to take a minimal ConTeXt file (such as the attached) to produce a minimum viable EPUB that: It is always difficult to parse and further process not well structured plain text without advanced semantics.

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Hans Hagen
On 9/5/2013 7:22 PM, Aditya Mahajan wrote: On Thu, 5 Sep 2013, Hans Hagen wrote: On 9/4/2013 11:20 AM, Hans Hagen wrote: you get a representation in xml indeed, but not verbatim, but as close as possible to the genaric (parent) structure elements in context probably the most

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread honyk
On 2013-09-04 Thangalin wrote: What needs to happen to take a minimal ConTeXt file (such as the attached) to produce a minimum viable EPUB that: It is always difficult to parse and further process not well structured plain text without advanced semantics. Garbage in, garbage out. If you

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Thangalin
Hi, handle XML+CSS well. However, most (all?) EPUB readers don't. So, the question is asking if instead ConTeXt could generate a XHTML Precisely. If you need both EPUB and PDF, start with a semantically rich XML vocabulary, e.g. DocBook. In this case you can relatively easy transfrom My

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Mica Semrick
I'd say use an xml source (docbook, TEI, or DITA) and then write a ConTeXt stylesheet to typeset your XML. See http://wiki.contextgarden.net/TEI_xml I think that TEI-lite is a nice, very general XML vocabulary... Best, Mica On Thu, Sep 5, 2013 at 11:24 AM, Hans Hagen pra...@wxs.nl wrote: On

Re: [NTG-context] EPUB XHTML Format

2013-09-04 Thread Hans Hagen
On 9/4/2013 3:19 AM, Thangalin wrote: Hi, The attached t.tex file produces the attached t.xhtml file. I have looked at the following documents: * http://en.wikipedia.org/wiki/EPUB#Open_Publication_Structure_2.0..1 http://en.wikipedia.org/wiki/EPUB#Open_Publication_Structure_2.0.1 *

Re: [NTG-context] EPUB XHTML Format

2013-09-04 Thread Thangalin
Hi. of course we could alternatively export all as div class=tag-subtag-... but i don't like that too much; html itself is not rich enough for our purpose What about giving developers the ability to change the destination element? For example: \setuplist[chapter][