View Full Version : Using Mobipocket Creator; link to table of contents


Ea
05-03-2009, 07:29 AM
Is it possible to add a link at, say, the end of a chapter, that links back to table of contents? I'm creating the book using one html file per chapter, and would like to add a link back to the table of contents at the end of each chapter. I've been messing around with 'guides' but I'm not really sure what it is I'm doing.

Is this something that Mobipocket Creator can handle automatically or should I add some markup to the files?

wallcraft
05-03-2009, 09:30 AM
I don't think I have ever seen explicit links at the end of chapters back to the TOC in a MOBI ebook. The reason for this is that MobiPocket Reader has a way to bring up the TOC at any point in the ebook. In the Windows version, select Contents -> Table of Contents. So the important step is to make sure your TOC is included in the guide items. In your case the TOC is presumably a separate HTML file. The current favorite approach seems to be to not include the TOC in the body of the reading flow at all (i.e. you must use the MOBI Reader to get to the TOC), or you can just link to the TOC at the start of the ebook (see the attached screenshot), or you can include the entire TOC near the start of the ebook (as well as in the guide). Badly formatted MOBIs either have no TOC, or only an in-line TOC (no guide item).

If you want to link back to the TOC, just include an explicit link in the HTML.

Ea
05-03-2009, 10:51 AM
Thank you :) I'll try to add an explicit link.

BSquared18
05-16-2011, 11:59 AM
Re: "If you want to link back to the TOC, just include an explicit link in the HTML. "

I'm trying to do the same thing. Could you provide the code that would be used for the link? I tried using "TOC" as the target in the tag, but that didn't work. I.e.,

<center><a href="#toc">Table of Contents</a><center>

Thanks,
Bill

susan_cassidy
05-16-2011, 01:29 PM
I think that should be "<a name="toc">Table of Contents</a>, then elsewhere in the file, "<a href="#toc">Jump to TOC</a> should take you there.

BSquared18
05-16-2011, 02:29 PM
"I think that should be "<a name="toc">Table of Contents</a>, then elsewhere in the file, "<a href="#toc">Jump to TOC</a> should take you there."

Yes, I agree that under normal conditions, that's the way to do it. The problem for me is that Mobipocket Creator (MPC) creates the table of contents, rather than it being manually created in the html file. MPC does a great job of creating the TOC, so I'd rather not take over that job.

So, my question is this: Is there a notation other than "toc" that can be used to point the link to? Or is that process not possible within the structure of MPC? The notation "toc" in <a href="#toc">Jump to TOC</a> doesn't work.

(By the way, whether to have the label read "Jump to TOC" or just "Table of Contents" is a matter of preference; however, I like your notation better than mine because it's more explicit.)

So, to conclude, does anyone know what language should be used instead of "toc" to go to a MPC-made TOC? Or can it be done at all?

Bill

HarryT
05-16-2011, 02:37 PM
I don't think it can be done, unfortunately. You could always create a toc page manually; that's what I do with all my books.

BSquared18
05-16-2011, 02:57 PM
Well, it was just an idea--not something essential.

BB

PS. I can always link it to the title page.

Hitch
05-17-2011, 05:31 AM
I don't think it can be done, unfortunately. You could always create a toc page manually; that's what I do with all my books.

Actually, I rather think it doesn't work as you've all mentioned simply because the mobi-built TOC is not IN the original html file or files. So, a simple href or # link wouldn't work; it would, instead, be something along the lines of:

<a href="mbp_toc.html">Jump to TOC</a>

Wouldn't it? We do it all the time in epubs, for anthologies (requested by authors, no matter how many times we point out the ubiquity of the TOC availability)...but that's a slightly different architecture, and we have the toc already handy for it...

In other words, I think it is not working quite simply because the method you're using presumes that the toc is a named element within the same html file, and it isn't; it's an altogether separate html file, and thus needs an external link to work within the ecosystem of the (packed) mobi. I've not tried this in specificity, because we gen our mobi's from epubs...but I use it occasionally w/MBPCreator on one-offs with other files, like copyright pages that are separate html files, within the Guide, and it works fine...I'd think this should work.

HTH,
Hitch

BSquared18
05-17-2011, 11:27 AM
"I'd think this should work."

Thanks, Hitch. I tested it, and it works perfectly!

Bill

Hitch
05-17-2011, 04:00 PM
Lovely! Glad I could help. There was someone else on this board looking for the same thing...can't remember where I saw that post, though...

Hitch

BSquared18
05-17-2011, 04:13 PM
That might have been me. I made a post on the same topic before seeing this thread.

BB

AThirstyMind
05-20-2011, 03:59 AM
I'm really new with mobi and TOC. All my Chap headings are h1...so in the mobi "TOC Wizard"... I know I use h1 but what is the attribute and value? or do I leave it off. My Chapters in the html doc are wrapped <h1>Chapter #</h1>. I don't care about anything else for the TOC, just the h1 chapters. The Guide is beyond me right now. I'll save that for another post.

Hitch
05-20-2011, 05:12 AM
Just put h1 in there, nothing else. No brackets, no attributes...just the h1 (or whatever) tag.