[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Making ePub books: further report
From: |
Alan L Tyree |
Subject: |
Re: [O] Making ePub books: further report |
Date: |
Mon, 12 Dec 2011 06:29:16 +1100 |
On 11/12/11 21:02:51, Jambunathan K wrote:
> Alan L Tyree <address@hidden> writes:
>
> > On 11/12/11 20:41:18, Alan L Tyree wrote:
> >> On 11/12/11 18:42:10, Nick Dokos wrote:
> >> > Alan L Tyree <address@hidden> wrote:
> >> >
> >> > > > http://thread.gmane.org/gmane.emacs.orgmode/41826/
> focus=41849
> >> > >
> >> > > Yes, Calibre does a nice job of converting XHTML to ePub; it
> can
> >> be
> >> > > read in all the readers that I use, but it won't pass the
> >> > validation
> >> > > tests. OK unless you want to publish on sites that require
> >> > validation.
> >> <SNIP>
> >>
> >> I was being unfair to Calibre. If I clean up the XHTML file
> produced
> >> by
> >> org (in the way indicated by my original post plus a couple of
> things
> >> that I didn't mention), then Calibre produces an ePub book that
> >> passes
> >>
> >> validation.
> >>
> >> So -- back to my original question: is there some variable
> somewhere
> >> that puts in both name="xxx" and id="xxx" or do I need to write a
> >> post
> >>
> >> export clean up function?
> >
> > Bad form to answer my own question: these seem to be hard coded in
> org-
> > html.el along with the other items that give ePub validation a
> nervous
> > breakdown. I'll post a full list of the offending items later.
>
>
> If you use org-xhtml.el (in contrib/lisp/org-xhtml.el) then you can
> re-define some aspects of html export selectively.
>
> For example, you can redefine this to
>
> ,---- original
> | (defun org-xhtml-format-anchor (text name &optional class)
> | (let* ((id name)
> | (extra (concat
> | (when name (format " name=\"%s\"" name))
> | (when id (format " id=\"%s\"" id))
> | (when class (format " class=\"%s\"" class)))))
> | (org-xhtml-format-tags '("<a%s>" . "</a>") text extra)))
> `----
>
> this
>
> ,---- modified
> | (defun org-xhtml-format-anchor (text name &optional class)
> | (let* ((id name)
> | (extra (concat
> | (when id (format " id=\"%s\"" id))
> | (when class (format " class=\"%s\"" class)))))
> | (org-xhtml-format-tags '("<a%s>" . "</a>") text extra)))
> `----
>
> to strip name from anchor.
>
> I am not sure whether org-xhtml.el will minimize your efforts. Just a
> suggestion.
>
> ps: Add contrib/lisp to load-path and do org-export-as-xhtml.
Thanks for this, Jambunathan. I'll give this a try.
Cheers,
Alan
>
> > Cheers,
> > Alan
> >
> >>
> >> Thanks,
> >> Alan
> >>
> >> --
> >> Alan L Tyree http://www2.austlii.edu.au/~alan
> >> Tel: 04 2748 6206 sip:address@hidden
> >>
> >>
> >>
>
> --
>
--
Alan L Tyree http://www2.austlii.edu.au/~alan
Tel: 04 2748 6206 sip:address@hidden
- [O] Making ePub books, Alan L Tyree, 2011/12/11
- Re: [O] Making ePub books, Nick Dokos, 2011/12/11
- Re: [O] Making ePub books, Alan L Tyree, 2011/12/11
- Re: [O] Making ePub books, Nick Dokos, 2011/12/11
- Re: [O] Making ePub books, Alan L Tyree, 2011/12/11
- Re: [O] Making ePub books: further report, Alan L Tyree, 2011/12/11
- Re: [O] Making ePub books: further report, Alan L Tyree, 2011/12/11
- Re: [O] Making ePub books: further report, Jambunathan K, 2011/12/11
- Re: [O] Making ePub books: further report,
Alan L Tyree <=
- Re: [O] Making ePub books: further report, Bastien, 2011/12/11
- Re: [O] Making ePub books: further report, Bastien, 2011/12/11
- Re: [O] Making ePub books: further report, Alan L Tyree, 2011/12/11
- Re: [O] Making ePub books, Nick Dokos, 2011/12/11