View Full Version : Help with ePub 3 TOC

10-11-2012, 01:30 PM
Hello, I'm working in ePub 3 and I need to make a sample for upload to apple.

My table of contents is a toc.xhtml that is also in the spine of my document. I need a way to be able to show the sections but not link to them.

Does anyone know of a way to grey table of contents entries?

Any help would be appreciated!

10-11-2012, 04:45 PM
iBooks is not 100% ePub 3 compatible. Are you sure an ePub 3 ToC will actually work in iBooks?

11-07-2012, 03:02 PM
It does work with iBooks, but it's really tricky. I'd share the tricky, but that is what I'm working on today. It doesn't like some guide and spine entries I've tried, but I can't figure out the right combination.
I did try to have non-linked <li> in my toc.xhtml, but the epub spec requires <a>

11-10-2012, 06:07 PM
even though it's been postponed to CSS4, iOS does support pointer-events property, so this is pretty hack-y, but may get the job done:

<li><a class="no-link">Chapter 4</a></li>


.no-link { pointer-events: none; }

not a great solution, though.

apple's asset guide actually states that they auto-generate samples so that you don't have to do that, though, unless you're making a read-aloud book, in which case you have to provide them with a separate sample epub.

11-20-2012, 04:14 PM
I managed to figure it out.

basically you add this code to the end of the last xhtml doc:

<a id="com_apple_itunes_epub_end0001"></a>

Then in the toc.xhtml file the list element would look like this:

<li id="ID" class="CSSCLASS"><a href="Text/Chapter_01.xhtml#com_apple_itunes_epub_end0001">Section not in the sample</a></li>

For each entry in the TOC that you want greyed out, you add a new anchor tag and link to that tag.

And the reason that we make our own samples is that we are a music publishing company and we want control over what we give away.