How to get consistent left margins when compiling for epub3

When I compile a book that is partially in the format of a diary, the dates don’t show up with consistent left margins even though they have consistent margins and indents in Scrivener. It could look like this in Scrivener:

April 5.
He woke up in the morning…

April 15
It’s snowing outside…

When I open the epub3 file on a Kindle, it looks like this:

April 5.
He woke up in the morning…

April 15
It’s snowing outside…

I have gone over the text and formatting, but I can’t fix this problem. I’m aware that Scrivener treats a new page differently than paragraphs within a Scrivener folder, but this problem occurs within one and the same folder once it is compiled.

Any idea?
Hans

Funny, or not so funny, but the indents before the second example disappeared so look the same, but on Kindle there is an indent before the second April 15 above.

Hi.

Whenever you compile text that is not assigned a style, it doesn’t matter how it looks in the editor, it will end up — unless you compile “as-is” — formatted as specified in the section layout it compiles through :

To set specific formatting to parts of your text (not for the whole, but rather for parts that differ in formatting from the body text) use a style. (Your dates, in this case.)
Whatever has a style applied will compile as per that style rather than as per the layout’s formatting shown above.

That style will be listed in your epub’s CSS stylesheet, telling the ereader how these bits should be formatted.

. . . . . . . .

[EDIT] I mistakenly worked on a screenshot from a RTF setup, some details are slightly different when compiling to epub, but other than the looks of things, the idea is the same.

Hi Vincent,
Thanks for your quick reply. I tried first to set the “section text” to “as-is” which worked for the text, but messed up the ToC. Next I added a “Date” style to the text window, even though it would be very time consuming to go through the entire book and mark up the dates in the new style. Next: If I did that, how do I get the compile layout for the section text to include the Date style?
Best regards,
Hans

You don’t have to. Styles override the section layout’s formatting automatically.
You apply the style to your text (in the editor) and that’s it.

If your dates are all in the format you’ve shown above as an example, use Edit / Find / Find... and search for months name.

Search for “January” → apply the style, next, style, next…
“February” → apply the style, next, style, next…

(That’s how I’d do it.)
If you first search for a month in Project Search, the binder will only show documents in which the said month is mentionned. Thus saving you even more time.
image

You could also rather search for numbers — all months alike, all at once — using a regex formula.
Or use normal search, looking for “1”, style style style. Then “2”, style style, style. That’d be ten steps rather than twelve (assuming your story spans across a whole year). → (9 steps, actually, since “0” has no reason to be on its own. Just skip it.)

Once again, thank you!

If your dates are all in the format you’ve shown above as an example, use Edit / Find / Find... and search for months name.

Search for “January” → apply the style, next, style, next…
“February” → apply the style, next, style, next…

(That’s how I’d do it.)

Does that mean that I must pick up every hit, then apply the style manually, before returning to the search for the next instance? There is no way to automate this process, like you do with “Search and Replace and Find Next”?

Best,
Hans

Unfortunately yes.
But, if you set a shortcut for your style, and use the shortcut for Find next, it can all be done quick.

  1. Shortcut for Find next
  2. Shortcut for Edit / Select / Select Paragraph (Assuming your date is a paragraph on its own. Not including whatever comes after, should you have used a line break. — There is a shortcut to rather select the sentence, if so. But then you’d have to use a character attributes style instead of a paragraph formatting style. ← [EDIT] Now that I think of it, a character attributes style wouldn’t help in your case. If you used a line break image… you are somewhat screwed. You would then have to fix that too.)
  3. Shortcut for your style.

You’ll be keyboard dancing.
I’ve done things like that a few times, and after a few repetitions, you don’t really have to think about it. You just run the sequence over and over. This that that, this that that, this that that.

. . . . . . . . .

[EDIT - Much after the fact]
Rereading the thread not in brainstorming mode this time, I noticed I overlooked a detail… No use/need for the shortcut to select the paragraph ; as Find Next lands you in it, and that’s all that’s needed for a Paragraph Formatting style to be properly applied. – My bad.

Quick question. The Dates are all on their own line.
The “Find next” command is only available withing a folder, right? So I would have to jump to a folder before doing a “Next” and “Replace & Find” in the folder’s text. Once I find February 8 etc, I would need to highlight it and then select “Date” from the pull down menu?
Best,
Hans

Are you done, as in really done revising ?
If not, nevermind this processing, just fix them one at a time as you come across them.

Else, if by “folder” you mean “document”, yes.

Not if you use shortcuts as I detailed above. [EDIT] …and no need to highlight either. Just have the caret anywhere in it.

I’m not sure I understand what you mean by “setting a shortcut for your style”.
Also, I am using the Windows version. I can’t see the “Edit / Select / Select Paragraph” All I see is “Edit / Find / Quick Search” or “Project Search”, “Project Replace”, etc.
Best,
Hans

Best,
Hans

And I am done revising the book.

image

I run Windows too.

image

A weird thing… whenever I try to use a shortcut a Windows keyboard switching box appears, offering me to switch language. I tried to assign different numerical keys, but the result is the same. ;-(

BUT, I tried to use the shortcut on my laptop, and it works there! :slight_smile:

1 Like

If the shortcut conflicts with the OS (which it shouldn’t), you can perhaps try to set another shortcut for the style.
Since you didn’t know about them styles’ shortcut before now, likely you’ve got them all available.
So, if you had set Alt+Shift+1, try rather using *2 or 3.

I tried different numbers, but it didn’t work. However, it worked on my laptop!

https://answers.microsoft.com/en-us/windows/forum/all/how-to-disable-the-windows-10-language-shortcut/030016c9-bfed-48d9-8e4f-7d1030ced338

THANKS! It worked beautifully! I really appreciate your help and patience!
Hans

1 Like