View Full Version : Bug or feature in iBooks


Chang
02-17-2011, 06:58 AM
I don't know if this is a bug or feature in iBooks because it's just a tricky way to link TOC and headers together. I would like to hear your opinions.

I'm using InDesign CS5 for creating EPUBs and my goal is to edit the book as much as I can in InDesign to avoid editing EPUB file after I have exported it from InDesign.
Sometimes I might have heading with capital letters e.g. "HEADING". For me this is ugly if it's showed the same way in TOC. I have circled this problem by writing another heading with normal letters e.g. "Heading" above the real heading. That means, I will have two headings: "Heading" and "HEADING" but with two different paragraph styles.
I use only the upper heading's paragraph style for creating TOC so it would read "Heading" in the EPUB's TOC. Now, my TOC is fine but I have two different headings showing in the text.
I circle this problem by adding display: none; for the upper heading's style in CSS. Now, my TOC is fine and only the real heading ("HEADING") is showing in the text.

This works perfectly in ADE but not in iBooks. Do you think it's a bug in iBooks and it could be probably fixed some day?

Here's also a EPUB file to demonstrate my problem. Please take a look at it if you have possibility to test it in iBooks.

Toxaris
02-17-2011, 08:51 AM
What you can do, is just make the heading in the text like you want to, so 'HEADING'. Create the epub. Now you have to edit the epub. Download the TweakEpub utility and run it. Open the created epub and edit the toc.ncx file.

In there, I would expect something like:

<navPoint id="chapter01" playorder="2">
<navLabel>
<text>HEADING</text>
</navLabel>
<content src="chapter01.xhtml">
</navPoint>


Of course the names of the id, playorder and filename will be different. Change the text of 'HEADING' here in 'Heading' and save. Save and close TweakEpub. If you now open the ePub, it should be as you would like.

Keep in mind, that if you open the book some editors (like Sigil), it will change back. I think that in the next version of Sigil this will be possible.

Adjust
02-17-2011, 05:57 PM
What you can do, is just make the heading in the text like you want to, so 'HEADING'. Create the epub. Now you have to edit the epub. Download the TweakEpub utility and run it. Open the created epub and edit the toc.ncx file.

In there, I would expect something like:

<navPoint id="chapter01" playorder="2">
<navLabel>
<text>HEADING</text>
</navLabel>
<content src="chapter01.xhtml">
</navPoint>


Of course the names of the id, playorder and filename will be different. Change the text of 'HEADING' here in 'Heading' and save. Save and close TweakEpub. If you now open the ePub, it should be as you would like.

Keep in mind, that if you open the book some editors (like Sigil), it will change back. I think that in the next version of Sigil this will be possible.

Yeah, I do this all the time. I edit the TOC.NCX in Textwrangler (which supports GREP searches), I do it to turn small caps into Caps from ID because IDCS3 doesn't bring across caps which have been styled using the All Caps in the character pallet.

But this should work here as well...

Search for <text>(.*?)</text>
Replace with <text>\L\1</text>

Result will be from<text>HEADING</text> to <text>heading</text> or whatever text is in between the <text></text> tags

JSWolf
02-17-2011, 06:01 PM
Probably an issue in iBooks. iBooks is known to do some odd things.

Toxaris
02-18-2011, 02:58 AM
But this should work here as well...

Search for <text>(.*?)</text>
Replace with <text>\L\1</text>

Result will be from<text>HEADING</text> to <text>heading</text> or whatever text is in between the <text></text> tags

Only if your editor supports RegEx of course. A good editor does, but not all do.

Chang
02-18-2011, 06:40 AM
Thank you all for your help!
It's just that I work in a company where we try to keep one workflow for all e-books. That's why we try to do most of the work in InDesign to avoid any kind of editing after EPUB is exported from InDesign. So far, we have been using Sigil to do minor adjustments in EPUB files after the export. I have been waiting for a long time that Sigil would allow users to access in content.opf and toc.ncx files and I really hope this would happen in the next version of Sigil.

But yeah, like JSWolf said, probably an issue in iBooks. I hope this could be fixed some day also :)

Toxaris
02-18-2011, 08:30 AM
This will be possible with Sigil in the new version. Still a number of weeks away though.