Export to epub3 – trying to avoid inline css in jungle of settings

Hey,

big fan of Scrivener. I’m just struggling to get my (previously working) export of epub3 in macOS working under windows.

My main issue is:

  • it produces inline css and I have tried all variations of the dropdown in the section layout formatting available to me.

The logic of my files is

  • Chapter folder: Section Layout “chapter”, css class name “chapter”
    • Scene: section layout “Scene”
    • Scene
    • Multipart-Scene section layout “Scene”, css class name “scene”
      • Part of Scene: section layout “Partial Scene”, css class name “partialscene”
      • Part of Scene

I’m a web dev and I have a css stylesheet. This is what it produces:

<div class="chapter">
<h3 id="doc2" style="margin-left: 0rem; text-indent: 0rem;">Chapter Title</h3>
<p id="doc3" style="margin-left: 0rem; text-indent: 1.18rem; line-height: 10.5px;">Lorem ipsum</p>
</div>

I would like it to produce, however:

<div class="chapter">
<h3>Chapter Title</h3>
<div class="scene">
<p id="doc3" class="scene">Lorem ipsum</p>
<p id="doc3" class="scene">Lorem ipsum</p>
<p id="doc3" class="scene">Lorem ipsum</p>
</div>
<div class="scene">
<p id="doc3">Lorem ipsum</p>
<p id="doc3">Lorem ipsum</p>
</div>
<div class="scene">
<p id="doc3">Lorem ipsum</p>
<p id="doc3">Lorem ipsum</p>
<p id="doc3">Lorem ipsum</p>
</div>
<div class="partialscene">
<p id="doc3">Lorem ipsum</p>
</div>
<div class="partialscene">
<p id="doc3">Lorem ipsum</p>
<p id="doc3">Lorem ipsum</p>
</div>
</div>

my theory was that the div-class names are set under

  • select section layout in overview
  • select tab “settings”
  • fill out “css class name”

but for some reason it doesn’t work. I assume that the value under “formatting” that can be either “text and notes use standard formatting”, “use editor formatting” or “custom formatting” plays into this being used, but I don’t get the distinction in the handbook at all, unfortunately.

Anyone who has experienced and solved this?

If it worked on your Mac, did you try using the same compile format?
Export it from your Mac and reimport it on your Windows PC.

It has to do with styles, I believe. If there is no style to create a CSS rule from, then the formatting will end up inline.

Styles in your project (and compile format styles list), and this :

along this :

1 Like

it worked on your Mac, did you try using the same compile format?

I would do that, but unfortunately my macBook completely died unexpectedly during software update and won’t even start.

I will look into your suggestions and report back!