ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mica Semrick <paperdigits@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: EPUB XHTML Format
Date: Fri, 6 Sep 2013 09:36:56 -0700	[thread overview]
Message-ID: <CABkompLnTPuKJVw3WRHt_V4BiHXFtf7CybRfzGcipt89ksbjZg@mail.gmail.com> (raw)
In-Reply-To: <CAANrE7pjNTxXP95c=R+KWACkx_SY8DU0rrwC_L6deNW5m8WhOg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 4830 bytes --]

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 editions
and several other readers). "But it is just XHML + CSS!" you'll cry, "How
can they not render it correctly?" I don't know, but it was an extremely
frustrating process. I even contacted adobe to try and report this nested
list bug to them... their suggestion was that I could *pay* them to work
with "content experts" who would help me "correct" my source so that it
would render "correctly."

The best reader imho is iBooks on the iPad, nothing else, from what I've
seen, comes close. But that is one expensive eReader. :(


On Thu, Sep 5, 2013 at 3:00 PM, Thangalin <thangalin@gmail.com> wrote:

> 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 database doesn't generate DocBook. It generates a custom XML document
> from which I generate a web page, and a LaTeX document (though soon to be
> ConTeXt!). There is no reason, technically, why I cannot convert the source
> XML to either DocBook or directly to EPUB. There are, however, problems
> doing that, which Aditya correctly surmises:
>
>
>> - Automatic section numbering taking care of different conversions.
>> - Automatic index generation and sorting
>> - Inserting hyphenation points at the appropriate place in the generated
>> output (so that the browser can effectively rely on TeX's hyphenation
>> algorithm to do line-breaking).
>>
>> - Convert TeX math to MathML.
>>
>> The current ConTeXT XML source can translate a well formed ConTeXt
>> document into a XML document with the above features.
>>
>
> Those are exactly the issues that I would love to resolve using ConTeXt
> for generating an EPUB. (The MathML isn't as important to me, but I can see
> other people wanting such a feature.)
>
> What about accessibility? I expect that visually impaired people would
>> depend on document structure rather than its visualisation.
>
>
> 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 accessibility in EPUB format would be by using the
> strict XHTML tags.
>
> for instance, we have more levels than H1..H6, so how to do H7? if someone
>> has to deal with that, he/she can as well transform all into H1 with some
>> class which is a local solution then
>
>
> I realize there is not going to be a one-to-one map of all possible
> ConTeXt macros to XHTML. For someone who has 7 levels of nested sections
> they would either have to rewrite some Lua or perform some post-processing
> (e.g., with XSLT). I would posit that a document with 7 levels of nested
> sections is not going to be a common occurrence.
>
> When I talk about strict XHTML, I'm proposing that a _simple_ ConTeXt
> document (up to 6 header levels, numbered and unnumbered lists, images,
> text emphasis, etc.) should generate a simple, validating XHTML document.
> Trying to attain 100% coverage of ConTeXt transmogrification to XHTML is
> ridiculous when, I suspect, 80% coverage would meet most needs. :-)
>
> It is definitely possible to translate the ConTeXt EPUB output to XHTML.
> However, there are practical realities that hinder such an approach.
> Architecturally, if anyone is going to translate an XML document to EPUB
> format, it certainly won't be this way:
>
> *XML + XSLT -> ConTeXT File -> ConTeXt EPUB XML + XSLT -> EPUB + CSS*
>
> It'll be this way, which is less time-consuming, less complex, and less
> susceptible to err:
>
> *XML + XSLT (or API) -> EPUB + CSS*
>
> However, it does not, as we all know, produce as feature rich output as
> leveraging the ConTeXt abilities that Aditya mentioned, which was the point:
>
> *XML + XSLT -> ConTeXT TeX -> EPUB + CSS*
>
> Kindest regards.
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 7505 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2013-09-06 16:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04  1:19 Thangalin
2013-09-04  9:20 ` Hans Hagen
2013-09-04 17:55   ` Thangalin
2013-09-05 13:55     ` Hans Hagen
2013-09-12 14:32       ` Alan BRASLAU
2013-09-05 16:38   ` Hans Hagen
2013-09-05 16:57     ` Thangalin
2013-09-05 17:57       ` Khaled Hosny
2013-09-05 18:22         ` Hans Hagen
2013-09-05 17:22     ` Aditya Mahajan
2013-09-05 18:21       ` Hans Hagen
2013-09-05 18:11 ` honyk
     [not found] ` <00b501ceaa63$61805e50$24811af0$@tosovsky@email.cz>
2013-09-05 18:20   ` Aditya Mahajan
2013-09-05 18:24     ` Hans Hagen
2013-09-05 19:54       ` Mica Semrick
2013-09-05 21:15       ` Michael Hallgren
2013-09-05 22:00     ` Thangalin
2013-09-06 16:09       ` Hans Hagen
2013-09-06 16:36       ` Mica Semrick [this message]
2013-09-06 20:20         ` Thangalin
2013-09-06 21:22           ` Thangalin
2013-09-06 21:27             ` Aditya Mahajan
2013-09-07 12:07           ` Hans Hagen
2013-09-07 18:31             ` Thangalin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABkompLnTPuKJVw3WRHt_V4BiHXFtf7CybRfzGcipt89ksbjZg@mail.gmail.com \
    --to=paperdigits@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).