How to add a page break, even in an epub

I’m looking for a way to add a page break in the middle of a chapter.

Typically, I use a single carriage return to imply a scene break for the reader (fiction). I don’t place three asterisks or some tiny filigree there, at least not for minor breaks.

But there are moments, such as when there is a larger change in focus or a larger gap in time in the story (or both) where I add a tiny icon at the head of that section. Rarely, but I think it helps prime the reader for a larger jump in focus or time.

One problem with this seems to be the way text flows in e-readers, in which word wrap is randomized based on the reader’s settings. What I sometimes end up with is the tiny icon orphaned from the paragraph below it, which looks ridiculous. ‘Keep with’ seems to have no effect.

One solution I’m considering is an in-chapter page break. Inserting one from the menu seems to be ignored by an e-reader. I can’t imagine why. Any e-reader could flow the text anyway it might want to while still respecting, and accommodating, a page break, one would think. Typically, the only actual page breaks in my manuscripts happen at chapter breaks, likely bc I designate those as folders in the Binder.

So what I’m trying to do is accomplish that by doing two things: 1) make those docs ‘Section Start’ in the compiler, and 2) change the docs to folder rather than file.

And that does actually work, even in an e-reader, regardless of the reader’s settings. But a particular problem comes with that, which is whatever that document is labeled as in the Binder, appears in the TOC (in Apple ‘Books’, the drop-down TOC invoked from an icon at the top left of the e-reader as well as the HTML TOC). Not what I have in mind. I want that to be invisible in either TOC.

I’m not sure, but it appears that the TOC is generated from everything that includes a section break, so there may not be a solution. And Scrivener does not allow a document to not have a name in the Binder, so I can’t just blank it out.

So maybe I’m either overthinking this or underthinking it. I just haven’t found any other solution yet. I’m making this up as I go along. What I wish for is for some smart forum guru to point me in a more effective direction. :nerd_face:

I have a similar issue: trying to get a table to span multiple pages with the first row repeating on each page.
I finally concluded that it couldn’t be done because there was no instruction on it. So I created multiple tables.
That helped with getting the first row on each page because I manually duplicated the first row for each table I created. Then two additional problems arose:

  1. The font changed size, becoming larger in the tables that followed the first one, and
  2. the page break I inserted between tables meant nothing during compilation to epub.

So I tried the method that worked for you to force a page break: I put each table in a separate document and changed each document to a folder. Fortunately, there is a simple path to convert a document to folder: right click on the document icon and choose the option “New Folder from Selection”
As you mentioned, this puts each folder in the TOC. Oh, well!
Doing this did not change the font size. Ideas?

Ebooks don’t have pages. That’s why they don’t recognize page breaks.

2 Likes

Sadly, Joe, I still have none.

We should probably clarify that this is in no way a Scrivener issue. I don’t even think it’s an Apple issue (and their idea of helping was to fire 100 employees last week who supposedly work in Apple ‘Books’). The really sad part is iBooks Author, shuttered years ago, was actually a pretty good platform for books with tables and images (better than Scrivener by far in that single aspect, but it was no Scrivener!)

I think it’s likely an epub issue. Scrivener and we have no control over what it does. Epub3 just isn’t smart enough. We really need an epub4. Epub has been around since 2007 and epub3 was the last change—in 2011. Amazon has abandoned mobi for epub, finally, but epub is not a budding format. It should be much more mature, 17 years after the fact. It isn’t.

So what’s the holdup? Probably that there is no profit in upgrading epub.

Good things could happen, but I’m not holding my breath:

a) Apple could come out with a proprietary format that solves these problems. But since they knuckled under to Amazon who became the 900-lb gorilla and lost interest in their bookstore, which could have competed and amounted to something—well, I don’t see that happening. They never competed with the Kindle, either, yet the mini-iPad could have, had they gone that direction. And the tech is here. The Kobo and a couple others run rings around the Kindle, and dont keep trying to get in our wallets.

b) There could be a consortium of interested parties like Apple, Google, Amazon, that could push out a new format. One that actually works.

c) Scrivener could come out with a proprietary format that works, but they don’t envision the world any broader than Scrivener. That’s a decision that is legit.

We have no interest in becoming a publishing company.

3 Likes

Have you tried to use some HTML + CSS for this? <div style="page-break-before:always;"></div> is recommended though this will depend on the EPUB reader supporting and not overriding the CSS…

One of the cardinal rules of being a writer is to never tell the reader what they already know. That’s the moment they lose confidence in the author and put the book down—for keeps.

Don’t we already know that e-readers don’t have pages the way printed books do? Isn’t that a no-brainer? How does being told that help? Maybe cut us a break, please. I used the term ‘page break’ bc there is no better term. That’s what Scrivener calls it in the drop-down menu. And there is no better term bc what I’m wishing for doesn’t yet exist, which is why a better term is absent from the menu, and all we hear is crickets.

When there is no obvious solution, I try every possible option out of desperation. Is there something wrong with that approach? In my experience, that seems to be the best approach. If you have a better one, I’d love to hear it.

Thanks for clarifying that. One more thing that was already obvious.

You are not the only person reading the thread. You would be amazed how little is “obvious” to some of our users.

4 Likes

Good point. Sorry. Really not trying to come off as a smahty-pants, even if I might have.

And thanks. Your focus makes sense to me now.

1 Like

Of course that’s accurate about how epubs don’t have pages as we understand them from print, but having put out maybe 75 or 80 epubs for my clients I’d like to say that “page” feeds (from the old old days, “form feeds”) are common and necessary.

I’m a long-time Scrivener user and super-fan; I’d never use anything else for writing. But I also take in book design work, and for that I use Adobe InDesign and have Word manuscripts come to me all the time, and they have chapters, sections, etc., and the poetry books need page feeds between poems.

For example, consider a book’s front matter. I don’t want the title page to just scroll into the copyright page, nor into the dedication, nor into the table of contents. And I don’t want chapters to scroll after one another either. I want a break between these portions of the manuscript.

In InDesign, it’s very simple. We’re not talking about InDesign here, so I’ll only say that it’s a two-step process: flag (in a style) that you want the ePub to break at that style and apply that style where I want it, and then when exporting the ePub declare that the export module should pay attention to that.

I’ve never used an HTML editor to see what it is that InDesign drops into the ePub to make it happen. My point is only that it does happen and it’s useful.

Now having said all this I’ll close by saying that I sometimes have a hard time making my authors and publisher clients understand the ePub “page” concept. I tell them it’s everything between two special markers, no matter how short, no matter how long.

Anyway, just a point of information. Nothing at all against Scrivener here, which I’m about to launch and get back to work on a novel.

1 Like

There are several ways to control text flow in an ePub in Scrivener:

  1. The simplest is of course the section break, achieved by choosing the Section Layouts that come with one. Front matter, for instance, would often want to use either the “New Page” layout, or the one that also includes the name of the item as a formal heading. A copyright page would prefer the former, while something like a prologue would prefer the latter.

  2. The downside of this approach, how such sections populate the automatically generated ToC, is mitigated by two separate tools:

    • The custom ToC, whereby one creates a section in the front matter and adds a list of hyperlinks only to the sections they want to appear.
    • And exclusive to the Mac (at this point in time), a checkbox in the Settings tab for any section layout that will exclude items using that layout from the ToC. None of our built-in layouts have that option set, to reduce confusion, but some might find that a really good setting for the “New Page” layout, so that entries such as the dedication and copyright are left out of the automatically generated ToC.
  3. And of course, CSS. Those that are comfortable designing the book more precisely have ultimate control, and in many cases the concept of controlling page flow should be separated entirely from the concept of a formal section. A good example of that is the full page image. This shouldn’t be in the ToC, and ideally we should not have three HTML files in the ePub (before, image, and after image text). Driving text flow with CSS allows us to cut to a new page without breaking down the file structure in the ebook unnecessarily. I provide some tips for doing so in this thread.[1]

    The secret sauce here is that both Styles and Section Layouts generate HTML structure (the latter, optionally), and classed HTML structure is all we need to tell the ebook reader how text flow should be handled around them, with CSS.

I feel these tools cover a very broad spectrum for why one might want to control text flow, and hopefully you find something that works well for you.


  1. Though do note, this specific example uses Scrivener’s Pandoc-based ePub output as a basis, the theory itself is equally applicable to Scrivener’s HTML output. The examples would be slightly different. ↩︎

1 Like

That’s very interesting. Thanks for that.

I would really not want to take two years to learn CSS (shudder!), but I might want to learn enough InDesign to solve the issues before me.

But I have no idea where to start there. Maybe you or other experts can suggest.

I also am a dedicated Scrivener fan, and I’ll reiterate that these are not Scrivener problems and they likely have no control over them, anyway. But I want control over them, if I have to go outside Scrivener to get it.

Two years would be an incredible amount of wasted time if all you’re doing is learning enough to tweak your Scrivener generated ebooks to get a little more out of the software. Nobody was suggesting that!

In fact a lot of the CSS you may find around here won’t require any understand of it at all, and can be copied and pasted straight into the CSS compile format pane blindly.

The CSS part

What you need to know can be learned in five minutes, with these few ingredients:

  • CSS formatting looks like:

    thing { stuff }
    
  • The part including and inside of the curly brackets are the bits you find on the Web on websites or forums. You don’t need to understand anything about what goes on inside them to copy and paste them into Scrivener and make them work. Find a nice looking drop-cap that somebody made? Copy and paste the brackets part into your compile format’s CSS pane on a new line. It might have many lines, this fine.

  • The “thing” part can be quite simple, and for what Scrivener does you only need to know one basic way of using it: that is the “dot name” way of describing something. “.name” means you want to format all the things in your ebook that have been named a certain way.

    Therefore to put two and two together:

    .name { page-break-before: always; }
    

That’s it! You now know enough about CSS to add page breaks to styled text called “Name” (which isn’t terribly useful, so let’s move on to that).

The Scrivener Part

So how do we know what Scrivener will name things, what to type after the dot? Every time you use a style, either in the main editor or in the compile Format, it is going to take the human-friendly name you gave it and turn it into a CSS-friendly name. You can think of that as: make it lower case, delete all punctuation and turn any spaces into hyphens. A style named “Full Page Image” becomes “full-page-image”.

Now that you have the name, you know what to type into the CSS pane before you paste the curly-bracket stuff you found on the Internet (like the above):

.full-page-image { page-break-before: always; }

As an aside, as you can see here, a lot of stuff in the curly-brackets in CSS does not require any training at all to deduce to see what is going on. Like this example, it is often practically plain-english, if a bit Latin in form.

Surely you will encounter some samples on the Web that make use of formatting attributes that aren’t obvious, and sometimes you’ll see combinations of things that don’t make sense, but a lot will, including maybe even some of our examples in the Ebook compile format. I bet you could figure out how to make the borders around your bordered titles just a little thicker, now that you know the above.

Getting rid of the guesswork

The last thing worth knowing about here is that the most unpredictable part about all of the above is really knowing what Scrivener will do to name something—but that can be avoided, as this is something you are optionally in full control of:

  • Styles: in the compile format options pane, make note of the CSS class name text field in the right column of options for each style. Type in ‘banana’ and now you can use ‘.banana’. If a style name doesn’t convert the way you thought it should, that can be an easier approach than trying to figure out what Scrivener did do for you.

  • Section Layouts: under the Settings tab you’ll find a field by the exact same name. If you type something into here then that instructs Scrivener to put a special container around all of the text in that section and then name it.

    While not directly related to breaking page flow, while you’re here in the Section Layout pane, click on the New Pages tab and reread what might have always been glazed over, Add “first-letter” span style to first letter".

    Knowing that name, you can now type your “.first-letter” bit into the CSS pane on a new line, and then copy and paste someone’s complicated and pretty drop-cap style into your book.

There you go, if that took more than five minutes, my apologies, but whatever it did take, I bet it’s about the same as what it would take to learn just enough InDesign to do similar. And unlike the latter you’re learning how to do what InDesign itself does, meaning you don’t need hundreds per year to keep doing it, all you need is your compile format editor.

4 Likes