Back to Webelfin Home Page

Tutorial
JENNY'S HOW TO SELF PUBLISH TO AMAZON KINDLE BOOKS
and
HOW TO MAKE AN NCX FILE FOR YOUR KINDLE BOOK

I WORKED IN MsWORD in OFFICE 2007 and WINDOWS XP
but the steps should work for any version.
Last updated 10th Jan 2012




This is how I got a successful end result to a whole week of frustration trying to self-publish to Amazon Kindle Books! Hope it works for you.

Additions, improvements and helpful comments welcomed to help make this a better resource. Email jenny@webelfin.com


NOTE Throughout these instructions I use Windows Explorer to access my files.

> Start menu
> Programs
> Accessories
> Windows Explorer
> click
This should open My Documents folder by default. Keep it minimized while you work on other things.


I use a text editor called EditPlus, which is very easy to read as everything is color coded. However, it costs $35 and Notepad is sufficient and free on your Windows Computer. When editing HTML you must use a basic text editor which does not put in formatting for you.

 

  1. PART 1
    FORMAT YOUR BOOK IN MsWORD

  2. Before you start, MAKE A BACKUP COPY somewhere else under a different name, eg FilenameOriginal.doc or FilenameOriginal.docx
  3. Convert your file to the newest format
    If you have originally written your book in a version of MsWord older than 2007, it is better if you convert it to the newest file format now and then change the .docx extension, which results from the conversion, back to .doc just after dealing with the Table of Contents further down.

    I had originally written my book in an old version of word, and the conversion literally halved the size of my file from 25Mb to 13.25Mb. The second change of extension from .docx back to .doc only increased the file size again from 13.25Mb to 13.5Mb. The conversion also made my TOC anchors come in the right places in the code, which they weren't doing before the conversion. The file dramaticaly decreases in size again once it is converted to filtered HTML later on.

    To convert to newest file format:

    > Office Button > convert > newest file format > ok

    Then Save it
    > Office Button > Save > click
    Be patient, this may take a while, especially if you have a big book.
    This converts and saves it as a .docx file

  4. Remove
    Remove headers, footers, page numbers, extra hyperlinks (not including your various heading styles) from the document. My table went really wierd so I changed it to a .jpeg. You may find you have to be in .docx format to so some of this.

    See how to remove page numbers from TOC lower down when you have finished all the formatting.

    About my table:

    I had a table in the middle of my book and it went crazy in the Kindle version, so I converted mine to a .jpeg. The table was a bit fuzzy, but still readable. (I made a blank canvas, 8.5ins x 11 ins in Photoshop, and cut and pasted my table into the blank page. I then doctored it and saved it as a .jpg. There may be better ways of doing it.)

  5. Headings
    Make sure all your chapter numbers are made using Heading 1 style, and your chapter names are Heading 2 style. Any sub-headings that you want to appear in your table of contents should be Heading 3 style.

    Style supported in the Kindle Book, excluding Table of Contents
    Italic and bold fonts.
    Centering, left alignment and font size in Heading 1, Heading 2, Heading 3.
    Each paragraph is indented by default.
    Manual paragraph indentations are supported using Word-default Paragraph Formatting.
    Tabs are not supported.

    Style supported in the Table of Contents (TOC) in the Kindle Book
    Font style and size are not supported.
    Heading 1, Heading 2, Heading 3 are the only headings supported in the TOC
    Bold, italic, and spacing before and after headings in the TOC can be set when inserting the TOC in MSWord
    .
  6. Page Breaks before each new chapter
    You can either use the Heading 1 default style, which automatically puts a page break before each new chapter, or you can re-define your Heading 1 style to put the page break in for you, if it is not doing so automatically, or you can manually insert a page break at end of the text on the last page before each new chapter.

    Which ever way you do it, it is best to have a page break before each new chapter.
    I found it more efficient to put in my page breaks at the same time as center aligning my photos, see next item.

    Short-cut to make a page break:
    Put the cursor at the end of the text of the chapter and then Ctrl+Enter creates a page break.

  7. Photos
    Photos must be in .jpeg format and center aligned. Images are displayed in 16 shades of grey in the regular Kindle. However, those readers who choose to download a special Kindle app are able to view the photos in color.

    Kindle will resize your photos to 525px x 630px. If your photos are smaller than this, you will need to make a blank canvas of size 525px wide x 630px high of a whatever background color you want, and insert your small photo into the centre of this canvas. If you don't, your photos could become blurry because of the automatic enlargement by Amazon.

    Insert the image first.
    > insert> picture > browse to find your picture > insert

    This will put your photo in the top left corner. You need to center it now.

    I seem to get two different screens next, depending on whether my book is a .doc file or a .docx file.

    To center photo in .doc files
    > Right click in the photo > format picture > layout > advanced > text wrapping > top and bottom > ok > center > ok

    To center photo in .docx files
    > Left click inside photo > Format > Position > more layout options
    > Alignment > centered relative to > page
    > text wrapping > top and bottom > ok

  8. Cover Image in .jpg format
    Do NOT put your cover image at the front of your document if you are going to use Mobipocket Creator. The cover image is imported separately into Mobipocket Creator, along with its bookmark, and you will get 2 copies of the image if you insert it yourself at the beginning of your book.

    Insert your cover image at the front of your book only if you are not going to use Mobipocket Creator later.
  9. Insert extra pages
    Insert a Title Page at the beginning of your book, and insert a bookmark called "title". (See below How to Insert a Bookmark in MsWord 2007.) At a minimum it must be like this:

    "How to Raise Day-Old Chicks in Your Back Yard",
    By Jenny Robson.

    Then insert a page break.



    Insert any or all of Copyright page, Dedication, Preface, and Prologue after your Title Page, with a page break after each.
  10. Insert your Bookmarks in MsWord 2007

    To insert a bookmark
    Put your cursor before the first line of the page you wish to bookmark, or right cick inside an image.
    > insert > bookmark > type the name of your bookmark > click add



    start, cover, and toc bookmarks
    When you open a book in your Kindle, there is a list of GO TO items on a drop down menu. The only ones in the main list that you can control by inserting a bookmark are "title","start", "cover" and "toc". You must use these names in small letters for Kindle to recognize them.

    Start bookmark The "Beginning" item in the GOTO menu is controlled by you and you need to insert this bookmark where you want your Kindle book to open. Call it "start" without the quotes.

    Cover bookmark is inserted for you when you insert your cover image in Mobipocket Creator. If you have put your cover image in yourself at the beginning of your .doc file, you will need to bookmark it and call it "cover" without the quotes.

    TOC bookmark You will need to bookmark the beginning of your Table of Contents when you make it lower down this page, and call it "toc" without the quotes.

    There are other bookmarks supported by Mobipocket Creator which will make a smaller list below the main list in the GOTO menu in the Kindle.

    Other bookmarks supported are
    glossary
    acknowlegement
    bibliography
    colophon
    copyright
    dedication
    epigraph
    foreword
    loi
    lot
    notes
    preface
    text
    title

    Once you have imported your file into Mobipocket Creator (see further down) and inserted your first Guide item, click the down arrow in Type to see a complete list of which bookmarks are supported.

    > Guide > Go to the box titled " Type " and hit the down arrow.

    You will find a drop-down list of supported bookmarks.

    Unfortunately, I haven't found a way of seeing the complete list without first importing your file, which is very annoying !
  11. Table of Contents

    Update your Table of contents, or set up an active table of contents (TOC) in MsWord if you have not already done so.

    I have had a lot of difficulty with my Table of Contents not being easy to read in the final Kindle Book, because, by default, all the heading levels are written the same size, and with no indentations when created in MSWord. I tried with the Mobipocket-created one, which looks really nice, but does not put in the navigation anchors for you unless you make the MSWord one as well, and then you get 2 Tables of Contents!

    If you want to mess around with the formatting of the Headings in the TOC, here is what I found worked for me.

    It looks like this when altered.

    Chapter 1
    Discussion of Chicken Breeds
    Old fashioned breeds
    Giant breeds
    Mid-size breeds
    Small Layer breeds


    Chapter 2
    Space Needs
    Layer chicks
    Broiler chicks


    Chapter 3
    Heat and Ventillation Needs

    I reformatted Heading 1 to have a 10pt space before it, to give a break before the next Chapter xx, and I put zero extra space after it.

    I reformatted Heading 2 to be bold and not italic.

    I reformatted Heading 3 to be regular type, not bold, and to be italic.

    Here is what I did:
    References > Table of Contents > Insert Table of contents
    Format > From Templates, and uncheck Show Page Numbers
    click Modify
    > TOC1 > modify again > Format > Paragraph > space before = 10pt, space after = 0 pt > ok > ok

    > TOC2 > modify > check bold B and uncheck italic I > Format > Paragraph > space before = 0pt, space after = 0 pt > ok > ok

    > TOC3 > modify > uncheck bold B and check italic I > ok > ok

    Uncheck Show Page Numbers if it has secretly checked itself again.

    Ok

    Check that your TOC bookmark is still where it should be.



    Remove page numbers from the TOC (and the body of the document, if you have not already done so). I found I could not remove the page numbers in .doc format and I had to be in .docx format to do it.

    To remove page numbers from the TOC
    > References > Click down arrow for Table of Contents > insert TOC (even if you already have one made) > unclick Show Page Numbers > ok

    Start bookmarkIf you have just made your table of contents, check that the START bookmark has not moved to the beginning of the TOC. If it has, then remove it, and re-insert where you want it.

    Insert a bookmark for toc at the beginning of your Table of Contents. If you already did this earlier, check that it is still there. It sometimes disappears when you update the TOC.

    Insert bookmarks for chapter numbers
    If you want to use the simple, no frills NCX file in Section 3a, then you will need to insert a bookmark at each Chapter number.
    Call them chap1, chap2, chap3 etc, in small letters with no spaces, to correspond to your chapter number.
    It does not matter if you have bookmarked Chapter 1 with a start bookmark, just put a chap1 bookmark in as well as the start bookmark.

    > insert > bookmark > type the name of your bookmark > click add


  12. Change file extension to .doc Up to now you should have been working in .docx format.
    If you had been writing your book in an old version MsWord, you need to have converted your old file to the newest format, as explained in list item 3, and changed your extension to .docx already. Some of the features needed earlier in this article do not work in .doc format.
    Now you have to change the extension back to .doc to be able to convert your file to filtered HTML

    To change filename extension to .doc
    > Office Button > save as > MsWord 2003 - 2007 document > .doc file, not .docx > save


  13. Convert your whole book to Filtered HTML in MsWord.
    Your book should, by now, have been converted to the newest file format in list item 3 and saved as a .doc file, not .docx or anything else. It must be in this format before before converting to filtered HTML.

    Now convert your whole book to filtered HTML

    To convert your whole book to Filtered HTML in MsWord.
    Open your book file, /My Books/Chicken Book.doc, if it is not already open.

    > Office Button > Save As > Other formats > file type > web page > filtered html
    This puts the .htm or .html file in your /My Books folder (the same folder as your .doc file)






 

  1. PART 2
    Open Mobipocket Creator

    Import Your File

    To import Your File into Mobipocket Creator
    > Import from existing file > .html document
    Browse to find your filtered .html file in /My Books/ folder
    > Highlight the name Chicken Book.html > Open
    > Click Import



    You must use the version in your /My Books/ folder. Do not IMPORT from your /My Publications/ folder directly into Mobipocket Creator by accident if this is your second try.

    Mobipocket Creator will automatically make a /My Publications/ folder for itself in your /My Documents/ folder.

    If this is your second try, and you only have a minor change and you don't want to go right back to the beginning again, you can just change the .html file /My Publications/chicken book.html in your text editor and save it in your text editor. It will be automatically changed in Mobipocket Creator, but it won't change your original version in your /My Books/ folder.

    If this is your second try and you have a major change and need to re-import into Mobipocket Creator, then you need to delete the .html file, the opf file, and the .prc file if there is one already, from /My Publications/ folder before you import from /My Books/ folder again into Mobipocket Creator.
  2. Publication Files
    Mobipocket Creator should now have opened a new screen headed Publication Files.
    (click Open on the top bar if you are not on the Publication Files screen and open your book.)

    There is a list on the left hand side under "view"and you need to click the items below.
  3. Cover Image

    To insert a cover image in Mobipocket Creator
    Cover Image > Add a cover image > Browse > find your cover image on your hard drive
    > Open > click Update at the bottom of the screen
    Wait while it uploads your image and then the screen will change back to the Publication Files screen on its own.

  4. Table of Contents
    Only create a Table of Contents here if you do NOT already have one in your document
    I found the reference anchors were mostly missing if you had not already got a TOC in MSWord, and if you already have one, you will get 2 Tables of Contents, which is not such a good idea, so I left this out
  5. MetaData Fill this in if you want to, but it takes a long time and if you have to start again for some reason, it is all lost and you have to re-fill it in again. I would suggest only filling it in on your final time of trying of make the upload work!
  6. Guide
    The items inserted into this guide will appear in the GOTO list in your final Kindle Book. Table of Contents, Start (Beginning) and Cover will appear in the main GOTO list. The other items will appear as a smaller list below the main list.

    All Filenames in the Guide are found by browsing on your hard drive to My Documents/My Publications/ folder. DO CHECK that you are NOT browsing to your original folder in /My Books/ where you have your .doc file.

    1. For Table of contents
      If you have only made your TOC in MsWord and not in Mobipocket Creator
      You will need to make a Guide item for it and insert #toc at the end of the filename eg. ChickenBook.html#toc

      To add a guide item for toc in Mobipocket Creator
      New Guide Item > click
      Type > find toc in the drop-down list > click.
      Filename > Browse to your filename in your My Publications folder and highlight it.
      > Open > click
      Right arrow to the end of the filename and insert #toc at the end of the filename. You do need the #sign, eg. ChickenBook.html#toc



      If you have used Mobipocket Creator to create the Table of Contents
      The Guide item for the Table of Contents is automatically filled in for you. It is put in the GOTO guide in your Kindle Book and is called "table of contents". You do not need to make your own Guide item for it.

    2. For Title

      To add a Guide item for your Title in Mobipocket Creator
      Type > find title page in the drop-down list > click.
      > Title> will automatically fill in with the words Title Page
      > Filename > Browse to your filename in your My Publications folder and highlight it.
      > Open > click
      Right arrow to the end of the filename and insert #title at the end of the filename. You do need the #sign, eg. ChickenBook.html#title



    3. For Start
      Mobipocket Creator uses the "start" bookmark which you should have made in your MsWord document. It automatically puts it in the GOTO guide and calls it "Beginning". You do not need to make a special Guide item for it.
    4. For Title
      Mobipocket Creator uses the "title" bookmark which you should have made in your MsWord document. It automatically puts it in the GOTO guide and calls it "Title". You do not need to make a special Guide item for it.
    5. For cover
      Mobipocket Creator makes its own "cover" bookmark for you if you used Mobipocket Creator to import your image. It automatically puts it in the GOTO guide and calls it "cover". You do not need to make a special Guide item for it.

      If you have inserted your coverimage in your MsWord document yourself, you will need to make a Guide item for it and insert #cover at the end of the filename.

      To make a Guide item for a cover image which has not been imported separately into Mobipocket Creator
      > New Guide Item > click
      > Type > find other.ms-coverimage in the drop-down list > click.
      > Title > will automatically fill in with the word Cover
      > Filename > Browse to your filename for the .html file, example ChickenBook.html, in your My Publications folder and highlight it.
      > Open > click
      > Right arrow to the end of the filename and insert #cover at the end of the filename. You do need the #sign, eg. ChickenBook.html#cover >


    6. For other bookmarked pages such as your copyright page
      You will need a Guide item for each one.

      To make other Guide items in Mobipocket Creator
      > New Guide Item > click
      > Type > find copyright page, or whatever, in the drop-down list > click.
      > Title > will automatically fill in with the words Copyright Page or whatever.
      > Filename > Browse to your filename in your My Publications folder (NOT My Books folder) and highlight it.
      > Open > click
      > Right arrow to the end of the filename and insert #copyright at the end of the filename, or whatever you have called your bookmark. You do need the #sign, eg. ChickenBook.html#copyright

    7. To remove an item in Guide, scroll to the far right and click Delete. (Seems obvious, but it was off to the right of my screen and I had almost worn out my Delete key on the keyboard in frustration trying to get rid of errors before I found the Guide's Delete button!)
  7.  

    BUILD YOUR BOOK THE FIRST TIME

    Click Build on the top bar of Mobipocket Creator.

    Your MY Publications folder will now contain your
    .html file
    .opf file
    mbp_toc.html file
    .prc file
    your cover page .jpeg photo
    and a couple of folders.

    The .prc file is the one you open in your Kindle previewer, and you upoad to Amazon, once you have made your NCX file next.



 

  1. PART 3a
    HOW TO MAKE THE BASIC, EASY, NO FRILLS NCX FILE
    or skip to difficult, more versatile NCX file in green section 3b below.

    This is the file in an Amazon Kindle Book which is used for quick navigation round the book. The more difficult version, next section, may appear too complicated for those of you who cannot read HTML, so I have found a way to make an NCX file that can be copied and pasted, with very little work for the uninitiated in HTML.

    Your NCX file will only contain a list:
    Chapter 1
    Chapter 2
    Chapter 3
    etc.

    but the links should work and it will give you the navigation points on the bar at the bottom of a Kindle book, which you will not otherwise get.
  2. If you did not put in the bookmarks for each chapter before you converted your .doc file to a filtered .html file, you need to do it now. Insert your Bookmarks for each Chapter, and call them chap1, chap2, chap3 etc

    If you have already bookmarked your chapters in MSWord, then skip to step 5

    Bookmark your chapters
    Open your final word document, the last one you made before converting it to filtered HTML, called My Books/ChickenBook.doc

    Insert a bookmark at each Chapter number.
    Call them chap1, chap2, chap3 etc, in small letters with no spaces, to correspond to your chapter number.

    It does not matter if you have bookmarked Chapter 1 with a start bookmark, just put a chap1 bookmark in as well as the start bookmark.

    To insert a bookmark
    Put your cursor on the word Chapter xx
    > insert > bookmark > type the name of your bookmark > click add

    >Once you have put in all your chapter bookmarks, Save it again as Chicken Book.doc, not .docx or anything else.



  3. Convert your whole book to Filtered HTML again in MsWord.

    To convert your whole book to Filtered HTML in MsWord.
    Open your book file, /My Books/Chicken Book.doc

    > Office Button > Save As > Other formats > file type > web page > filtered html

    It will come up with a message saying you already have a file named that, do you want to replace it?
    Yes

    This puts the .htm or .html file back into your /My Books folder (the same folder as your .doc file)

  4. Now you have to replace the file that Mobipocket Creator has made in My Publications folder.
    You do not need to reimport it so you should not loose anything, such as your cover photo, that you have already done in Mobipocket Creator

    To replace the .html file in Mobipocket Creator with this new version.
    You should still be be in MSWord in /My Books/ChickenBook/Chickenbook.html
    > Office Button > Save As > scroll to your MyPublications folder > highlight your book folder, ChickenBook > open
    > Save.
    You should be saving your chickenbook.html file in /My Publications/ChickenBook/Chickenbook.html
    Make sure it has the same name and .html or .htm extension as the one that is already in MyPublications folder.

    It will come up with a message saying you already have a file named that, do you want to replace it?
    Yes

  5. To make your simple, no frills NCX file
    You will just have to copy and paste the following code and change your file name in it.

    My computer will not open a file type of .ncx in Notepad when I double click in Windows Explorer, but it will open a .html file type, so I call my NCX file ncx.html while I am making it, and then rename it to toc.ncx when it is all finished.

    Make the NCX file as below and save your changes as you work as File Type > html, or all files, or custom.

  6. Make a new blank text file
    Go into My Publications/Chicken Book/ and make a new blank .txt file in the same place as the .html file resides, and call it ncx.html for now. When you have eventually finished editing it, you will RENAME (Not SAVE) the file to toc.ncx

    For example, for myself, I did the following:

    To make a new blank text file
    > My Publications/Chicken Book/
    > Highlight folder Chicken Book
    > File > New > Text Document > click
    > Fill in ncx.html in the space for the file name. If the space is no longer flashing, click once inside the name and you should be able to write in it.
    > A message comes up saying If you change a file name extension, the file may become unusable. Do you want to change it?
    > Yes

    To open the file in Notepad or EditPlus
    > Right click the file name ncx.html
    > Open with
    > Notepad, or your own special text editor if you have one
    > Save your changes as you work as File Type > html, all files or custom.



    Right now, you should be looking at a blank page. You will cut and paste the code with the blue background in the next section into it in just a minute.

  7. NCX FILE CODE

    Below, with the blue background, is the whole code for the first 3 chapters of your book called "How to Raise Day-Old Chicks in Your Back Yard".

    You need to copy and paste the code into the blank page which you have just made in your text editor, and change the title, author, and file names to your own, adding extra chapters where necessary.

    I have highlighted what you need to change in red, but you need to write it in black text yourself. I have used .html for my files, but you may have used .htm, in which case you have to correct the file extensions below. The play order must start at playOrder="1" and increment by 1 for each following item.

    COPY AND PASTE THE FOLLOWING CODE WITH THE BLUE BACKGROUND INTO THE TEXT FILE THAT YOU HAVE JUST MADE CALLED NCX.HTML Do not copy the words End of Code. You can edit it for your own information and you will change its name to toc.ncx once you have finished editing it.



    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN"
    "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">
    <ncx version="2005-1" xml:lang="en" xmlns="http://www.daisy.org/z3986/2005/ncx/">

    <head>

    <!-- The following four metadata items are required for all NCX documents,
    including those conforming to the relaxed constraints of OPS 2.0 --> <meta name="dtb:uid" content="123456789X"/> <!-- same as in .opf -->

    <meta name="dtb:depth" content="1"/> <!-- 1 or higher -->
    <meta name="dtb:totalPageCount" content="0"/> <!-- must be 0 -->
    <meta name="dtb:maxPageNumber" content="0"/> <!-- must be 0 -->
    </head>

    <docTitle>
    <text>How to Raise Day-Old Chicks in Your Back Yard</text>
    </docTitle>

    <docAuthor>
    <text>Robson, Jenny</text>
    </docAuthor>

    <navMap>

    <navPoint id="nav1" playOrder="1">
    <navLabel><text>Chapter 1</text></navLabel>
    <content src="ChickenBook.html#chap1"/>
    </navPoint>

    <navPoint id="nav2" playOrder="2">
    <navLabel><text>Chapter 2 </text></navLabel>
    <content src="ChickenBook.html#chap2"/>
    </navPoint>

    <navPoint id="nav3" playOrder="3">
    <navLabel><text>Chapter 3</text></navLabel>
    <content src="ChickenBook.html#chap3"/>
    </navPoint>

    </navMap>
    </ncx>

    End Of Code

  8. RENAME YOUR NCX FILE TO TOC.NCX
    If your NCX file is still called ncx.html when you have finally finished editing it, you need to RENAME (Not SAVE) the file to toc.ncx.

    > Highlight the filename ncx.html in My Publications folder
    > right click the mouse
    > click rename
    > type in toc.ncx
    > hit enter (or return or whatever)


NOW SKIP PART 3b and JUMP DIRECTLY TO PART 4
Vital changes to the OPF file to include the NCX file are below in Part 4, the purple section.




 

  1. PART 3B
    HOW TO MAKE THE MORE DIFFICULT, VERSATILE NCX FILE.
    Basic, easy, no frills NCX file is in the yellow section above

    This is the file in an Amazon Kindle Book which is used for quick navigation round the book. I made my Table of Contents to include a lot of sub-headings, but I made my NCX navigation file with only Chapter Number + Chapter Title for each entry, so there was less clutter than in my TOC. This appears to be very complicated for those of you who cannot read HTML, but if you keep going and follow the steps exactly, it is really not too hard, once you get the hang of it.

    My computer will not open a file type of .ncx in Notepad when I double click in Windows Explorer, but it will open a .html file type, so I call my NCX file ncx.html while I am making it, and then rename it to toc.ncx when it is all finished.

    Make the NCX file as below and save your changes as you work as File Type > html, or all files, or custom.

  2. Make a new blank text file
    Go into My Publications/your book name/ and make a new blank .txt file in the same place as the .html file resides, and call it ncx.html for now. When you have eventually finished editing it, you will RENAME (Not SAVE) the file to toc.ncx

    For example, for myself, I did the following:

    To make a new blank text file
    > My Publications/Chicken Book/
    > Highlight folder Chicken Book
    > File > New > Text Document > click
    > Fill in ncx.html in the space for the file name. If the space is no longer flashing, click once inside the name and you should be able to write in it.
    > A message comes up saying If you change a file name extension, the file may become unusable. Do you want to change it?
    > Yes

    To open the file in Notepad or EditPlus
    > Right click the file name ncx.html
    > Open with
    > Notepad, or your own special text editor if you have one
    > Save your changes as you work as File Type > html, all files or custom.



    Right now, you should be looking at a blank page. You will cut and paste the code with the blue background in the next section into it in just a minute.

    NCX FILE CODE

    Below, with the blue background, is the whole code for the first 3 chapters of my book called "How to Raise Day-Old Chicks in Your Back Yard".

    I would suggest you copy and paste the code into the blank page which you have just made in your text editor, and make the necessary changes to suit your own book, adding extra chapters where necessary.

    I have highlighted what you need to change in red, but you need to write it in black text yourself. I have used .html for my files, but you may have used .htm, in which case you have to correct the file extensions below. The play order must start at playOrder="1" and increment by 1 for each following item.

    You will notice that my toc reference numbers are not consecutive. I have lots of sub-headings in my book, which I do not want to put into the NCX file, so the intervening toc reference numbers, which are missing, belong to my subheadings.

    COPY AND PASTE THE FOLLOWING CODE WITH THE BLUE BACKGROUND INTO THE TEXT FILE THAT YOU HAVE JUST MADE CALLED NCX.HTML Do not copy the words End of Code. You can edit it for your own information in a minute, and you will change its name to toc.ncx once you have finished editing it.



    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN"
    "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">
    <ncx version="2005-1" xml:lang="en" xmlns="http://www.daisy.org/z3986/2005/ncx/">

    <head>

    <!-- The following four metadata items are required for all NCX documents,
    including those conforming to the relaxed constraints of OPS 2.0 --> <meta name="dtb:uid" content="123456789X"/> <!-- same as in .opf -->

    <meta name="dtb:depth" content="1"/> <!-- 1 or higher -->
    <meta name="dtb:totalPageCount" content="0"/> <!-- must be 0 -->
    <meta name="dtb:maxPageNumber" content="0"/> <!-- must be 0 -->
    </head>

    <docTitle>
    <text>How to Raise Day-Old Chicks in Your Back Yard</text>
    </docTitle>

    <docAuthor>
    <text>Robson, Jenny</text>
    </docAuthor>

    <navMap>

    <navPoint id="nav1" playOrder="1">
    <navlabel><text>Copyright</text></navLabel>
    <content src="Chicken Book.html#copyright"/>
    </navPoint>

    <navPoint id="nav2" playOrder="2">
    <navLabel><text>Chapter 1 - Discussion of Breeds</text></navLabel>
    <content src="ChickenBook.html#_Toc309662188"/>
    </navPoint>

    <navPoint id="nav3" playOrder="3">
    <navLabel><text>Chapter 2 - Space Needs </text></navLabel>
    <content src="ChickenBook.html#_Toc309662196"/>
    </navPoint>

    <navPoint id="nav4" playOrder="4">
    <navLabel><text>Chapter 3 - Heat and Ventilation Needs</text></navLabel>
    <content src="ChickenBook.html#_Toc309662200"/>
    </navPoint>

    </navMap>
    </ncx>

    End Of Code

  3. Find the Reference numbers for your chapter headings.
    Before you begin, you will need some information for the .ncx file out of the Table of Contents in your filtered .html file. For me, my file is called My Publications/Chicken book/Chicken book.html

    If you do not have EditPlus or some other editing program, the easiest way to READ the code is in Firefox or Internet Explorer because it is color coded, although you CANNOT CHANGE the code in the browsers. You do not need to change this code, you just have to read it.

    To open the code of My Publications/Chicken book/Chicken book.html in Mozilla (best) and Internet Explorer (second best)

    >Go into Windows Explorer (not Internet Explorer)
    >Double click your .html file name with the LEFT mouse button
    It should automatically open in your default browser
    Put your cursor in the middle of the page
    >RIGHT click
    >click View Source or View Page Source
    You should now be looking at a source code.



  4. You now need to find your words Chapter 1, Chapter 2 etc. in the code. There are 2 ways of finding them.
    Unfortunately, when I tried using the first method, below, in MsNotepad, it was giving me really wierd results, so I had to use the second, more difficult method.

    EITHER use the "find" feature of the browser or text editor
    > edit > find > Chapter
    It should stop at Chapter 1.
    then for chapter 2 and the rest click > find next

    When you have found "Chapter 1" move on to the next blue box before finding your other chapters.

    OR if that does not work

    Scroll down in the code past a long list of black writing and then you should begin to see code in colored writing and your text and headings in non-bold black text. Look for the word Chapter 1.



    Either way, you should be looking at code like this below:

    Example:

    <a href="#_Toc309662188"><span style= "font-family:"Times New Roman","serif"" >Chapter 1</span></a>

    You are looking for an anchor tag (<a....) that looks like this <a href="#_Toc309662188"> close to and before the heading that you want included in the NCX navigation file in your final Kindle book. You will be using the reference number that you see there, in this case it is #_Toc309662188.
    You must include the # sign.

    I have tried many experiments to find the easiest way to find these numbers, and the way I have used is the easiest I can find, although I am afraid it is still not a walk in the park for those of you do not know HTML. If you decide not to persevere and make your NCX file, you will loose some of the navigation features of the Kindle books. However, you will still have the Table of Contents.



    FYI
    My "Chapter 1" is Style Heading 1 in MsWord
    "Discussion of Breeds" is the name of my chapter, and is Style Heading 2 in MsWord
    "Layer Chicks" is a sub-heading and is Style Heading 3 in MsWord

    Since I wanted the words Chapter 1 and Discussion of Breeds to appear together on one line in the NCX file in the final Kindle Book, I only used the reference number for Chapter 1 viz. "#_Toc309662188" (without the quotes).

    If I wanted my sub-heading to appear in my NCX file, then I would make a separate item for it in my NCX file and use its own reference number "#_Toc309662196" (without the quotes).

    I had a copyright page as well, so that came first after the title in my book. If you do not have a copyright page, then leave the entry out of the NCX file, and make Chapter 1 - Discussion of Breeds to be playOrder 1 instead.


  5. My code for the entry of Chapter 1 in my NCX File
    You have to replace the text in red with your own information, but you need to write it in black text.

    The id can be any word, but every id must be different, so I made mine the same number as the playorder to make it easy.

    <navPoint id="nav2" playOrder="2">

    <navLabel><text>Chapter 1 - Discussion of Breeds</text></navLabel>

      <content src="Chicken Book.html#_Toc309662188"/>

    </navPoint>



    If I wanted to put sub-headings in my NCX file, the entry for the sub-heading would follow the entry for its Chapter number and name, and the play order would increase by 1.

    My code for the entry of my sub-heading, style Heading 3, in my NCX File would be

    <navPoint id="nav3" playOrder="3">

    <navLabel><text>Giant Breeds</text></navLabel>

    <content src="Chicken Book.html#_Toc309662191"/>

    </navPoint>

    Notice this Toc number is different than that for Chapter 1.


  6. RENAME YOUR NCX FILE TO TOC.NCX
    If your NCX file is still called ncx.html when you have finally finished editing it, you need to RENAME (Not SAVE) the file to toc.ncx.

    > Highlight the filename ncx.html in My Publications folder
    > right click the mouse
    > click rename
    > type in toc.ncx
    > hit enter (or return or whatever)






 

  1. PART 4
    VITAL CHANGES TO THE .opf FILE needed for the NCX file only


    DO NOT MAKE THESE CHANGES IF YOU ARE NOT MAKING AN NCX FILE.

    NOTE All changes to the .opf file MUST be done LAST in a text editor when everything else is done, just before you click "Build" for the second time.

    Save the changes, given in the blue boxes below, in your text editor after you have done them. Do not save the changes in Mobipocket Creator, because Mobipocket Creator REMOVES the changes if you hit the Save button in Mobipocket Creator.

    Go to My Publications folder and open the .opf file in a text editor.

    Do NOT save in Mobipocket Creator or the changes will be removed.



    Copy and paste the following item, which is written in red, into the manifest section, immediately after the word <manifest>, or immediately before the end of manifest tag </manifest>. The tag holders < and > must not be accidentally deleted when you insert the text.

    There are probably other items already in the manifest which must not be altered, other than the one you are inserting.

    <manifest>
    <item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml" />
    </manifest>



    Change the spine tag. The item in red needs to be inserted.

    Change the spine tag from <spine> to <spine toc="ncx">



    Save in your text editor but NOT in Mobipocket Creator.

  2.  

    BUILD YOUR BOOK A SECOND TIME after making your NCX file


    To rebuild your book a second time:

    Go back into Mobipocket Creator.
    Either hit the link to go back to the publication files,
    or
    > Click OPEN on the top bar
    > Look in My Publication Folder > (click OPEN if your book name is not visible) > Click on your book name.opf > click OPEN

    You should now be on the Publication Files Screen.

    > Click Build on the top bar.



    If you find this does not work, try deleting the .prc file in My publications folder before you re-build.



  1. LAST STEP
    Open your book in the Kindle Previewer, and pray!
    If your prayers are answered, upload the .prc file to Amazon Kindle Books.

Go to kdp.amazon.com and visit "How to Raise Day-Old Chicks in Your Back Yard" by Jenny Robson -->

Copyright © 2012 Jennifer Robson