Formatting Tips: Building a Table of Contents in Microsoft Word
In this series, we explore common techniques for formatting manuscripts in Microsoft Word for print and e-book conversion. I used Microsoft Office 2011 for Mac, and describe how to do things based on that version. Your version may be a little different. If you have difficulty finding your way around the version you use, Microsoft offers great help files.
TOC…NCX…what’s the difference?
Every e-book has at least one Table of Contents (or TOC). You may not be able to see it in the text, but you will see it in the menu of your e-reader device or app. It’s called an “NCX” file, or Navigational Table of Contents, and it’s the code that helps the menu in the device or the app work properly, jumping from one point in your book to another. The NCX file is a mandatory part of an e-book. I talk about it in a little more depth in this blog post.
Many books have a text-based TOC as well, near the front of the book, with links to different parts or chapters.
This is the type of TOC that I’m going to explain how to build.
But before I do, here’s an overview of how most converters build an NCX file. First, the converter will look for a linked TOC. If there’s one in the file, the NCX will be built based on that. If there’s no TOC, then some converters will look for styles (like Heading 1) to text or the word “Chapter” in the text. If either of these appear, then most converters are smart enough to build the NCX for this information. If the converter doesn’t find a TOC, styles or other markers, it will build a very basic NCX with ‘beginning’, ‘middle’ and ‘end’, or similar basic reference points. The converter must create some sort of NCX file, as it a mandatory element of an EPUB or MOBI file.
If you are using MS Word to format for conversion to e-book formats and you want control over your NCX file, then best way to control the NCX is to build a custom-linked TOC.
Building a custom linked TOC
To build a custom-linked TOC in MS Word, you have to work backwards. First you identify the destination by bookmarking it. Once you’ve identified the destination, then you can create a hyperlink to it. It’s like planning a trip…first you select your destination, then you figure out how your going to get there.
Use Bookmarks and Hyperlinks to build your TOC
A bookmark (or anchor) is a marker on a specific location in the text, or a destination.
A hyperlink is a link to another location within your document or to an outside source, like a webpage. This is a pathway to the destination.
To create a link to another part of the text, a bookmark must first be created, then a hyperlink can be created, linking to the bookmark.
Step-by-step, here’s how it’s done:
- Go to a destination (let’s say the beginning of Chapter One).
- Highlight the text (I recommend the text at the top of the page…usually the Chapter title) and go to Insert > Bookmark. Give your bookmark a descriptive name you will recognize later (you’ll have a lot of them when you are done). Bookmark names cannot include spaces. You can remove the space altogether (e.g. ChapterOne) or use an underscore character (e.g. Chapter_One).
- Add bookmarks to all the destinations you plan to link to (don’t forgot about back matter and any front matter that appears after the TOC).
- Build the text for your TOC (a list of all the destinations). You can type out the text, or if you’ve applied styles to your text, you can use MS Word’s auto TOC generator to create the list for you. A great short cut! When doing this, you don’t want page numbers or tab leaders in this list.
- Highlight the text you want as a link and go to Insert > Hyperlink, or right click and select Hyperlink.
- In the hyperlink dialogue box, select Document. Type the bookmark name into the Anchor field, or press the ‘Locate’ button and search the list. The bookmarks you created will appear under the ‘Bookmark’ list. Continue adding links until all the items in your TOC are linked.
- The last step is to check your bookmark list for ‘hidden’ bookmarks. These are bookmarks automatically generated by MS Word and may cause errors with the TOC once converted. You will know these hidden bookmarks…they start with an underscore character (_). To review all your bookmarks, go to Insert > Bookmark (you don’t need to highlight any text for this), make sure Hidden bookmarks are checked, and then review the list. Highlight any bookmarks starting with an underscore and press the ‘Delete’ button to remove.
Tip: Don’t set up a hyperlink to a bookmark with the exact same characters (e.g. the text in TOC appears as “One” and the bookmark name is also “One”). This may cause MS Word to get confused and add a hidden bookmark.
Before uploading your MS Word file for conversion, check your work by clicking the links you created. Make sure they are taking you to the correct spot in the text. Once you have converted your file, download the final file and check again.
Tip: When reviewing your converted file, if your TOC is working fine and then you hit one that doesn’t work, and neither do any of the others after it, you have a hidden bookmark issue.
I hope you find this helps you in prepping your manuscript for e-book conversion.
Have a question or a tip? Have another formatting question you would like to see covered here? Don’t be shy. Leave a comment below, ’cause I love comments!