How to maintain Editor fonts in ePub 3 output?

po
pomme4mois
Posts: 93
Joined: Wed Aug 10, 2016 11:13 pm
Platform: Mac

Mon Nov 27, 2017 3:57 pm Post

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.

Set-Up
- 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?

FYI
- 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

Screen Shot 2017-11-27 at 09.56.34.png
Screen Shot 2017-11-27 at 09.56.34.png (448.09 KiB) Viewed 275 times


Test - Formatting.scriv.zip
(93.08 KiB) Downloaded 10 times

User avatar
Bridey
Posts: 189
Joined: Wed Nov 22, 2017 2:24 pm
Platform: Mac

Mon Nov 27, 2017 5:23 pm Post

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.

ePub3 HTML Styles.png
ePub3 HTML Styles.png (114.74 KiB) Viewed 264 times


epub2 compile.png
epub2 compile.png (55.98 KiB) Viewed 264 times

po
pomme4mois
Posts: 93
Joined: Wed Aug 10, 2016 11:13 pm
Platform: Mac

Mon Nov 27, 2017 5:44 pm Post

Thank you for the confirmation, Bridey. Appreciate it.

br
brookter
Posts: 1384
Joined: Wed Mar 18, 2009 12:22 pm
Platform: Mac

Mon Nov 27, 2017 6:09 pm Post

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):

Screenshot 2017-11-27 18.02.13.png
Screenshot 2017-11-27 18.02.13.png (283.76 KiB) Viewed 249 times


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

Screenshot 2017-11-27 18.04.36.png
Screenshot 2017-11-27 18.04.36.png (304.3 KiB) Viewed 249 times


And this is what I get:

Screenshot 2017-11-27 17.59.22.png
Screenshot 2017-11-27 17.59.22.png (251.18 KiB) Viewed 249 times


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.
Last edited by brookter on Mon Nov 27, 2017 6:17 pm, edited 1 time in total.

User avatar
Bridey
Posts: 189
Joined: Wed Nov 22, 2017 2:24 pm
Platform: Mac

Mon Nov 27, 2017 6:15 pm Post

brookter wrote:As far as I can tell, styles from the Editor ARE taken through toe pub 3.


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?

br
brookter
Posts: 1384
Joined: Wed Mar 18, 2009 12:22 pm
Platform: Mac

Mon Nov 27, 2017 6:21 pm Post

I'm not sure -- like you I'm trying to understand it properly, so this is helpful. :D

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.

User avatar
Bridey
Posts: 189
Joined: Wed Nov 22, 2017 2:24 pm
Platform: Mac

Mon Nov 27, 2017 6:25 pm Post

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.

po
pomme4mois
Posts: 93
Joined: Wed Aug 10, 2016 11:13 pm
Platform: Mac

Mon Nov 27, 2017 6:30 pm Post

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.

br
brookter
Posts: 1384
Joined: Wed Mar 18, 2009 12:22 pm
Platform: Mac

Mon Nov 27, 2017 6:44 pm Post

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?

po
pomme4mois
Posts: 93
Joined: Wed Aug 10, 2016 11:13 pm
Platform: Mac

Mon Nov 27, 2017 7:04 pm Post

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.

br
brookter
Posts: 1384
Joined: Wed Mar 18, 2009 12:22 pm
Platform: Mac

Mon Nov 27, 2017 7:24 pm Post

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
Screenshot 2017-11-27 19.21.10.png (78.54 KiB) Viewed 227 times


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.

po
pomme4mois
Posts: 93
Joined: Wed Aug 10, 2016 11:13 pm
Platform: Mac

Mon Nov 27, 2017 7:33 pm Post

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

po
pomme4mois
Posts: 93
Joined: Wed Aug 10, 2016 11:13 pm
Platform: Mac

Mon Nov 27, 2017 10:16 pm Post

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

br
brookter
Posts: 1384
Joined: Wed Mar 18, 2009 12:22 pm
Platform: Mac

Mon Nov 27, 2017 10:29 pm Post

There you go...

Test - Formatting superscript.scriv.zip
(91.39 KiB) Downloaded 16 times

po
pomme4mois
Posts: 93
Joined: Wed Aug 10, 2016 11:13 pm
Platform: Mac

Mon Nov 27, 2017 10:40 pm Post

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