MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Amazon Kindle (https://www.mobileread.com/forums/forumdisplay.php?f=140)
-   -   Troubleshooting TOC fails in Kindlegen 1.1, not Kindlegen 1.0 (https://www.mobileread.com/forums/showthread.php?t=112735)

cyberbaffled 12-23-2010 10:57 PM

TOC fails in Kindlegen 1.1, not Kindlegen 1.0
 
Here's another conundrum. These three lines of code determine a selection in the TOC, and are copied from the BOOKNAME.html, TOC.html, and NCX.html files respectively.

<h4 id="abc">Edition</h4>

<li><a href="C%3A%5CKindle-Initial%CBOOKNAME.html#abc">Edition</a></li>

<content src="BOOKNAME.html#abc"/>

Kindlegen 1.0 parses these lines and the overall TOC successfully. However, when Kindlegen 1.1 encounters these lines it generates the following command line error:

"Error(prcgen): Hyperlink not resolved in toc:C:\Kindle-Initial\files\BOOKNAME.html#abc Error(prcgen): The table of content could not be built."

Any ideas why Kindlegen 1.1 is refusing to parse this code?

ATDrake 12-23-2010 11:11 PM

Quote:

Originally Posted by cyberbaffled (Post 1290674)
<li><a href="C%3A%5CKindle-Initial%CBOOKNAME.html#abc">Edition</a></li>

I'm guessing it's this line right here which is causing problems. Your href should really be in URI format, as if it were going on to a website.

BOOKNAME.html#abc if it's a file in the same directory.

file://C/Kindle-Initial/BOOKNAME.html#abc if it's not and you're using an absolute reference. (Drive initial may need to be put in differently. I'm on a Mac and volumes are handled differently.) Or ../KindleInitial/BOOKNAME.html#abc if you prefer relative URI and it's in a neighbouring directory.

I have no idea why KindleGen 1.1 would handle things differently if KindleGen 1.0 accepted it already, but this seems the most likely cause.

Of course I could be completely wrong.

Also, for anyone else encountering the same error message, I discovered through trial and error that if you have an # in your directory name, say "#1 First in Series", you'll get that error message during the failed build even if your files are otherwise utterly correct.

Hope this helps.

ETA: Oh wait, it looks like your file is simply located in the wrong directory. You're linking to Kindle-Initial/BOOKNAME.html, while KindleGen is looking for Kindle-Initial/files/BOOKNAME.html, according to the error message.

That's probably it.

DMSmillie 12-24-2010 05:41 AM

If the text you've quoted is accurate, you've also got one reference pointing to BOOKNAME.html and the other pointing to CBOOKNAME.html. Check that the NCX reference is pointing to the correct file name.

Edit: Oh hang on... I see what that is - it's meant to be "%5C" for the slash character.

cyberbaffled 12-25-2010 06:21 PM

I solved this myself when I remembered that in MobiPocket Creater the .html files and .ncx file must be in the same directory. Why Kindle 1.0 did not require this file structure and Kg 1.1 did remains a mystery.


All times are GMT -4. The time now is 05:55 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.