Re: [NTG-context] EPUB XHTML Format

2013-09-12 Thread Alan BRASLAU
On Thu, 5 Sep 2013 19:22:42 Aditya Mahajan 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 > transformers (in lu

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 http://wiki.contextgarden.net/ep

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-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 like

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, 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 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 tags would not be accessible -- the only way to provide true accessibility in

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 edition

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 wrote: > On 9/5/2013 8:20

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 >

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 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 straightforward

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. Gar

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Thangalin
Hi, > > > > > 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: \startfrontmatter \startstandardmakeup Title page

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 i.e. only divs and spans ---

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

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, > > > > > > > > > > > > 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. What about acce

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 aski

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, 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.

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

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 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][

Re: [NTG-context] EPUB XHTML Format

2013-09-04 Thread Thangalin
Hi. of course we could alternatively export all as > 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][ xml={\starttag[h1]#1\stoptag} ] Would produce

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 * ht

[NTG-context] EPUB XHTML Format

2013-09-03 Thread Thangalin
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/DTBook - http://www.idpf.org/epub/20/spec/OPS_2.0.1_draft.htm - http://www.w3.o