I believe one to be the toc’s title and the other a header.
I remember having to constantly fix this, even when generating the toc right from inside Sigil. It can easily be fixed in Sigil.
I would try leaving blank “table of contents title” at the bottom of your first screenshot. (?) Or make it the book’s title.
What I mean is that it is not really a duplicate. But just twice of the same thing.
Yes. I have tried leaving the Table of Contents blank. There, the title, “Contents” was inserted twice as a page heading.
Also, I read about creating a section of the same title used in the Table of Contents menu. Doing that, the Table of Contents was NOT auto generated at all.
I have the ePub program Jutoh, which I think is like a paid version of Sigil. But I hate to have edit my ePub there, as I’ve read the Jutoh/Sigil ePub file is MANY times the size of Scrivener’s. This programmer explained how Scrivener’s ePub code was VERY clean and efficient. That’s one of the reasons I switched.
. . . . . . .
BTW, I don’t think that tweaking an epub in Sigil or another program can really make it grow in size… If you create it with that other app perhaps, but only tweaking stuff that is already there, I doubt it.
I looked everywhere I can think of in the compile panel : can’t find any way to prevent this. Perhaps the doing of the encoder itself or something. As I said, I use to get the same thing from within Sigil itself. (It has been a while since I last created an ebook though.)
Good point! I bet you’re right. But using another ePub editor isn’t even necessary. The Scrivener ePub file can be renamed as a .zip file and the toc.ncx Table of Contents file can be easily edited. (I didn’t think of that.)
@Vincent_Vincent Thanks for you quick reply AND a viable solution.
Though… I think this is an ePub 3 bug. I tried compiling the same file as an ePub 2, and it looks fine. Unless you tell me otherwise, I’m thinking I’ll just go with ePub 2.
And as far as I can tell, from what I read on the internet a good while back, the epub3 format supports features that epub2 can’t. I don’t quite remember what though – colors, multimedia and whatnot, I can’t be sure, I forgot.
But, the new generation of ereaders that support epub3 also support epub2. And I think it is gonna take a serious while before having a book in the epub2 format becomes a problem.
I by all means am far from an expert (or even a reliable source on that matter), but I would say that unless you incorporated some of those new features to your book (if you don’t know what they are, you most likely didn’t), you should be fine, no worries, encoding to epub2.
It’d be nice though to hear on the matter from someone who actually knows this stuff.
Well, that is not what I get from a quick google search…
As a reflex, and like most users, I think, I would personally go for epub3, since it is the most recent format available. But that would only be based on the very little I know, and on whether the book design has this or that, bells and whistles.
But add to that the current issue (I am certain most people are not into learning another app and how internally an ebook works just so that they can get a clean TOC) and I would think that if epub2 works, then it is no problem.
You can always later convert to epub3. Calibre for example, can do it, and the app is free.
There is more than likely a bunch of available converters, I am sure. Else, it’d be like burning all the books, just because color printing finally got invented.
There is also the question as to “Can an old ereader handle epub3 files properly?” and you are in for a headache. (What is actually the current ereader market state? How much of a standard is epub3? What’s the % of old ereaders vs epub3 compatible ones out there?)
. . . . . . . . . . .
I mean, with the amount, I’m sure, of epub2 in circulation (all those ebooks people bought over the years before epub3), wouldn’t that be – or isn’t that – amazingly lame on their part ?
. . . . . . . . . . . . .
Here is my logic (and I won’t be offended if told wrong) :
If your ebook looks the way you want it to in the epub2 format, you should be fine. Worst case scenario, later use a converter, and make it up to date. If you don’t intend to incorporate the extras brought by epub3, it shouldn’t be an issue.
Of course, it’d be best if the epub3 encoder in Scrivener could just not do what it is currently doing. Lets wait and hear from someone from LL on that topic. Perhaps it is as simple as a checkbox we missed. @AmberV
This may in part due to their misguided proprietary page layout approach that was done early on. ADE based systems would have a special style sheet, not CSS-based, used to define various things such as margins and paragraph formatting. I believe at this point they have seen the light and abandoned such foolishness, and fully adopted the standards that CSS provides—but for fall-back rendering of older books, they probably didn’t go back and completely rewrite the engines to display them, and still require this arcane page layout file.
But yes, ultimately, Adobe, Microsoft, Apple, Amazon and others can be really lame when it comes to reinventing wheels and trying to push non-standard technology.
As to the original problem, I would first suggest going through the user manual’s chapter on correctly formatting a custom ToC, if that is what you’re doing. There are fairly strict rules about it. Having a stray <p> element with a heading for example is a rule break. You can have a title, but it needs to be a proper HTML heading (like <h1>), not a raw paragraph with some formatting on it that makes it look like a title. Generally you should not need to worry about that though, just name your binder item as you want the title to be, and assign the Table of Contents section layout to it, which will insert the title using the proper HTML.
I suspect more needs to be set up in order to reproduce this. If I just compile a blank project with some junk text in the starter document, and set up the ToC tab the way you have it, I don’t get a doubled title.
The “Ebook” compile Format has a “Table of Contents” section layout that inserts a heading properly, above whatever list of links one provides in a document assigned to it. That is only applicable to cases where you are creating a custom ToC though, as opposed to just using the automatically generated one.
Ok. Well, I will sure look into that, but in the present case, all I did is compile my dummy project to epub3 – I just bluntly changed the compiler to epub3 and hit compile.
So no custom toc.
[EDIT] Got it. Thank you. Wonderful.
This time I did the exact same, but I compiled through the “Ebook” compile format. Without changing anything to it. I don’t know what it actually did different, but the TOC is fine. I will investigate later on from this point.
Thanks AmberV. Rock solid, as usual.
I’ll PM you the compile format I previously compiled from while (successfully, first attempt) trying to reproduce the issue, should you want to look at it. Or just compile with it once, see what comes out.
So, if I understand right, the proper way to do things is to forget about whatever other compile format you may have previously used through printing and whatnot your project, and rebuild one from the Ebook compile format in the Scrivener Formats section ?
(Else, I suppose then that one really needs to know what he/she is doing. )
I haven’t looked at anything you sent yet, but in general yes, you would be missing out on a lot if you just use some other format rather than the Ebook one, which is hand-crafted. Alternatively one could create their own, but that would require a bit of CSS knowledge, but none of the pre-built ones are designed to work with ePub.