ePub 3 -- separator between sections

ra
randybisig
Posts: 16
Joined: Sat Jan 07, 2017 10:17 pm
Platform: Mac + iOS

Tue Jun 12, 2018 12:58 am Post

Okay, I know how to go to Edit the format > Separators > select Section Text > Separator between sections > Custom.
Now, I want three lines.
Blank Line
§§§ (option key-6)
Blank Line

Used Option-Return to put in the blank line (Actually, line return vs carraige return). Works in ePub 2 format. Doesn't work in ePub 3 format.

Glitch, or am I missing a step?

User avatar
KB
Site Admin
Posts: 20737
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Tue Jun 12, 2018 8:23 am Post

For ePub 3, any extra lines you put around separators will be ignored, because of the way the conversion process works. However, this is a good thing, because inserting manual blank lines here doesn't result in the best HTML in the finished ebook. A better approach is to use CSS. (Although Scrivener doesn't require anyone to know CSS to create an ebook, because ebooks are ultimately built on HTML and CSS, if you want to tweak things beyond what Scrivener does by default, it's often handy to dabble in a little CSS. I hasten to add that I myself am no CSS guru and find most of my tweaks from Google.)

Precisely for this reason, separators in Scrivener are assigned a "separator" style in the HTML so that you can tweak them in the CSS. In your case, you just want to add the following line at the bottom of the "Custom Stylesheet" area of the "CSS" pane in Compile:

Code: Select all

.separator { margin-top: 1rem; margin-bottom:  1rem; }


1rem is the same as the book's default font height, so this will place an empty line above and below separators. The nice thing about this approach is that you have a little more control, too - you could set the spacing to 0.5rem or 1.5rem if you want a little less or a little more spacing, for instance.

Hope that helps.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

ra
randybisig
Posts: 16
Joined: Sat Jan 07, 2017 10:17 pm
Platform: Mac + iOS

Tue Jun 12, 2018 11:13 pm Post

Perfect, Keith. Exactly the help I was hoping for.