Compiling Scrivener 3 for KIndle - Can I use styles

This is my first time compiling in Scrivener 3 for Kindle (done it many times in Scrivener 2). My basic question is can I use Styles. I used to use presets. These gave me custom font sizes and line spacing. In Scrivener 3 I have created the styles both in the manuscript and imported them into in the new format I have created. If I create the compile for PDF I see my styles but if I create it for MOBI (old style) I don’t.
Am I allowed to do this or am I doing something wrong?
:frowning:
Best Regards

Neil

With the legacy Kindle format you should be seeing normal formatting carrying over—if not from your compile format, from just the editor itself. Styles are little different from presets in that they not only format text, but protect the formatting as well (unless compile settings specifically change that style by name). If you used Preserve Formatting in the past, it’s the same idea.

So to answer your question better, we’d need more detail into what you are doing, and expect to see. Not everything you can do in the text editor is valid in an ebook context for instance, such as changing font families.

Just to add to Ioa’s comment, though, you can use styles in the ePub 3 and KF8 formats, and in that those formats are really built around styles and the styles end up in the CSS. So that we can give you a little more help, would it be possible either to share some screenshots or a sample project showing the problem in a little more details?

All the best,
Keith

Hi,

Thanks for your quick reply. I went back and did some more testing. Attached are two screenshots both were compiled from the same compile format (I just changed the compile for file format). I also added some screenshots from the compile.

As you can see the line spacing between the chapter and a style called Location, and the location and text ( a style called Body Text) are very different between the two formats. Not sure what happened to the lines between chapter heading and location. Also, the other line spacings seem very different.
I have attached some screenshots.
The PDF output
My iPad Kindle App (had to scan it :slight_smile: )
The main page from my compile
The format screen for the Location Style
The format screen for the Body Text Style.

By the way, I do intend to move on to the more advanced styling now available. I just wanted to get what I’m used to, working first.

Thanks for your help

Neil (a dedicated Scrivener from the early days :smiley: )
The Journey Screenshots.zip (612 KB)

Hi,

First, a general note: I notice you have a “Body Text” style, and I assume you are therefore using a “Body Text” style in your main text. I’d recommend against that. Instead, I would recommend using “No Style” for your main body text and only applying styles for text that needs to look different. You can then override the look of the main body text using a Section Layout during Compile (just as you used to use “Formatting” to do this in 2.x). If you really want a “Body Text” style adding to your main body text in the exported document, you can always create a “Body Text” style in Compile and apply it to the text of the Section Layout so that it gets applied to such text in the exported document. This just allows for more flexibility, otherwise you always have to override the Body Text style in your Compile format. this is just a recommendation - you can assign a “Body” style in your text in the editor if you want, it’s just that you may have to do more work in Compile if you do.

As to your particular question, if I understand correctly, the problem is that the “Location” style has a big (intentional) gap before it in the print version, but not when exporting to Epub - is that correct? If so, this is almost certainly because Epub uses HTML, which interprets line spacing differently to a word processor (including Scrivener’s PDF and print generation). Instead of using line-spacing to force such a big gap - which is almost certainly not what you want anyway, because you wouldn’t want giant gaps between lines inside the paragraph were such a paragraph to flow over more than one line - you should use “Paragraph spacing before” (select “Other…” from the line-spacing pull-down menu to set this). This allows you to set the gap that should appear before the paragraph, and will work better than line-spacing in HTML and ebooks as well as being the best way of doing it for other formats too.

All the best,
Keith

Hi Keith,
Thanks for the reply. And I have it working for the location style using before and after paragraph spacing, which deals with my gaps to the chapter heading and down to the first text paragraph. So I thought I would see if I could adjust the body text paragraph spacing (though I do intend to follow your recommendation on this regarding using no style). When I did, I got some strange behaviour. When I set the space to less than 6.0 points the paragraph spacing doesn’t change. But if I set it to 6.0 points, I suddenly get big paragraph space.

Any ideas what that could be?

Thanks

Neil

Hi Neil,

It’s difficult to know what is happening without seeing the project, as I cannot reproduce that off the bat. One thing to bear in mind is that for ebooks, everything is done with em and rem measurements, so Scrivener has to measure line spacing and compare it to font sizes to generate the best values.

All the best,
Keith

Hi Keith,

Okay, thanks for your help, I have enough to move forward. I appreciate you giving me the time. I know you’re busy.
I´ll look into it further and if I have any specific questions I’ll post them.

Thanks

Neil