From: Thangalin <thangalin@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: EPUB XHTML Format
Date: Wed, 4 Sep 2013 10:55:28 -0700 [thread overview]
Message-ID: <CAANrE7pNxXJuZJrggCTirupUUy7uGWUE4adVw=xEu7pdHxRAxw@mail.gmail.com> (raw)
In-Reply-To: <5226FB76.8030602@wxs.nl>
[-- Attachment #1.1: Type: text/plain, Size: 3566 bytes --]
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][
xml={\starttag[h1]#1\stoptag}
]
Would produce, upon export:
<h1>Chapter</h1>
Or (using "export" instead of "xml"; I don't care what it is named):
\setuplist[chapter][
export={\starttag[div]\startattribute[class]{chapter}#1\stopattribute\stoptag}}
]
Similarly, this would produce:
<div class="chapter">Chapter</div>
This would offer the flexibility of custom XML documents without affecting
the default behaviour.
* Generates XHTML headers (including <!DOCTYPE and <html...>)
>
> not needed as we're 'standalone'
>
Having the ability to produce the <!DOCTYPE...> and <htmnl> elements could
be as simple as:
\setupexport[
standalone=no,
]
> * Produces images as img tags, rather than float tags.
>>
> the css can deal with them (info is written to files for that)
>
Yes, but they aren't standard. There is an ecosystem of tools (e.g.,
Calibre, normalizing CSS templates, etc.), not to mention a widespread
knowledge-base, that groks the minimal XHTML specification. Plus, using XML
tags that are not in the minimal XHTML spec. means more testing on more
devices to make sure that their XHTML parsers render correctly.
> xhtml has no typical tags .. it's xml + css (or xslt) ... unfortunately
> browsers have
That is, a Strictly Conforming XHTML Document, as per:
http://www.w3.org/TR/2000/REC-xhtml1-20000126/#docconf
the export of context is in fact just xml, and by tagging it as xhtml we
> can apply css to it; but if someone has a workflow for producing epub an
> option if to postprocess that xml file into whatever epub one wants
>
I could transform the ConTeXt-generated XML into strictly conforming XHTML,
but it was a step I was hoping to avoid. Right now my process is:
1. Convert XML data to a ConTeXt .tex file.
2. Convert ConTeXt to either PDF or EPUB.
3. Stylize EPUB using CSS.
I want to use ConTeXt here (instead of going directly from XML data to
EPUB) because ConTeXt provides functionality such as multiple indexes,
table-of-contents, and bundling the .epub. Having an extra step to generate
strictly conforming XHTML is architecturally painful as it means
transforming the document three times (XML -> ConTeXt, ConTeXt -> XML, then
XML -> XHTML).
> Everytime we look into epub there's another issue ... it's not a standard
> but reversed engineered application mess (happen soften with xml: turn some
> application data structures into xml and call it a standard)
>
Some book vendors only accept validating EPUBs. ConTeXt is documented as
being able to generate EPUBs. The documentation should state the EPUBs do
not validate and do not generate strictly conforming XHTML.
I have spent the last three weeks converting documents from LaTeX to
ConTeXt because the documentation stated that ConTeXt can produce EPUBs.
While true, the documentation did not mention its shortcomings. Had I known
in advance, I probably would have gone straight to EPUB using Java or, with
a little revulsion, PHP classes. ;-) That said, I probably should have
tested this feature sooner. :-)
as i have no real use/demand for epub it's not something i look into on a
> daily basis
>
How can I help resolve these issues?
Merely "testing" (which I am happy to do) isn't going to produce a strictly
conforming XHTML document.
Kindest regards.
[-- Attachment #1.2: Type: text/html, Size: 8125 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
___________________________________________________________________________________
next prev parent reply other threads:[~2013-09-04 17:55 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 [this message]
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
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='CAANrE7pNxXJuZJrggCTirupUUy7uGWUE4adVw=xEu7pdHxRAxw@mail.gmail.com' \
--to=thangalin@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).