Styles not being applied in compile (or preview)

I’m not sure what I’m missing, but no matter what I do, formatting and styles are not being applied. I’m trying to center my chapter titles and I tried two ways:

  1. Formatting it in the section layouts box on the Formatting tab (with “no style”).
  2. Applying the style from the dropdown (which has centered text)

But I get the same result of left-aligned text.
Any help is appreciated. Screenshots attached.


You didn’t show us what the style is (neither name nor formatting), and in the first image, “Override text and notes formatting” is unchecked.

This does not look like a typical problem to me, and is probably a bug that either requires a lot more setup than what has been provided (probably unknowable at this point, as it may have resulted from changes made days ago). It would thus help to provide the compile format as a file. You can export it with the gear button below the Format sidebar in the compile overview screen, and attach it to a response (or PM me with it, if you prefer).

The sample given is a title-only Layout, so the checkbox wouldn’t be relevant.

You didn’t show us what the style is (neither name nor formatting)

Are you referring to the style name, or what fonts, size, etc. the style is? The style is called Chapter Heading and it is TNR 18pt Bold.
Re: “override formatting”, I tried it checked and unchecked, but it shouldn’t matter as this is being applied to folder names.

I don’t see centering selected in the format bar. That could be because the text isn’t selected, or it is selected, and the style is not a centered style. The latter, I think. The sample text doesn’t look as if it’s centered … though it would be hard to be sure, with that much heavy bold text in the box.

Many thanks for the sample format you provided. I can reproduce the bug on my end as well, and will forward it to the developer to take a look at.

In the meanwhile I would suggest trying from a fresh start, creating a new format with the + button, and before you get too far into it, make sure you can create a style the way you want and assign it to a title. I had no issues doing so myself. It seems there is something broken in the formatting of this specific format that causes it to refuse changes.

The text is selected, it is centered, and the style is centered. The “highlight” is very faint, but it indicates that the text is both bold and centered. The sample text box is also centered. There’s just too much text in the sample. When I expand the window size, it becomes easier to see (2nd screenshot below).

Centered text:

Thanks Amber. I’m also trying to compile a separate document (in a completely different scrivener file) and my “Heading” titles are not centering in this doc either.

Okay, it’s very likely the same exact problem. But that it has happened twice in two independent cases means there is probably some procedural way toward getting to that point. If you think of anything you might have done during the creation of it that causes it, let us know. Having a “live” sample though will probably be enough to fix it.

Yes, I see it in the original screenshot now. I may have been on the laptop before or otherwise didn’t squint enough to see the highlighting. Anyway, Amber reproduced the bug, so …

I solved one centering problems I ran into with a new format, but will need to investigate further as I didn’t use a prefix before.

I made a new Compile Format from scratch and noticed I got the “left-aligned problem” when I added a prefix of blank lines that were not centered in their formatting. That should NOT affect the content, but maybe it’s a bug.

Thanks for the update! So what should I need to do here. This is what I tried:

  1. Clicked on the + button in the Format sidebar and selected “New Format”.

  2. At this point I’m not entirely sure what I should be doing, should I make a new Layout, and if so from which example starting point? I went with editing the first one in the list, “Chapter Number”.

  3. In the Title Options tab, added two carriage returns to Title Prefix, before the supplied <$n> placeholder.

  4. Back in the Formatting tab, I see the numeral is still centre-aligned. I check the empty lines, and they are the same. They aren’t really treated as a separate paragraph for me though (which is actually incorrect behaviour), so I wasn’t able to do as you described and am unsure of how to do so.

    I had a thought that maybe you meant the overall section Prefix tab, rather than in the title prefix itself, so I tried that since those can be independently formatted, but could see no undesirable result coming from that, either.


As a complete aside, if you are looking for a way to pad the top of the heading down from the margin of the page, the best way of doing so is to add paragraph spacing to the title line itself, rather than inserting empty paragraphs. It’s a lot more precise, since you can give a perfect measurement of how far the offset should be, rather than guessing at it with empty lines and their formatting.

If you can’t see the line and paragraph spacing tool, widen your Format Designer window until it appears on the toolbar.

You won’t actually see the result in the preview area, but if you give it a quick test compile it should look like you want (72pts = 1in, by the way):

1 Like

Yes, I was referring to the Prefix and Suffix tabs, rather than the prefix and suffix boxes in the Title Options tab.

Thanks for the tip re: line spacing. That’s a good one. :ok_hand: