compiling - sections, page breaks, styles

There are a number of potential factors going on here that may be difficult to address without a more detailed description of what is going on—for example there are so many different ways to accomplish this: “when I try to separate the top level folder (the chapter) where the folder title, and a quote (as text in the folder) appear onto a page by itself (with a page break at the end), the first instance of a section heading (ie Section 1.1) appears fine, but is not styled properly”.

So, in the interest of cutting past the variables, I’m attaching a sample project that seems to be doing what you want, give or take the particulars of the text layout itself, and I’ll point out how I am achieving the various effects (pardon me if I go over stuff you already know—future readers may benefit). Feel free to use whatever you wish from it—or point out where you are doing something different and how: (91 KB)

  1. When you open the project it should be to an Outliner view, chiefly for the purpose of demonstrating the Section Type structure setup in this project. Visit the Project/Project Settings... Section Types pane for details on how that all works. There are points in your description where it almost sounds like you are referring to Types as styles—but in Scrivener we would distinguish between named types as structural, or hierarchical, elements—and the manner in which text is formatted/structured in the editor. With a program like Word it’s all mixed up into the same view, but since in Scrivener outline structure has a hard dichotomy with content, we use different terms. There isn’t a section style, but there is document Type called “Section”.

    Perhaps you do have a style called “Section”, and that is what you mean, but I wasn’t clear on that and it seemed like you meant it more in the sense of a whole section, or binder item.

  2. You can click through the example text but there is nothing much to see here outside of the epigraphs in the folder text—one of which I’ve opened to the side in a Copyholder. I suppose one notable thing is what is missing—styles. You won’t find a hint of headings or styled text anywhere in the drafting area. I deliberately chose a “writerly” font that has nothing to do with the final output to emphasis this point.

  3. So with default settings, head into File/Compile... and give them a spin. Everything is set up to go to RTF. Open the result in Word and click around a bit—see how everything is styled? That’s all the compiler. Better yet, go to the top of the document and insert a ToC. Works out of the box! No messing around with search and replacing by formatting and changing sections into “Heading X” styles in Word every time you compile—those shenanigans were only necessary before we supported styles. :slight_smile: Now you can just call a heading “Heading 1” in Scrivener and if said heading is used or passed-thru the compiler then it can become a formal outline element in the output.

  4. Back in Scrivener, load up compile and double-click on the “Styled Headings” Format in the left sidebar. We’ve got three section layouts:

    • Unnumbered Section: assigned to Front Matter type documents. That’s how we got the “Forward”.
    • Chapter Break: in the Title Options tab, note that I’m using a line break instead of a full paragraph break, to separate the chapter label from the folder title. That should on the whole work better with ToC generators—so we don’t technically have two “Heading 1” lines. We’re also using the Text checkbox on this, since that is where the epigraphs are. They, as styled text in the editor, will convey their own formatting without any help—but since we are overriding formatting for this Section Layout to Times, the editor text will have its font updated (since the Epigraph and Attribution styles themselves do not have anything to say about the font family).
    • Section Text: you mentioned text uses hierarchical numbering with subheads, so I added this in as a demonstration of two things (a) how to do that with a Layout, and (b) to get some “Heading 2” text in there for the ToC example. Of course if one needed subsections and sub-subsections they would need to create additional Layouts with Heading 3 and so on styles.
  5. Next, in the Separators pane, here is where we achieve the page break formula you described. Everything uses “Single Return” everywhere except for the “Unnumbered Section” and “Chapter Break” layouts. The former is straightforward—for front matter we just want a cut before each section. The latter is more interesting in that we are using the Override separator after option, which changes how any following Section type documents will be act. In this case we end up with a chapter page all on its own, without having to do any contorted “First Section” Types or whatnot.

  6. The last pane that is of any interest to this example is Styles. Here is where we have our Heading 1, Heading 2, and yes even Normal set up. You can click through them, though should all be pretty self-explanatory. What is more interesting is going back into the Section Layouts pane, and noting that if you click the ¶a button while selecting different chunks of text in the mock editor, you’ll see paragraphs are getting “Normal” assigned (so you shouldn’t be getting that “Normal+” stuff, and of course the headings.

A clear style-based compile strategy like this should make for a flexible and easily to adapt system as the project migrates from Scrivener into final editing and typesetting & design.

1 Like