Saturday, July 7, 2012

Easy fix for Chapter Problem

If you create a Table of Contents in Word [or rather have Word do it FOR you] it gets translated into a fully linked TOC in Kindle.

However because of a "nesting" issue and Kindle "rendering on the run" [unlike a normal web page], if the reader clicks on a Chapter in the TOC they get taken to the Chapter but without the proper chapter heading formatting.

This can be corrected by going back a page and then forward but that is a bit shonky.

To fix properly you need to put the a name tag before the <h1> tag, but that becomes very tedious for 20 chapters or more.

But you can use Search and Replace to do this in a flash in NotePad or NotePad++ [where you can better still write a macro which you can use for all your format jobs].

Here is a picture of a simple Search and Replace in NotePad


Remember to start from the top of the file.  It inserts a second <h1> after the a name details and to be totally correct you would get rid of the other one, but Kindle does not seem to mind a double start for <h1> but only one </h1>.  Up to you.

If you are brave and use Replace All it should say [as a cross check] "Replaced x instances" which should be the number of chapters in the book, but in case things go wrong I would first do a Save As .... just in case it can't be reversed.


1 comment:

  1. Hello there,
    I really like your blog. You have some really nice stuff here and I do hope you will carry on writing.
    I am looking for passionate writers to join our community of bloggers - glipho.com
    It might be a good idea to give your writing and your blog more exposure while having fun and meeting fellow writers.
    Please check us out and drop me a line at hubert@glipho.com for any questions.
    Best!
    Hubert

    ReplyDelete