View Full Version : Can't seem to crack this iBooks problem


j9ff
12-12-2011, 02:20 AM
I'm nearing the end of creating my first ePub book and I'm struggling to get the "# pages left" feature in the bottom right corner of iBooks to work properly. I've divided all my chapters with unique XHTML files and further divided up each chapter into sub-sections with H5 tags.

I believe the "pages left" counter should count down to the end of the chapter, but instead counts down to the next H5 tag. Anyone dealt with this problem before? Is it the H5 tags causing the problem?

I could try changing to another H-tag but I'm already using the first 4 for other header styles, so it will be a lot of work to rearrange them. :help:

Jellby
12-12-2011, 05:23 AM
It wouldn't surprise me if it counted up to the next H# tag, whatever number it is.

st_albert
12-12-2011, 01:29 PM
Is it important that the heading actually be a <hx> tag? (e.g. you want it to appear as a sub-header in a nested toc.ncx) or could you substitute a <p> tag with the same styling as you were using for the <h5> tag? (and you could still put the entry into the toc.ncx by hand.)

And yes, the above is an impure thought, semantics-wise (because I'm suggesting you code for how you want the element to appear, rather than what the element is), but hey, when you are dealing with iBooks you gotta do what you gotta do.

:D

Jellby
12-12-2011, 02:40 PM
Is it important that the heading actually be a <hx> tag? (e.g. you want it to appear as a sub-header in a nested toc.ncx)

That wouldn't be a reason anyway. You can add (or remove) what you want where you want in the NCX.

JSWolf
12-12-2011, 03:39 PM
I'm nearing the end of creating my first ePub book and I'm struggling to get the "# pages left" feature in the bottom right corner of iBooks to work properly. I've divided all my chapters with unique XHTML files and further divided up each chapter into sub-sections with H5 tags.

I believe the "pages left" counter should count down to the end of the chapter, but instead counts down to the next H5 tag. Anyone dealt with this problem before? Is it the H5 tags causing the problem?

I could try changing to another H-tag but I'm already using the first 4 for other header styles, so it will be a lot of work to rearrange them. :help:

I was thinking more along the lines of iBooks counting pages for the next chapter until it gets to the next flow. Is each chapter/section in a different XML file or is it lumped together and using a page break to split it on the screen?

j9ff
12-13-2011, 01:25 AM
I was thinking more along the lines of iBooks counting pages for the next chapter until it gets to the next flow. Is each chapter/section in a different XML file or is it lumped together and using a page break to split it on the screen?

Yes, each chapter is in a different XHTML file. Within each chapter I've divided sub-sections up with semantic markup. The H5s seem to coincide with whatever iBooks expects as a chapter break—even though it's within the same file.

I was hoping to be able to avoid changing my markup, but I can't find any confirmed solutions.

j9ff
12-13-2011, 01:30 AM
That wouldn't be a reason anyway. You can add (or remove) what you want where you want in the NCX.

That's how I understand it as well. I want the reader to be able to navigate to the sub-sections as well as the Chapters. That's why I've included them in the NCX. Perhaps the <Navpoint> tags cause iBooks to interpret the item as a new chapter? Still trying to figure this one out. :chinscratch:

Jellby
12-13-2011, 05:17 AM
That's how I understand it as well. I want the reader to be able to navigate to the sub-sections as well as the Chapters. That's why I've included them in the NCX. Perhaps the <Navpoint> tags cause iBooks to interpret the item as a new chapter? Still trying to figure this one out. :chinscratch:

That's easy. Replace the <h5> with <p> or <div> (don't change the NCX), and see what does iBooks do.

j9ff
12-17-2011, 10:32 PM
That's easy. Replace the <h5> with <p> or <div> (don't change the NCX), and see what does iBooks do.

I've now attempted changing the <H5> tags to both <p> tags and <H6> tags with the same result. I'm concluding for now that the <navpoint> entries are causing the trouble. Thanks for the suggestions everyone. If I discover anything differently, I'll post it.