From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: ePub construction Date: Tue, 13 Dec 2011 20:42:38 -0500 Message-ID: <10534.1323826958@alphaville.americas.hpqcorp.net> References: <1323816335.4781.0@windy> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Radrr-00060q-3S for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 20:42:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Radrl-0007e3-GX for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 20:42:47 -0500 Received: from g5t0006.atlanta.hp.com ([15.192.0.43]:25042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Radrk-0007Yd-Mp for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 20:42:41 -0500 In-Reply-To: Message from Alan L Tyree of "Wed, 14 Dec 2011 09:45:35 +1100." <1323816335.4781.0@windy> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Alan L Tyree Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Alan L Tyree wrote: > G'day, > > Here are the modifications that I needed to make to the exported html > file (using the standard exporter) in order to get a valid ePub > document. http://threepress.org/document/epub-validate provides an > on-line validation service. > > My document is relatively simple, but does have footnotes, citations > and formatting commands. > > I will be happy to add a fuller description to worg if someone will > point me to some instructions. > > > 1. Make the html file have utf-8 encoding; there are probably several > ways to do this, but I used the emacs23 menu MULE options on the org > document. > > 2 Change the language statement by removing the "lang=" attribute: > > From: xml:lang="en"> > > To: > > 3 Change anchor descriptions associated with section headings by > removing "name=" entries, for example, > > From: > > To: > > NOTE: this can now be done by customising org-export-html-headline- > anchor-format (Thanks Bastien!!) > > 4. Change anchor class="footref" by replacing "name=" with "id=". For > example: > > from: > > to: > > 5. Change anchor class="footnum" by replacing "name=" with "id=". For > example: > > from: 1 > > to: 1 > Interesting - I downloaded the epub validator, ran Calibre on a silly little org-produced HTML file and duplicated your "lang" problem. AFAICT, all of the problems you mention above are legal HTML4, so either the epub spec (which I have not looked at: do you have a pointer?) is made to trip people up by enforcing restrictions that they dreamed up, or the validator is not quite as smart as it should be. Just for kicks, I ran it against the Calibre Quick Start Guide (the only "real" ebook I had access to) and it gave me an error :-) ,---- | Epubcheck Version 3.0b3 | | ERROR: Calibre Quick Start Guide - John Schember.epub/OEBPS/content.opf(5,57): attribute "file-as" not allowed here; expected attribute "id", "opf:file-as", "opf:role" or "xml:lang" | | Check finished with warnings or errors! `---- so, presuming that the ebook is "fine", I'm not sure how seriously to take the validator. Nick PS In case it's not obvious, all I know about ebooks is what is contained in this email. Caveat emptor.