emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Alan L Tyree <alantyree@gmail.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: ePub construction
Date: Tue, 13 Dec 2011 20:42:38 -0500	[thread overview]
Message-ID: <10534.1323826958@alphaville.americas.hpqcorp.net> (raw)
In-Reply-To: Message from Alan L Tyree <alantyree@gmail.com> of "Wed, 14 Dec 2011 09:45:35 +1100." <1323816335.4781.0@windy>

Alan L Tyree <alantyree@gmail.com> 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: <html xmlns="http://www.w3.org/1999/xhtml" lang="en" 
> xml:lang="en">
> 
> To: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
> 
> 3 Change anchor descriptions associated with section headings by
>    removing "name=" entries, for example,
> 
> From: <a name="sec-1" id="sec-1"></a>
> 
> To: <a id="sec-1"></a>
> 
> 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: <a class="footref" name="fnr.2" href="#fn.2">
> 
> to: <a class="footref" id="fnr.2" href="#fn.2">
> 
> 5. Change anchor class="footnum" by replacing "name=" with "id=". For
>    example:
> 
> from: <a class="footnum" name="fn.1" href="#fnr.1">1</a>
> 
> to: <a class="footnum" id="fn.1" href="#fnr.1">1</a>
> 

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.

  reply	other threads:[~2011-12-14  1:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-13 22:45 ePub construction Alan L Tyree
2011-12-14  1:42 ` Nick Dokos [this message]
2011-12-14  3:14   ` Alan L Tyree
2011-12-14  8:53     ` Olaf Dietsche
2011-12-14 13:58       ` Nick Dokos
2011-12-14 23:24 ` suvayu ali
2011-12-14 23:56   ` Alan L Tyree

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=10534.1323826958@alphaville.americas.hpqcorp.net \
    --to=nicholas.dokos@hp.com \
    --cc=alantyree@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).