View Full Version : Manual ToC makes duplicate chapters?


JDawg
07-16-2011, 06:02 PM
Hi all,
For a eBook project I am creating, in addition to the toc.ncx file I have a manually created Table of Contents at the beginning of my book. However, after I made the ToC, my file began displaying the last two chapters (seperate .xhtml documents) in my book twice. When I delete the ToC, this problem goes away. Is there anyway I could keep my Table of Contents and not have repeating documents in my .epub files? Thanks for any help. :)

Toxaris
07-17-2011, 05:30 AM
You need to give some more information there. Could you post your toc?

JDawg
07-17-2011, 07:38 AM
Yep! Here is the table of contents I created for the beginning of the book.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>toc.xhtml</title>
<link href="template.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div>
<p class="chapter-chaptertitle">Table of Contents</p>
<p class="body-sectionpara"><a href="Preface.xhtml">Preface</a><br />
<a href="Prologue-v2.xhtml">Prologue</a><br />
<a href="Ch1-asym.xhtml">Chapter One: Leadership and Beliefs</a><br />
<a href="Ch2-asym.xhtml">Chapter Two: Leading Without Controlling</a><br />
<a href="Ch3-asym.xhtml">Three: From I to We</a><br />
<a href="Ch4-asym-box.xhtml">Chapter Four: Leading from a False Premise</a><br />
<a href="Ch5-asym.xhtml">Chapter Five: Surrendering to the Leader Within</a><br />
<a href="Ch6-asym-box.xhtml">Chapter Six: Leaders Choose Again</a><br />
<a href="Ch7-asym-box.xhtml">Chapter Seven: Values and Principles Show the Way</a><br />
<a href="Ch8-asym.xhtml">Chapter Eight-The Power of Purpose</a><br />
<a href="Ch9-asym.xhtml">Chapter Nine: Engaging Others</a><br />
<a href="Ch10-asym.xhtml">Chapter Ten: Change Happens</a><br />
<a href="furtherresources.xhtml">Further Resources</a><br />
<a href="about.xhtml">About the Author</a><br />
</p></div>
</body>

charleski
07-17-2011, 10:34 AM
after I made the ToC, my file began displaying the last two chapters (seperate .xhtml documents) in my book twice. When I delete the ToC, this problem goes away.

The manual ToC looks fine. When you say "displaying the last two chapters (seperate .xhtml documents) in my book twice" do you mean the last two chapters are repeated as you page through the book? Or are they appearing twice in the generated (.ncx) ToC?

Toxaris
07-17-2011, 12:44 PM
could you also place the toc.ncx file?

JDawg
07-17-2011, 02:58 PM
@charleski: I meant that they appeared twice as I scrolled through. Good clarification. :)
@Toxaris: The code isn't formatted at all, major props if you can wade through it. :D
<?xml version="1.0"?>
<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1"><head><meta name="dtb:uid" content="67eac3c8-a91c-5138-e129-a4c2afd9da8d"/><meta name="dtb:depth" content="1"/><meta name="dtb:totalPageCount" content="0"/><meta name="dtb:maxPageNumber" content="0"/></head><docTitle><text>The Inner-Work of Leadership</text></docTitle><navMap><navPoint id="navpoint-3" playOrder="1"><navLabel><text>Preface</text></navLabel><content src="Preface.xhtml"/></navPoint><navPoint id="navpoint-4" playOrder="2"><navLabel><text>Prologue</text></navLabel><content src="Prologue-v2.xhtml"/></navPoint><navPoint id="navpoint-5" playOrder="3"><navLabel><text>Chapter One: Leadership and Beliefs</text></navLabel><content src="Ch1-asym.xhtml"/></navPoint><navPoint id="navpoint-6" playOrder="4"><navLabel><text>Chapter Two: Leading Without Controlling</text></navLabel><content src="Ch2-asym.xhtml"/></navPoint><navPoint id="navpoint-7" playOrder="5"><navLabel><text>Chapter Three: From I to We</text></navLabel><content src="Ch3-asym.xhtml"/></navPoint><navPoint id="navpoint-8" playOrder="6"><navLabel><text>Chapter Four: Leading from a False Premise</text></navLabel><content src="Ch4-asym-box.xhtml"/></navPoint><navPoint id="navpoint-9" playOrder="7"><navLabel><text>Chapter Five: Surrendering to the Leader Within</text></navLabel><content src="Ch5-asym.xhtml"/></navPoint><navPoint id="navpoint-10" playOrder="8"><navLabel><text>Chapter Six: Leaders Choose Again</text></navLabel><content src="Ch6-asym-box.xhtml"/></navPoint><navPoint id="navpoint-11" playOrder="9"><navLabel><text>Chapter Seven: Values and Principles Show the Way</text></navLabel><content src="Ch7-asym-box.xhtml"/></navPoint><navPoint id="navpoint-12" playOrder="10"><navLabel><text>Chapter Eight-The Power of Purpose</text></navLabel><content src="Ch8-asym.xhtml"/></navPoint><navPoint id="navpoint-13" playOrder="11"><navLabel><text>Chapter Nine: Engaging Others</text></navLabel><content src="Ch9-asym.xhtml"/></navPoint><navPoint id="navpoint-14" playOrder="12"><navLabel><text>Chapter Ten: Change Happens</text></navLabel><content src="Ch10-asym.xhtml"/></navPoint><navPoint id="navpoint-15" playOrder="13"><navLabel><text>Further Resources</text></navLabel><content src="FurtherResources.xhtml"/></navPoint><navPoint id="navpoint-16" playOrder="14"><navLabel><text>About the Author</text></navLabel><content src="About.xhtml"/></navPoint></navMap></ncx>

charleski
07-17-2011, 03:33 PM
Well, I can notice one thing that might be causing problems. In your manual ToC you have "furtherresources.xhtml" and "about.xhtml" whereas the ncx refers to "FurtherResources.xhtml" and "About.xhtml".

JDawg
07-17-2011, 04:59 PM
:eek:
I can't believe I made such a simple, simple error. Thank you charleski. I had no idea that capitalization was so important. You saved me countless hours of pouring over code to no avail. Problem solved!:thanks:

DaleDe
07-17-2011, 09:12 PM
:eek:
I can't believe I made such a simple, simple error. Thank you charleski. I had no idea that capitalization was so important. You saved me countless hours of pouring over code to no avail. Problem solved!:thanks:

In Unix all file names are case sensitive and most eBook readers runs a form of Unix, Linux.