View Full Version : Problem: .ncx without first level


triegos
11-10-2010, 06:09 PM
Sorry my bad english, please - I'm from Russia (vodka, bears, snow, etc.).

I try to develop a book in ePub format. But there is a big problem: my book haven't got a first chapter's name, ie not

Chapter 1
-mi
-mimi
-mimimi
Chapter 2
-mi
-mimi
-mimimi

but

-mi
-mimi
-mimimi
Chapter 2
-mi
-mimi
-mimimi
(I writed a dash in the beginning of sublevel's names)

How I can (if it is possible) describe this structure in toc.ncx? I tried this variant

<navPoint id="navpoint-1" playOrder="1">
<navPoint id="navpoint-2" playOrder="2">
<navLabel><text>mi</text></navLabel>
<content src="page1-1.html"/>
</navPoint>
<navPoint id="navpoint-3" playOrder="3">
<navLabel><text>mimi</text></navLabel>
<content src="page1-2.html"/>
</navPoint>
<navPoint id="navpoint-4" playOrder="4">
<navLabel><text>mimimi</text></navLabel>
<content src="page1-3.html"/>
</navPoint>
</navPoint>

but epubcheck-1.0.5 says that it was bad idea. If I write empty field for navpoint-1
<navLabel><text></text></navLabel>
<content src="empty.html"/>
validation is OK, but empty line with page number in List of Contents makes me sad.
Help me, please. I'm so young to break my head using the wall..

Adjust
11-10-2010, 07:54 PM
Take note of the Playorder number sequence:

<navMap>
<navPoint id="navpoint" playOrder="1"><navLabel><text>Chapter One</text></navLabel><content src="Chapter_One.xhtml"/></navPoint>
<navPoint id="navpoint-1" playOrder="2"><navLabel><text>Mi</text></navLabel><content src="Mi.xhtml"/></navPoint>
<navPoint id="navpoint-2" playOrder="3"><navLabel><text>Mimi</text></navLabel><content src="Mimi.xhtml"/></navPoint>
<navPoint id="navpoint-3" playOrder="4"><navLabel><text>Mimimi</text></navLabel><content src="Mimimi.xhtml"/></navPoint>
<navPoint id="navpoint-4" playOrder="5"><navLabel><text>Chapter Two</text></navLabel><content src="Contents.xhtml"/></navPoint>
<navPoint id="navpoint-1" playOrder="2"><navLabel><text>Mi-two</text></navLabel><content src="Mi.xhtml"/></navPoint>
<navPoint id="navpoint-2" playOrder="3"><navLabel><text>Mimi-two</text></navLabel><content src="Mimi.xhtml"/></navPoint>
<navPoint id="navpoint-3" playOrder="4"><navLabel><text>Mimimi</text></navLabel><content src="Mimimi.xhtml"/></navPoint>
</navMap>

triegos
11-11-2010, 03:09 AM
Adjust, no, I meant different thing. I don't want to see the line "Chapter 1" in List of Contents. I want to begin List of Contents from first "Mi", but this caption must be on the sublevel position without level-one element.

Adjust
11-11-2010, 05:31 PM
I don't think you can, because in ADE it collapses the sub levels under the first level +
So I'd imagine it would need something to collapse under even if it was a blank entry...

http://i41.photobucket.com/albums/e276/marcusstringer/Picture1-32.png

Jellby
11-12-2010, 11:37 AM
You probably can't, but not because of what ADE does or does not, but because the NCX specification probably forbids empty entries...

DaleDe
11-15-2010, 12:47 PM
It would make no sense to have empty entries. You can simply elevate whatever data you want to the top level easily. Some ebook readers such as Hanlin and its clones displays TOC by levels. The top level is displayed when you enter the toc and you select a top level entry to traverse to a lower level which would be shown on a new page in the toc. If there were lower levels without a top level there would be no way to reach them.

I cannot understand what the original poster is trying to accomplish. Is it just a visual indent that he wants? You have no control over the indent in toc. It is up to the reading device.

Jellby
11-15-2010, 01:05 PM
I understand that one may want to preserve the "logical" structure of a book, and let the reading system worry about how to present and interact with the TOC.

For instance, if a book has parts, and chapters inside each part, and then a preface and epilogue, I may want to define the preface and epilogue at the same level as chapters, even if they are not inside a part.

Don't ask me what would be an unambiguous way to display this structure, though :D

DaleDe
11-15-2010, 02:06 PM
I understand that one may want to preserve the "logical" structure of a book, and let the reading system worry about how to present and interact with the TOC.

For instance, if a book has parts, and chapters inside each part, and then a preface and epilogue, I may want to define the preface and epilogue at the same level as chapters, even if they are not inside a part.

Don't ask me what would be an unambiguous way to display this structure, though :D

You can do that. Just make them all at the top level.

Dale

Adjust
11-15-2010, 07:53 PM
That won't work as then they will be the same level as the Part.
i.e. what the OP wants is this:


Preface
Part One
Chapter One
Part Two
Chapter Two
Epilogue

DaleDe
11-16-2010, 12:36 PM
Yes, but preface can never be reached if there is no top level. That is the point. It looks like it is just for display purposes and you have no control over the display. Various readers display the ncx file directly and you have no control over this. It is not part of the book flow. You can place the above in an inline toc inside the book if you wish. But even in Paper books the preface is not shown as a level two by itself. There could be an Introduction section with dedications, preface, etc. in them or it can be under the title page. ncx is for traversal purposes not aesthetics.