Last month I uploaded to the ePub section of the MR library Counter-Attack and Other Poems by Siegfried Sassoon which I had tested on my Sony PRS T2 and on my iPad2 with ibooks. In both ereaders it works very well.

Many have of the poems have long lines, and I set it up so that when a line breaks the following text is indented. This cannot be done with old mobi, so I thought I would see if I could convert the book of poems with calibre to see if it will work in azw3/KF8.

I've just converted it, and though the text is indented after a break none of the hyperlinks in the text or in the pop-up menu work. They may take the reader to a different place, but it's the wrong place.
When I converted it with calibre I chose the 'both' option, but left every other choice at defaults except for choosing 'Kindle' as the output option. I tested it on my upgraded Kindle3, and there is an associated han file in the document folder.

I haven't the slightest idea on whether I did anything wrong when converting, or whether there is anything wrong in the original ePub file - though I know that the XHTML is valid and the ePub validates with ePubCheck and FlightCrew.

Can anyone help? I've attached both the ePub and mobi/azw3 versions.

PS I've just converted the ePub with KindleGen. The mobi version created with KindleGen does honour the hyperlinks, even footnotes, and does have the indentations where a line is broken. But it doesn't give access to the pop-up menu - the one in the toc.ncx file. Is this usual for KindleGen conversions? I guess I'd better ask in the mobi forum.

Last edited by AlexBell; 02-15-2013 at 06:56 PM.
Reason: included author's name

Dont use a section of a larger html file as a cover, and if you must do that, then dont mark it as a cover in the <guide>. If you mark it as a cover, it will be removed by the conversion when it is processing covers. Remove the cover entry from the guide and the conversion should work.

Dont use a section of a larger html file as a cover, and if you must do that, then don't mark it as a cover in the <guide>. If you mark it as a cover, it will be removed by the conversion when it is processing covers. Remove the cover entry from the guide and the conversion should work.

Thanks, Kovid, I'll give that a try tomorrow.

I have that entry in the guide for a reason; but my senior memory is a bit vague. I think it was to try to get the cover to show in iBooks, or when I was trying to get old mobi files to open at the cover. I wonder if I might need to leave it in the ePub version but comment it out before conversion. It certainly doesn't cause any problems when I convert ePubs to old mobi.

Sorry, Kovid, it didn't work. I commented out all the guide section, put the new content.opf file (otherwise unchanged) into the ePub package, validated and tested the new ePub, and converted as before. If anything the hyperlinks are even more unstable.

I then changed the guide section to one suggested on the mobi forum, went through the process again, and converted with Kindlegen. The links work, and this time I can get the Menu>goto>table of contents to work.

I've removed the old files from my first post, and attached the new files to this post. The files should all be dated 16/02/2013

I dont have the time to track down everything wrong with that epub, but so far I've found that the links to the Preface and Introduction dont work in the original epub either. And you are probably using css/conversion settings that are inserting page breaks <div class="poetry"> and <p class="titlename"> which will cause links to individual poems to end up pointing to the end of the previous poem.

Do an epub to epub conversion and test the resulting epub, you will see the same set of problems.

Fix the Preface and Introduction links and move the id="poemwhatever" attribute to the <p> tag, so that the links point to the correct place.

I will add some code to the next calibre release that should handle this situation (page-break-after and id on the page break element correctly). In th meantime, use either of the solutions I posted before, i.e. putting the id on the <p> or changing to page-break-before