View Single Post
Old 06-19-2012, 02:49 AM   #106
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Quote:
Originally Posted by mesquite View Post
But looking through the list classes <li class="blah blah blah"> is counting each individual split in the ePUB document. There isn't really 88 its more like well... 87 and number thus as is. What do I need to fix in the inline ToC to make it output the same for MOBI as it does for ePub?.
The issue is that Mobi does not support styles for list items. The Inline TOC HTML is using list items, but styling them so that no number is shown. Mobi ignores this and shows the numbers for the items.

There are a few ways around this:
  1. I modify the code that generates the inline TOC to just use indented paragraphs. This would make it work on both. I'm tempted to do this - its not difficult - but the only question is that EPUB3 uses a list item format for its TOC and the format was trying to emulate that. On the other hand, there aren't any other EPUB3 features yet so it could be dealt with later. And I think this is going to generate a lot of questions that could be avoided.
  2. If you are already using Calibre, then don't use the inline TOC. Just tell Calibre to create the inline TOC for you at the start of the book.
  3. Use Regex to remove the ol tags, and replace the li tags with p tags (with an indented style if you want).
meme is offline