Page break usage breaks Standard Manuscript Format

You are overloading one field to serve double duty, and the only thing it causes is carpal tunnel syndrome and a desire to not use Scrivener.

In order to export a book to MOBI or ePUB and have a valid Kindle-format ToC (or ePub NCX), you must set “Page Break Before” on each of the text sections. Okay fine.

But if you then try to export the document in with a single # sign on a line by itself between sections (Standard Manuscript Format) this is overridden and does not happen. Instead you get approximately 30 blank lines.

So in order to print multiple versions, you have to go through and unclick all those textboxes. Then reclick when you want to export to ePub again. Then unclick to send to the writer’s group…

This is completely nonfunctional. The ToC generation is specific to ePub/Mobi and should NOT be set by the use of a “Page Break” which turns into 30 blank lines when printing in SMF. These are compile options, not document options.

The appropriate way to do this is that these should be separate attributes of the ebook compilation, and defined in a single place, like:

Text->Text:
Page break before
ToC Entry

Text->Folder:
Page break before

Folder->Text: (etc you get the point)

There is exactly the function you’re asking for under the “Separators” tab in compile. There you can choose to use a page break (or, for ebooks, “section break”) between the various types, Text/Text, Folder/Text, etc. This is the same place you would choose, for another compile type, to use a custom separator such as the hash mark. You can also save your compile settings via the “Save…” button so that you can load them again later and thus easily switch between different specific compile settings without having to redo all your options each time.

I agree that checking and unchecking many boxes in the contents pane can get tedious, but with the “section break” separator set, you don’t need to do that, and it’s just a matter of selecting the option from a couple drop-down menus as you’re hoping for.

I don’t think you read what I wrote. Yes, all of this should be in separators. But it’s not.

In order for the eBook compile to have a table of contents, I must set the Page Break Before option on the entire Text element. This cannot apparently be controlled through separators, but only through this global option.

However when I go to print in SMF, no matter what I put in the separators section I get 20-30 lines of empty text (ie a “page break” I guess) between each of the section elements.

That’s why this is a bug. We have two inconsistent approaches to formatting, rather than having everything controlled under “Separators” where it should be.

No, Jennifer was right, this works fine if you follow what she says - Compile is designed so that you can switch between standard manuscript format and ebook formats without any problem. To me, it sounds as though you have ticked “Page break before” for everything, for epub export or whatever, which you don’t need to do. You only need to use “Page break before” for instances where you need to force a page break where it wouldn’t be covered by the “Separators” pane - a table of contents is a good example of that, and it’s something you would want “page break before” set for in both ebook and SMF formats.

There would only be 20-30 lines of empty text between the text elements if you have ticked “Page break before” for them.

So: Make sure you untick “Page break before” for most documents, except for those that will need a break between them in all formats. Then set the “Separators” up as you need them, depending on the format.

If you’re still have a problem, please post screenshots of the following three things:

  1. The structure of your Draft folder in the binder.

  2. The “Contents” pane of Compile.

  3. The “Separators” pane of Compile.

This will allow me to see what it is you are doing, and what you need to change to get the results you expect.

By example, here is the binder from a project created using the standard novel project template:

For printing to SMF, here’s is the “Contents” pane of Compile:

Without changing anything else other than that one tick to “Page break before” for “Front Matter”, it all compiles as I expect to SMF:

And scene breaks:

Now, to compile to epub, I don’t touch anything in the “Contents” pane at all - but I will change the “Text Separator” to “Empty line” in the “Separators” pane because for an ebook I don’t want hashes between scenes, but a blank line:

And this results in exactly what I would expect in the epub (here opened in Digital Editions):

(And once I’d set up a Compile format as I want, I would save it for future use, of course.)

So, as you can see from the above, you don’t need to use “Page break before” except for documents that need different behaviour than “Separators” can provide, and in general that should be for documents that need that setting for all formats anyway, so the setting won’t need changing when you change formats.

It would therefore help if you can describe or show your specific use case so that we can see exactly where you are having problems.

All the best,
Keith

Actually, with this, do you mean your own table of contents, or are you talking about the one that Scrivener automatically generates for you? If the latter, then maybe we did misunderstand you. Yes, the automatic table of contents only gets generated from documents that are separated by a page break (whether set via “Separators” or via “Page break before” - both work), and yes, if you did that to every single scene document, then they would have big gaps between them. But why do you want every single scene included in the table of contents? At any rate, the automatic generation of the contents page assumes that it should only generate ToC entries for documents that follow a page break, which generally is a reasonable assumption.

If you need more control over the ToC then you just need to generate it yourself rather than using Scrivener’s auto-generated ToC. To do so, add a “Contents” document in your Draft, tick “Page break before” and “Compile As-Is” for it. Then select the documents you want included in the ToC in the binder and go to Edit > Copy Special > Copy as Scrivener Links. Then go to your “Contents” document and hit Paste, and arrange the Scrivener links as you want. E.g:

Under the epub options of “Compile”, make sure that the contents page title matches the title of the document you created for the contents in your Draft folder - this way, Compile will use your custom page rather than generating one itself:

Here’s the result in Adobe Digital Editions:

As you can see, document titles that were used as chapter titles still get automatically updated to match the compiled titles; scene titles remain the same. You could customise further by creating the Scrivener links in the contents page manually, using whatever text you wanted for the titles.

So, if I understand your issue correctly, it seems that you just need to use your own custom contents page, because you want more than just chapters included. Once you’ve set this up, you’ll only need to tick or untick the “Contents” page depending on the format you are compiling to.

Hope that helps.

All the best,
Keith

Compile should be designed this way, but it doesn’t work like that. To compile an ePub book you must set Page Break Before on each text section or you simply will not get a table of contents.

No table of contents, and Kindle won’t load your story. It’s also quite confusing on most of the ePub readers too.

And then once you do set PBB, it screws up the SMF output. This is why I am reporting this as a bug.

The auto-generated one. Hm, let me test with page breaks created by the Separators page. That would make it easier to change in a single place.

Gaps which are not acceptable in a SMF document, being controlled by a checkbox necessary for ePub compilation. Do you see the problem here?

No generated ToC, most Kindle apps won’t load it at all and you can’t upload it either. And switching to only marking a few chapters in the ToC doesn’t change the problem – at no point should any section in an SMF document have 20-30 blank lines. So changing this to “it only happens 2-3 times in the document” doesn’t solve the problem. Obviously if I compile for Word I can open it up and edit it – but this is frustrating, time consuming, and not an option for other binary formats.

But you are seeing here where that assumption breaks down. This effectively means that I can produce Kindle OR SMF from my story, but not both. Isn’t this exactly the problem Scrivener was trying to solve?

Absolutely nobody I’ve talked to is interested in a ToC that is within the text of the document. I am only producing a ToC because Kindle requires it, and many of the ePub readers are likewise confused without it. An inline ToC has no value and does not solve the bigger problem.

Even if this worked for the Kindle ToC, this seems a long way around. I believe that overloading Page Break Before to have two meanings is not useful, and makes it impossible to output SMF and Kindle/ePub using only Compile settings. As you read through the issues here, don’t you see where this doesn’t work?

Please accept this bug, and come up with a non-overloaded selector for inclusion in the ebook ToC. Something which has no effect on documents compiled in other formats.

Thank you.

I will post these things when I can (after work tonight) but every issue raised above can be easily verified, and the nature of the problem makes it obvious why its a bug.

So yes, I will appreciate your assistance with a workaround. But “Page Break Before” which inserts an actual page break in the document should not be synonymous with “add to ebook ToC”. Those are two completely different meanings, and they need to be separate options.

I assume you are talking about the NCX table of contents (I wish you had specified that in your first post… :slight_smile: ). If so, then yes, that is a current limitation, although it is not a bug. For most works, the current assumption is reasonable.

I would be happy to refer to your internal names for the ebook ToC should you choose to include them in your documentation so that I know how you refer to them? :smiley:

Not quite sure how you define bug. Unavoidable problem that prevents proper creation of the document in the format I desire strikes me as a bug. Being forced to unclick, reclick, unclick, reclick… back to not sure how this isn’t a bug?

Something that was intended to work but doesn’t. The behaviour you are describing is intended behaviour which doesn’t fit the way you want to work on this particular project. I can certainly understand your desire for something like this - although it would help me to see the specifics of the project, as I say, because usually ToCs only list items separated by page breaks anyway - and may consider it for a future version, but just because it doesn’t do things your way doesn’t make it a bug. :slight_smile:

Well an inline ToC isn’t “valid” or “invalid” :wink: The point was to make something Kindle will accept. I’ve gone back and edited my original post to be clear.

I agree that how you are phrasing this indicates a feature request, but I think it needs to be phrased another way:

A checkbox required for ePub ToC generation causes invalid format to be output when compiling for SMF output.

Related to this is another bug: when I output SMF in PDF display, PDF certainly understands “next page”. However I receive 20-30 blank lines, which means that text restarts halfway down the following page. That’s certainly not expected output for the PBB option.

3rd bug: if PBB is enabled, the selector I choose for separation “#” is NOT displayed.

But my whole point is that in the vast majority of configurations, this isn’t the case at all. In most cases, you don’t need to change any checkboxes in “Contents” when switching between ePub and SMF formats.

That’s not a bug, that is exactly how it should behave. The page break in this case is inserted instead of the separator defined in the “Separators” tab - page break before will override those settings. It would look very odd if you had a stranded scene separator before a page break.

Given that you are talking about standard manuscript format, I’m still not sure why you want to include all your scenes in the table of contents, but I’ll wait to look at your screenshots.

Somehow the words I keep saying don’t seem to reach you, so let me try again.

  1. Kindle soft apps won’t load .mobi files without a valid ToC
  2. Kindle store won’t load a .mobi file without a valid ToC
  3. Many ePub readers provide a confusing or blank page on load of ePub files without an NCX ToC

I don’t “want” a ToC. I must have a ToC. I totally agree that full ToC’s for novelettes is a bit silly, but it’s simply too confusing for readers without it. This isn’t a want, it’s a must.

Now for my wants:

  1. I want to export my stories for my Kindle and ePub readers for their review. I want those stories to “just work” for less technical/less forgiving users of those technologies.

  2. I also want to export my stories in SMF format for submission to my writing group, and ultimately to the publisher.

  3. I seem to do a lot of both, and I don’t want to keep flipping an option on and off. I’d rather that both export options retained their settings.

I’d love to see an option to do this. Because right now I see no way to generate both SMF and ePub output without changes. Especially more so with your own statements here:

Yes, I can change that. However when combined with the following:

Combine these two above together and it is impossible to export SMF output without unchecking PBB. Because I can reduce the padding, but the missing # separator means the output isn’t right.

I’d like to say that I don’t blame you for these particular effects. These aren’t straightforward issues with any single feature – they are bugs created by combined effects of multiple features. I’m not very good at spotting all these situations in my coding either, so I totally am not trying to disrespect you. I’m trying to explain how these combine together to produce unworkable situations for the author.

I’m afraid I still don’t understand why you need to tick “Page break before” for all your text documents for standard manuscript format. If you can post the screenshot of your binder I might understand better what you are trying to achieve. Certainly were you using the “Novel” template with the standard manuscript format that is built into Scrivener, you wouldn’t need to change any of these things when switching to export to epub.

Will you please go back and re-read what I have already posted numerous times about why the auto-generated NDX ToC is necessary? No ToC, no read-y on Kindle.

So I must enable PBB, at which point SMF is NFG.

I have described this situation several times. A screenshot of my binder won’t help you more.

And will you please read what I wrote before about how this isn’t normally needed? I have read everything you have written very carefully, but you keep omitting to explain what you are trying to do or why you want to do this. I asked for a shot of your binder because I do not understand why you need to include every single scene in the NDX ToC - this is not normal requirements. You talk about using SMF, but if you are writing a novel and trying to create an e-book novel, there is no good reason that you need to include every single scene in the ToC - it is only normal to include chapters. I have been trying to understand why you are trying to do this; if you do not wish to further me with any more information, that’s up to you, but I’m sure you can appreciate that I am not going to spend days of my life coding something without understanding the need for it.