In Scrivener 3.1.3.0 for Windows, Compile for epub3 puts Contents page first, no matter what I do!

In Scrivener 3.1.3.0 for Windows, Compile for epub3 puts Contents page first, no matter what I do!

I do have a Contents page but it is NOT first in the binder. The Cover page is first, and the the Preface. But when I compile, Kindle Previewer 3 shows the Contents page first, the cover page second. Ebook Reader also shows the Contents page first.

When I set the Contents page to be excluded from Compile, Scrivener created a new Contents page with a new contents - freshly made according to my binder pages, which is not quite the same as my own page - and again, puts it first.

When, in Compile, I tell it to use my Cover page as the cover (in addition to just having it first in the Binder), it does so - but still puts the Contents page first.

So that’s my problem. What’s the solution?

And hasn’t anyone else encountered this? Does no one use Scrivener 3 for Kindle books? Why wasn’t this fixed long ago?

Please help - Thanks!

Jaxom

Hi,
I see the same effect when I compile to epub.
My solution to this is something similar as when I want to generate a PDF output:
I do not use Scrivener for the final layout.

In case of epup I use Sigil (an open source ebook editor tool) to do the final layout.
It is quite easy and intuitive to use, even if you do not want to fiddle with the HTML code itself.
It provides some nice tools for tasks like “Add Cover…” wich will put the cover nicely as the first page of the document before the contents page generated by scrivener.

Maybe this tool could help you as well.

1 Like

This meant to be. Don’t change it.

Three different ToCs are possible in e-books.

  1. A ToC.xhtml for e-teaders, containing a <NAV> element.

  2. A NCX- file, an ePub 2 compatble ToC

  3. A Contents file with a HTML Toc without a <NAV> element.

The first is for the menus in e-readers. It should be the first file after the cover. You can remove it from the spine in the manifest. This file cannot be styled and is restricted to list and paragraph tags.

The second is restricted too. It has a structure with NavPoints and should be in exact spine order

The third is a document with links to chapters in your book. You can do anything you want in this file.

Insert your cover using the Scrivener functionality, not as a picture on the first page.

nilsg, AntoniDol -

Thanks to you both!

nilsg, your Sigil solution works! I don’t want to think about how many hours I spent trying to figure out how to put the cover first, before finally coming to the conclusion that something so basic was wrong with Scrivener. This really must be classified as a bug, and it really must be fixed.

AntoniDol, when you say “Don’t change it,” do you mean the Contents page coming before the cover? That’s how it shows in Kindle Previewer (and in Sigil), so I assume that’s how it would show in Kindle - and in Kindle, I want the cover to be first. I mean, well, it’s the cover.

In Scrivener Compile, when I say “No cover image” but check the checkbox, “Add HTML Cover Page,” it still puts the Contents page first, even though it’s third in the Binder.

As I mentioned, I started with the blank template, so there was no Front Matter folder (and no way to add one! - or to convert a regular folder to Front Matter - another deficiency that should be fixed). So following a suggestion I found online, I opened the Novel with Parts template then copy/pasted (or dragged/dropped?) the Front Matter folder from that template to my project.

And when I tell Compile to Add Front Matter, and to use First Image in Front Matter Folder as Cover Image, it does do that. But it still puts the Contents first!

So is there some way to get Scrivener to put the cover first? (And put Contents where I want it, which isn’t even second but third?)

And if not, then is there something wrong with the Sigil solution to change the sequence? (And if so, exactly what harm would it do?)

Or am I just an old 20th Century fuddy-duddy to still think the front of a book is its cover?

Whatever the answers, thank you again to you both!

Jaxom

Just throwing this into the ring for you to think about. Have you taken some time to run through the Tutorial built into Scrivener? If you had, you would find out that folders are folders. There are only three folders that are special: the Drafts (or Manuscript) folder, the Research folder, and the Trash folder. They are built into the blank project template and all the other templates. All other folders are just folders.

What @AntoniDol said is true. Don’t change it. The epub format expects certain things in a certain order. FWIW, epub is not a print version of your work. It is designed to adhere to a specific format for ebook readers and doesn’t care what you want or expect a book to look like. Welcome to the 21st century! Scrivener is not broken on this. It is not a bug and will never be “fixed” to meet whatever expectations you think it should be doing because it isn’t broken.

Welcome to the party! Us old folks just have to get used to not seeing a book cover until we go searching for it. It is probably the worst thing to happen to books since Gutenberg started printing.

The Spine section in the OPF manifest determines the sequence of the Sections in your e-book. Is the order in there toc first? Or Cover first?

EDIT: I generated my last book from Scrivener to ePub3. The Contents.xhtml file is indeed the first file in the Book Explorer in Sigil. This is the ToC with the NAV element in it . E-reader use it to show the navigation as a menu in their UI.
When you look in the Content.opf file, and scroll down to the Spine section, you’ll see there’s no Contents.xhtml file there, just Cover.xhtml and then Body##.xhtml files. This is what the reader will see: the cover first and then the content.
In the Kindle Previewer 3, I see the Cover first and then the content. I have a XHTML Contents files as the sixth file in the Book Explorer. The Content.xhtml document with the NAV element is shown in the bottom left and clicking items navigates Previewer to the correct page…

If you want me to look at your e-book, send me a PB with the e-book as an attachment…

So far I had no problems after doing the final layout in Sigil.
However, I do not generate the cover in Scrivener at all but add it later in Sigil.
When you use the “Add cover …” function, it will also automatically update the content.opf accordingly.
Also Sigil has a function to check for “Well-Formed EPUP”. So as long as this check does not throw errors I would guess it is a valid EPUP file.

This is indeed a known bug. The placement of the contents file should determine where it shows up in the order of things, and there is also supposed to be a placeholder you can put into an otherwise empty item to control placement while still allowing for automatic generation of the contents list.

While that is true to an extent, particularly in that most people probable navigate point-to-point rather than flipping through all of the front matter sequentially, there aren’t any hard rules about where things should go—and it is perfectly fine to have a cover page section, title page section followed by contents. That’s a normal way of ordering things which Scrivener does not do correctly.

I would add that the option to add an HTML cover page section isn’t often necessary or desirable though. Many ebook readers will display the cover page at the very beginning. The setting is for supporting old ebook readers that do not. So if you put two and two together, this setting will sometimes cause two cover pages to appear in those readers that do insert the cover page into the navigation flow.

nilsg, AntoniDol, Jestar, AmberV -

Wow! I did not expect my plea for help to generate such a discussion, much less controversy even to the question of whether or not this is a Scrivener bug.

I’ll give AmberV the last word on that and the other issues raised.

My chosen solution (until the bug fix):

  1. Format and arrange the book in Scrivener, including a first document with the cover image inserted, and a document with the contents (generated by Scrivener, tweaked by me).

  2. Compile as ePub 3 Ebook.

  3. Open in Sigil, and drag the Contents document to where I want it, which leaves the Cover document first in the sequence.

  4. Run Tools / Well-formed check EPUB.

Thanks to you all!

Jaxom

5 Likes