Inconsistent Compile (Formatting) EPUB & MOBI

Good Day, Scriveners,

Would you be so kind as to lend your insights regarding how to debug inconsistencies compiling EPUB and MOBI files?

Compiling one–and only one–input DRAFT Scrivener Project in both EPUB and MOBI formats result in noticeable differences (which are driving this new-to-Scrivener-only-since-the-weekend nuts).

Attached is a .PDF with some screenshots of the results; including:
*One centers the author block (correct); the other left-justifies (incorrect).
*One gets the “no indent on first-line of first-paragraph” correct (sort of); the other doesn’t.
*One gets the “don’t indent this line” formatting correctly; the other doesn’t.

Fascinating to note that the problems (above) are not uniformly expressed by only one of the two outputs; the problems seem (somewhat) evenly distributed between the two formats.

This [desperate] newbie welcomes your assessment & suggestions with great appreciation.

Many, many thanks,
Plane Wryter
Scivener-Problems.pdf (551 KB)


Much of this is down to the e-book readers themselves - they choose to ignore certain aspects of the HTML. There is no way to avoid indents on the Kindle - it will apply a slight indent to all paragraphs and this cannot be overridden.

HTML in general doesn’t handle indents, and e-book formats use HTML. It’s then up to the e-book reader to determine whether or not, and how, to apply indents. Could it be that you have used tabs for some indents but relied on indent formatting for others? It’s best not worry about indenting too much for e-books - you should just have all paragraphs the same and let the e-book reader deal with that.

I’m not sure about the “Novel by” part, but that may be because the ePub e-book reader is treating that as regular text, although I’m not sure why that would be offhand. Is that part of the same title page in Scrivener?

All the best,

Hi there

From Amazon I downloaded the free sample of Lee Child’s Killing Floor. I wanted to compare the formatting between the Kindle version and the paperback.

On the Kindle version there is no indent on the first paragraph. Then every other paragraph of the scene has its first sentence indented.

For a scene break in the Kindle version there is a linefeed and then the first paragraph of the new scene has no indent.

The formatting on the Kindle is, as far as I can see, identical to that of the paperback version.

So my question is: how is the publisher creating a file that gets the Kindle reader to override the first paragraph indent?

Thank you

I don’t know - you’d have to ask the publisher. :slight_smile:

They are probably using some special CSS styles I don’t know about - Scrivener uses that standard Apple HTML exporters.

Update: Ah, actually, looking into it, the lack of first-line-indent is indeed caused by Apple’s HTML export - Word has the same issue, as I discovered here:

Basically, CSS does allow indents, so I was talking out of my backside there it turns out, not for the first time. However, of course, in web browsers it is standard to have no indents. Most HTML generators - Word’s and the one the Apple text system uses among them - are a little behind and are still aimed at browser content, so, given that the default for browsers is a zero indent, when text has no indent the HTML generators don’t bother writing out a “text-indent” value for it at all, because they know that if there is no value, the browser will treat it as having no indent anyway. The trouble is that e-readers do add a default first line indent, do if text doesn’t have a “text-indent” value, it will be given the default indent.

In short: if a paragraph doesn’t have an indent, the HTML won’t include that information, so e-book readers will add a default indent.

The site linked above gave me the fix, too. If paragraphs are given a 0.01px indent, this gets rounded down and included as “text-indent: 0px” in the CSS, which is exactly what we want. So, for 2.0.6 - and a beta that I’ll make available on the beta forum next week - Scrivener will convert any 0px indents to 0.01px indents before passing the text through the HTML-creation code, thereby maintaining the lack of first line indent.

Er, that was a really long-winded way of saying that the first-line indent thing should, I hope, be fixed for 2.0.6. :slight_smile:

All the best,

Keith, that’s great, thank you!


Many thanks for investigating and clarifying this issue…your remarks are helpful and appreciated–doubly so for all newbies who lacks experience or understanding of what to expect (that is… unexpected results and be so…unexpected!).

On that point–in addition to your other fine video tutorials–have you considered cutting a “…this is the end-to-end approach to editing and producing eBooks with Scrivener–and what you can expect” to supplement (“pre-pend,” actually) your informative “How to…” Exporting eBooks video?

The more I use Scrivener, the better it gets…thank you for transforming your idea into a practical reality…EVERYONE should use Scrivener!

Best regards,
Plane Wryter