An example of Scrivener breaking your eBook output

On many occasions I’ve kept repeating that it is generally not a good idea to use word processors to export eBooks directly, and whenever I make that statement I am frequently greeted by push-back from authors who are perfectly happy doing it because it works for them.

I guess the operative phrase here is, “works for them.”

Exporting a clean manuscript from a word processor can work if you are dealing with a novel that has nothing but the most basic formatting. I have to point out, however, that not a lot of the books I work on for my clients fall into that category and typically have a few formatting features that require more attention to detail.

In these conversations I have with authors, a lot of folks also seem to think that Scrivener is the ultimate solution and does a perfect job exporting eBooks, a notion that I am going to shred in a moment. First, however, it is important for me to point out that I am a huge fan of Scrivener. I have used it for years. I have written 15 books in Scrivener and I would not consider any other software for the task. I have, however, never considered it to be an eBook exporter. It’s my writing software. Nothing else.

I am saying this because I want you to understand that it is not my intention to discredit Scrivener here. Rather, I want to debunk the myth that Scrivener’s eBook export is perfect and want to show a simple example in which Scrivener’s eBook exporter can completely destroy your eBook.


Imagine, if you would, that you have a small quote you want to format so that it is right-aligned on the page. However, since it is a quote, you do not want it to run the entire width of the page. To make it look nice and neat, you want it to run just, let’s say 20em wide, so that it turns out to be a neat little block of text on the right side of the page.

In Scrivener – or any other word processor for that matter – you would select the text, turn on right-alignment and use the ruler to scale down the width of the printable area. Alternatively, you could have a prepared style that does the same thing, of course, and simply apply it to the text. Makes no difference. The key here is that in order to achieve the proper limited-width word-wrapping, you will have to adjust the printable width.

It looks neat and nice, right? Just until you export it.

If you export a section like this to an ePub file, you will find that your page is mysteriously empty. That’s right. There won’t be anything on the page. What is happening?

In order to understand what is going on, it helps to look at the ePub file that Scrivener creates, and very quickly it becomes obvious that it fell into a major format trap.

Because of limitations in eBooks, in order to create the 20em text canvas on the right hand side of the page, Scrivener decided fake it by simply increasing the left hand margin. It’s a valid approach, no doubt. If you think of the entire page width as 100%, increasing the left margin to 80%, leaves 20% for our quote to be printed. The logic is fine. The execution is not.

First of all, we are not working with percentages. Why? Because if you are looking at a cell phone screen, there is a good chance that 20% of that screen width would barely fit a single word. We cannot allow that to happen. We need something that relates to the text size first and to the display size second.

To accommodate the problem, Scrivener decided to lay it out using em-spacing, which is exactly as it should be. The problem is that it looks at the actual page inside the Scrivener window to calculate the page width. Since the windows on my computer desktop is a lot wider than that of a cellphone screen or even a regular eBook device, the measurements are all off. Scrivener creates a left margin of 80em, and as a result our actual quote is printed off-screen in its entirety. That’s why you see an empty page.

ZenCoverThis is just one example of the unforeseen pitfalls you can run into when you simply rely on a software exporter to do the work for you. There are a myriad of other problems lurking to pop up when you least expect it. These software exporters are great at doing the grunt work, but they are exceptionally poor when it comes to create output that is actually compatible with real-world applications.

A much better way is to take control of your eBook files yourself. Instead of relying on exporting them, which is a hack and a shortcut at best, properly format them yourself. Use methodologies that have proven to work across platforms, such as the approach I outline in my “Take Pride in your eBook Formatting” tutorial series and my book “Zen of eBook Formatting,” which is a step-by-step guide from the most basic beginnings to fully advanced eBook layout features. Feel free to download a free reading sample on Amazon and see for yourself.

ZenCoverIf you want to keep up with my eBook formatting work, don’t forget to subscribe to my Newsletter. That way I can keep you updated about the latest developments, updates to my books, code snippets, techniques and formatting tips.

Also, don’t forget to check out my book Zen of eBook Formatting that is filled with tips, techniques and valuable information about the eBook formatting process.


10 Replies to “An example of Scrivener breaking your eBook output”

  1. John

    “em-spacing, which is exactly as it should be.”

    Except it’s not because if you increase font-size, then the margin in em will increase too on some devices.

    And it’s not as if we knew that since at least 5 years…

  2. Zanti

    The Scrivener Gap: Guido, I need your help. I’m totally in agreement with you on formatting. I have and I’m using your book and a youtube video that also uses your book to format my first book.

    Both you and the video use Word to clean-up the manuscript and then export to TextMate. I gave up Word years ago and only use Scrivener and Pages. I’ll save from Scrivener to Word for editing purposes to send to window users and/or Pages users, and that’s about the only time I use Word.

    I’ve posted this question on Kboards with little help. So I decided to take a chance and come to the source.

    What format should a Scrivener manuscript be converted to for export to TextMate; web page html or another format.

    And even more important: How does one clean-up the manuscript in Scrivener following your book, (Italics, bold, etc.) to export to TextMate and not do it in Word if that’s possible.

    Sorry for the long comment, I just want to format my book in the best way possible.

    Thanks so much for your help,


    • Guido

      Here’s what I do with my own manuscripts. I compile the book in Scrivener and save it as an RTF file that I then open in Word or Pages for clean-up.

      If you want to cut out another word processor entirely, however, I would recommend switching Scrivener to Scrivening mode (View->Scrivenings). If you select your Draft folder you will not have the entire book as one long flowing text. In this screen I would then do the necessary search and replaces that you need to do to clean up the manuscript. Scrivener has very good RegExp support, so you can do a lot of things there. Your biggest problem might be, however, that I don’t think you can search for text styles in Scrivener, which means you won’t be able to convert your italics and bold text in one swoop there. Still, if you want to cut out a separate word processor from your toolchain entirely, this is probably the best way to do it.

      BTW, any chance you could send me the link of that YouTube video?

  3. Zanti

    Hey Guido,

    Thank you so much. Here’s the video:

    Ok, I can save in RTF and work in Pages for clean-up.

    I don’t remember which Word version I have, I believe it’s 04, but I don’t even think it’s on my new iMac. So not really an option to use Word.

    Yes, you’re correct, can’t do search for text styles in Scrivener. So that would mean I would need to hand code each instance of italics and bold in the book (non-fiction so a lot of them)? If I can do this in Pages I’m all for it. I have to check.

    Thank you so much Guido, I was ready to get started on formatting and it’s been driving me crazy not being able to move forward. I do have a post on Kboards and will share some of what you have if that’s ok with you.

    Thanks again,


    PS. A post or video on using Scrivener and TextMate to format (without Word) would be great. Any plans for doing that?

  4. Zanti

    Sorry for this one, but I saved the Scrivener file as an rtf word comparable but it doesn’t allow me to open in Pages. Do I need to change the extension. I saved it to my desktop and it’s grayed out when I go to open it.


  5. Guido

    Just save it as a Word DOC file then. You can easily open that in Pages as well. Sadly Pages does not allow you to search for italics etc either. It’s probably the biggest shortcoming Pages has. That is the reason why I am using Word for the clean-up. I still have an old Word 2003 on a stone-age PC here that I’m usually using for that purpose.

  6. Zanti

    Well, I guess I can look at having to hand code italics and bold as the equivalent to ” I used to walk 3 miles, up-hill, in the winter, through a foot of snow, to school.” Will be a good story to tell on my blog when I get to it, “Here’s what I had to do to format my book in Scrivener and Pages.”

    Thank you Guido, I can now get started on formatting with a Zen mindset.


  7. Zanti

    Last question on this. If I use the Scrivenings mode and cut out word/pages, what would be the best file output to save for export to Textmate? I wouldn’t want to lose whatever I do in Scrivenings on export.

    It would seem it might be best to do the italics and bold, search and replace in TextMate instead of Scrivenings, since I’ll have to do it by hand. What do you think?

    I’m going to link this in my Kboard post for anyone else who might run into this issue with Scrivener and code formatting.

    Thanks so much for your time Guido,


Leave a Reply

Your email address will not be published.