How to maintain Editor fonts in ePub 3 output?

Thank you to brookter and others who assisted me in another thread. As stated in that thread, I was mixing two distinct topics. I am re-posting here to ask my question in (I hope) a simpler way.


  • In Scrivener > Preferences > Editing > Formatting, my default font is Arial 12 Regular black.
  • I want to compile from Scrivener 3 to ePub 3
  • In the attached test file (a zip file), I am using the standard E-Book format, with no changes to it whatsoever.

My Goal

  • I want the text as it appears in Editor to flow thru unchanged to the ePub 3 output.

My Results (see image below from iBooks)

  • When I compile, “Paragraph 1” comes out fine. The compile process causes no changes to the font or to the font attributes. I believe this is because I am using my default font type, Arial 12 Regular black.
  • When I compile, “Paragraph 2” does not come out fine. Some font attributes come out unchanged (the Arial font itself, the font colour and the italics attribute). But the compile process changes other font attributes (font size, font superscripts). As such, the ePub 3 output no longer matches the font settings in Editor.

My Goal

  • So my goal is that the font settings in Editor pass thru unchanged in the ePub 3 output.
  • I know (from brookter) that I can apply Sytles in Editor to the various font attributes in Paragraph 2. This is one way to maintain the font attributes in the ePub 3 output. But going thru an 85,000-word manuscript - then finding, applying and maintaining the various Style attributes - is a bit of a pain. So the question is, is there a simpler way to attain my goal?


  • I know that e-readers allow the reader to change the font family (Arial to Palatino, for example). I am not trying to alter that.
  • I also know there is a standard “As-Is” Section Layout in Scrivener 3, but it includes a section break. I do not want insert a section break simply because a font size changes. I do not want to introduce any additional Separators whatsoever.

So before I go thru my manuscript and insert a bunch of Styles in Editor, is there a simpler way to attain my goal? Thx

Test - (93.1 KB)

As I understand the information provided in the manual, beyond basic attributes (such as italics, bold, and font colour—as sampled in your image above of the compiled text—but not underlining) ePub3 needs defined styles to compile semantic HTML elements. Without defined styles, paragraphs are compiled unstyled, so an as-is ePub 3 compile won’t do what you want.

ePub 2 (as below) is simpler.

Thank you for the confirmation, Bridey. Appreciate it.

As far as I can tell, styles from the Editor ARE taken through to pub 3.

I’ve used pomme’s scrivener file, and I’ve duplicated the second paragraph to a third document, then selected the text in Arial Black 18 and created a Character style CHAR-arial18-black from it (ignore the purple, that’s just the highlight):

Then I compiled to epub3 with the bog standard default settings – no customisation at all:

And this is what I get:

So, it seems all you need to do is use the appropriate style in the Editor to get the font size changes.

BTW I’m not claiming expertise here – just trying to work it out along with you.

Yes, defined styles are compiled as semantic HTML elements. It’s the hassle with an existing project of going through the text and creating and applying XX different styles to words or sections of text.

Is that not right?

I’m not sure – like you I’m trying to understand it properly, so this is helpful. :smiley:

As for going through and assigning styles, it’s actually quite easy: you just select a portion of text already in that format and create the new style from it. The go to the next example of that formatting and from the Style Panel, click the gear and choose Select Similar Formatting – you can then apply your new style to them all at once.

I think we’re on the same page.

Yes, your suggestion for assigning styles is a super bit of programming . . . though I am glad I don’t have to go through a long project double-checking every element is exactly right.

Yes, styles assigned in Editor do carry thru to ePub 3. I was just hoping to not have to assign and maintain various styles in Editor. Oh well.

I’ve also learned that I sometimes mix the features in Scrivener 3 with the container protocol for ePub 3. I have to remind myself they are distinct things.

TBH I think part of the problem is that you’re wanting to define the base font (Arial) in the Editor / Compile, when epub is set up to let most of the formatting happen in the ereader (eg changing fonts) - though of course you don’t get to choose Arial specifically, just Seravak or San Fransisco as a sans font.

What’s the reason for this, if you don’t mind my asking?

No, I do not want to define the base font. Sorry if that was not clear. I do, however, want to maintain relative font sizes.

Let’s say I assign “sentence one” to font size 12, and “sentence two” to font size 10. The reader, of course, can increase the overall font size in the e-reader. But the font size for “sentence one” will still be larger than the font size for “sentence two”.

Also, if I mark text as superscript in Editor, I want it to continue to be superscript in the ebook.

You’ve taught me that I need to set up styles in Editor for anything that (in my earlier example) is not Arial 12. I still don’t really understand why some font attributes (colour, italics) carry thru just fine to ePub 3 without having to set up a specific style, whereas other font attributes (font size, superscript) don’t. But that’s ok. I now know how to use styles to make it work.

Thanks again.

I was thinking more of the font (Arial) than the font-size.

But it’s odd – I’ve just added a superscript 2 to a word in your test and it’s compile properly with no need for a style – just the standard Format > Font > Baseline command. Same for a subscript. But it doesn’t accept a series of superscripts on their own. Perhaps it’s just a whole word or a sentence it doesn’t like?

Screenshot 2017-11-27 19.21.10.png

In the black box all the numbers are either superscripts or subscripts, but only the ones directly behind normal baseline words are displayed properly – on their own or before a word, they don’t work.

There’s something going on here: whether it’s intended behaviour or not (by Scrivener or epub, who knows?).

I’ll start a separate thread on this to get an informed opinion.

Thanks brookter. That’s similar to what I’m seeing in my manuscript.

Brookter, re your post to this thread three hours ago, if you have a chance please upload a ZIP of your SCRIV file - the one where you test superscript text. I’d like to compile it and see if I get exactly the same result. Thx

There you go…

Test - Formatting (91.4 KB)

FYI I get the same result as you. Superscripts work if they immediately follow “normal” text. Font size changes do not work - they all convert to size 12 (expect the superscripts). Thx

Bumping in the hope Keith or Ioa or Xyz can shed some light…

I can’t get this to work, so I’m guessing I’m missing something. I’ve created character styles for both bold and emphasis, but when I select similar formatting it selects everything which shares the traits of the paragraph style, and not just the character traits I want to use.

Any thoughts on what I’m doing wrong?

Is the selection inside an already defined paragraph style (ie, you’ve applied emphasis on top of blockquote)? I’m not sure that will work – ie it’s a cumulative process.

Does it work if you select a word in a ‘No Style’ paragraph and apply the format, then go the ‘Select Similar Formatting’ etc?

Hmm, I will check that out. Thanks for the tip.

I do wish that character formatting would just be carried over into the ePub3 ebook (An option to auto-convert to character styles, maybe?). It’s going to take me a long time to go through all my old projects to get them up to date. But at least I understand what’s going on now. Thanks.

Update: That worked! It’s counter-intuitive to not set up a default style in the editor, but I’ll get over it. I’ve got my default display in preferences the way I want… should be all set.

FYI this problem appears to be fixed in Scrivener version 3.0.1.