Why are there two largely or (maybe entirely? not sure) disjoint sets of styles?

I’m trying to figure out the relationship between the styles in the Format menu (and panel) [let’s call those “Format Styles”] vs. the ones in the Compile “Layout Editor” window [let’s call those “Compile Styles”]. I understand that the styles defined in the compile menu “override styles in the compiled text with the same name and type.” But how do you decide when to use those styles vs. applying a style to the document text?

Also, the approach to defining these two different type of styles is strangely different; the Format Styles can only be changed by grabbing styled text out of the document, while Compile Styles have a more full featured style editing interaction. That’s awkward enough, but there doesn’t seem to be a way to define spacing before & after paragraphs in the Compile Style menu, which is disappointing and unnatural. And there is no clear way to move styles between those menus, or even between different project compile formats.

Can somebody help me understand (a) the purpose of having two disjoint style systems, (b) completely different ways to define styles, and finally (c) why there is no way to at least move styles from one to the other?

They’re actually the same.
The styles pane of the compile format is only a way to tweak your styles a bit differently per compile formats to fit different output-needs\situations. (You might very well wish to compile differently between say epub and a PDF for print.)
But it is all one single system.
Styles are to be applied in the editor initially. It is the only way to go. Without that, Scrivener won’t apply whatever styles you think you designed (in the compile format) to anything. – Having no way of knowing what to apply it to… Get me?

3 Likes

I call them Editor styles and Compile Styles. (Both are formatting styles, after all, and neither requires yo to use the Format bar all the time.) You may want to format a document, paragraph, or character style one way in the Editor and another way in Compile. You could want a style to be justified in Compile, but unjustified in the Editor, for instance … or you want indentation, fonts, or anything else to be different.

You can define everything in the Compile menus, in a couple of ways. Click on the dropdown for line spacing and click on Other... to reach before & after settings. Or you can click in the Format menu to do it (on the Mac at least; can’t remember if Windows allows it).

Compile styles have extra capabilities, too. Here’s an example:

babel style

2 Likes

I think I mostly “get you,” @vincent_vincent. :slight_smile: [BTW I’m henceforth adopting @drmajorbob’s Editor style and Compiler style terminology.]

Basically:

  1. use and define Editor styles as you write (for things that it makes sense, eg. not so much for chapter titles since you more or less cannot).
  2. Clone them into the Compile Styles if you need to tweak.

Without that, Scrivener won’t apply whatever styles you think you designed (in the compile format) to anything

Well, you can apply Compile styles directly when editing section layouts during compilation, right? That’s the only way, for example, to tell it that my home-brew Interstitial sections have an H1 header (and dingbats font for the text body [no not really]). You can similarly (it appears) “override text and notes formatting” there as well. I’m not sure how that plays with overriding by name via the styles menu definitions, which is a confusion that remains.

Editor Styles are protected from almost all Compiler commands. If you want a Style to be formatted differently on the other side of the Compiler, you have to explicitly specify that. (This is one reason why we generally don’t recommend using a “body” Style.)

1 Like

I don’t know what that means, or perhaps I could explain it.

The list box may be cut off by your window, so widen your window to make it appear.

1 Like

@dondo: And there is no clear way to move styles between those menus, or even between different project compile formats.

Something to be aware of is that the entirety of the formatting menu system is available when modifying style and section layout attributes in the format designer window. You are not limited by what is in the Format Bar, and can thus use the standard Format ▸ Font and Format ▸ Paragraph submenus to copy and paste those attributes specifically, or copy and paste formatting completely, using the commands in the main Format menu itself (the keyboard shortcuts also work here).

Furthermore, always try Copy and Paste. You can for example copy every single setting about a Section Layout or Style (copying from the list, not the format editor area) and paste it into another, which is useful for getting settings between projects, or to get a bunch of similar layouts to a common starting point for slight variations.

(Note: all of the above is at this time Mac-only capabilities.)

Also, the approach to defining these two different type of styles is strangely different; the Format Styles can only be changed by grabbing styled text out of the document, while Compile Styles have a more full featured style editing interaction.

I think you are ascribing too much to what is in fact a superficial difference. They both work identically in fact, the only thing is that, in the format design window, there is no text editor. So we needed a way for you to have a text editor of some sort to pull the formatting from. A little mock editor with some read-only gibberish text or quotes is the way to get that done.

One is not more “full featured” than the other, but if anything the text editor in the main project window is the more full-featured of the two. I don’t think they have any functional formatting differences,[1] but in the main project editor you can create advantageous example text to design your styles with, rather than being stuck with gibberish text that might not suit the purpose of the style at all.

@Vincent_Vincent: Styles are to be applied in the editor initially. It is the only way to go. Without that, Scrivener won’t apply whatever styles you think you designed (in the compile format) to anything. – Having no way of knowing what to apply it to…

That isn’t entirely accurate. It is possible to not use any styles at all while writing, and end up with a fully styled document when you compile. By assigning styles in the Section Layouts pane to all of the sample text, you can get heading styles, paragraph styles and whatever else you need.

That aside, yes you can think of the style transformation system that happens during export as being a way of changing how a document looks if it is heavily styled, and that is the only way of doing so in that case. It is how something like the “Manuscript (Times)” compile format works, since you wouldn’t want Helvetica or whatever font you prefer to write with in a Times output. The extensive list of style overrides that format has helps to ensure that (though if one uses custom styles they’ll need to add their own to this list).

@dondo: But how do you decide when to use those styles vs. applying a style to the document text?

So with that said, there probably isn’t one clear-cut answer, as it has much to do with personal preference or the needs of the document itself. As noted above, for simpler documents (in terms of formatting), one might never need to use styles while writing at all. If all of your body text is uniform in its presentation, and your headings are coming exclusively from the compile settings, then you can accomplish all of the styling you need by going through the Section Layouts you use and assigning format styles to them. You can design the look of the document wholly through that approach. Indeed, you don’t even need to use styles in Section Layouts (you’ll note the defaults don’t), using styles at all, is a personal choice.

For more complex documents, say you need figure captions or want to use proper emphasis markings instead of lazy italics, then you might need to also add those to the Format’s stylesheet, if they would need to look different.

I think a lot of this can be more simply boiled down to this:

  • If you need to declare styles in the writing environment you can do so, and by default the text styled that way will convey into the output “as-is”.
  • If you need to not be as-is, for example to convert everything to double-spaced Times New Roman, then the compile format can override the formatting of those styles you’ve used in the editor. They can, but they don’t have to, that’s up to you.

  1. One might argue that the checkboxes to the right of the style list are additional formatting functions not available in the text editor, but I would argue those are export decisions that don’t make a lot of sense in the writing environment.
1 Like

I think the question was all along about the styles pane and how to apply styles to specific text segments.

You’re a boss, Amber. Thanks for the clear and comprehensive answer.

A related question/issue. I thought the compile would override a style I created and applied to my scene text (Editor style).
When I compiled my ebook, the First three words of each scene were not All Caps as selected where this style was applied.
Any ideas on fixing?

Yes.
Styles are maintained through compile. You can tweak them in the Styles panel of your compile format, but I believe that features the likes of first words CAPITALIZED are not possible.
So the idea is to use styles only if and where needed. (Or if you do actually need the style, perhaps then capitalize the words manually, yourself, in the editor – although it would seem a bit odd to me that you’d start a chapter with text that is not formatted as the body is. More even so, yet want caps on top of that…)

As for the two sets of styles, one affects only the character attributes. (Bottom of the list.)
Whiles the other pertains to paragraph formatting, or both character attributes and paragraph formatting. (Top of the list.)

One thing to double check: on the “section layouts” section of the compile dialog, select the layout that isn’t doing what you expect, pick the “formatting” pane, and make sure the “Override text and notes formatting” is checked.

Sometimes it feels like fiddly little options all the way down, but it usually makes sense once you figure it out. In this case, the idea is that some people want to format parts of the page the way they like, and if that checkbox is off those formats will carry through to the output. So you either need to check that box to remove formatting you’d applied for editing, or uncheck it and make sure there’s no formatting in the editing.

Hope this helps!

I’m on a PC, not a Mac. That lovely check box isn’t available. :frowning:

Windows:

Epub: (It is the same)
image