From: Jason Morrison <jason.p.morrison-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: EPUB toc for whole book?
Date: Thu, 25 Oct 2012 22:16:34 -0700 (PDT) [thread overview]
Message-ID: <8cc0d96a-d364-4f03-a7bb-3b0b558fa857@googlegroups.com> (raw)
In-Reply-To: <6465376.92.1335560944887.JavaMail.geo-discussion-forums@ynfi5>
[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]
I've written a Ruby script that post-processes the EPUB file to inject a
more full table of contents. It includes h1 (chapter), h2 and h3 section
levels.
I've pasted the script here: https://gist.github.com/e3158a3bba95b34ce9c0 -
it's pretty hacky, but does the job for me.
My Haskell's not sufficiently up to snuff to include a patch to do this
properly, and I'm not sure there's a way to iterate over chapters+sections
in the templates (e.g. epub-titlepage.html).
Also, in another thread, John @jgm asked for an example of an EPUB with
this kind of inline TOC, but I can't for the life of me find the thread/GH
issue. Anyway, I included and an example before/after contents.opf and the
new contents.xhtml in the paste as well.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msg/pandoc-discuss/-/c5AU3gaLto4J.
For more options, visit https://groups.google.com/groups/opt_out.
[-- Attachment #2: Type: text/html, Size: 1542 bytes --]
next prev parent reply other threads:[~2012-10-26 5:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 21:09 David Snopek
2012-04-28 10:21 ` niczero
2012-04-28 15:03 ` John MacFarlane
[not found] ` <20120428150316.GA405-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2012-04-29 13:49 ` niczero
2012-04-29 16:31 ` John MacFarlane
[not found] ` <20120429163127.GC24897-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2012-04-29 21:18 ` niczero
2012-04-29 21:37 ` John MacFarlane
2012-05-07 22:13 ` David Snopek
2012-10-26 5:16 ` Jason Morrison [this message]
[not found] ` <8cc0d96a-d364-4f03-a7bb-3b0b558fa857-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2012-10-26 6:17 ` fiddlosopher
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=8cc0d96a-d364-4f03-a7bb-3b0b558fa857@googlegroups.com \
--to=jason.p.morrison-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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.
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).