Ebook Design

A Linux User’s Guide to Formatting Ebooks (Part I)

Most self-publishers use Windows or a Mac, and there are few resources online to help Linux users create ebooks. Which is a shame, because you can create ebooks with much greater precision and control using the Linux toolchain. What’s more, many/most of these tools are also available for Windows and Mac.

As a diehard Linux user, I’ve spent the last several years tweaking and perfecting my workflow. With my HOWTO in hand, I can convert a manuscript to both epub and mobi in about an hour. (Tack on an extra 2-3 hours for the Smashwords conversion. *grrr*)

These are the tools we are going to use:

  • LibreOffice
  • Vim
  • Calibre

There are variations to this process, depending on your preference. If you’re an Emacs user, or want to use TextPad in Windows/Mac, you’ll probably get similar-to-identical results. If this is you, chime in below in the Comments section with your own tips.

Some folks also like Sigil / Jutoh / Scrivener, all of which work on Linux (although I haven’t personally tested Jutoh or Scrivener). What can I say? YMMV. I will test these options on Linux and report back when I have a chance.

So. LibreOffice. Microsoft Word is evil in so many ways, there is not room in this blog post to even begin. You might start here, here, or even here. Bottom line: Free Software is about freedom, not price. I don’t want to be Microsoft’s bitch. Do you?

LibreOffice is not only free to download and use, LO’s default .odt format is a standards-compliant, publicly-available format that anyone can inspect. This is a Good Thing (TM).

But enough preachy-preachy. On with the formatting! Since you’re a Linux user, you already know all that stuff anyway.

You’ve written your 100,000-word masterpiece. Maybe you wrote it in AbiWord or gedit, but probably you wrote it in LibreOffice. Which you’re going to need anyway to do the Smashwords conversion later on, so the first thing you need to do is get LibreOffice set up properly. (By the way, all those nasty warnings Smashwords puts in their formatting document about not using anything but Microsoft Word? Ah–bullsh*t. Sorry. Bit of a cold there.)

First, and this is something that will save you time if you do it *before* you begin writing your manuscript, get rid of all the AutoFormat / AutoCorrect options.

Under Format –> AutoCorrect –> AutoCorrect Options

select the Options tab, untick everything:


under the Word Completion tab, untick everything:

BUT under Localized Options, make sure AutoCorrect gives you smart quotes:



Like I said earlier, it is easier if you make these changes BEFORE you begin your manuscript. They will make your life so much easier. Still, it’s possible to make these changes effective after the fact. I’ll discuss this in my “Wrangling LibreOffice for Smashwords” post later in this series.

Now you’ve got your manuscript in LibreOffice. You have two options:

1) Build the XHTML source file you will use to create your epub and mobi files using Calibre, and then deal with Smashwords as an afterthought; or

2) Build your Smashwords file first, and use this as the basis for your XHTML source file.

There’s an argument to be made for both. However, in my experience, especially with longer manuscripts that take months–if not years–to write, formatting corruption does tend to creep in, thus making the “nuclear option” Smashwords talks about necessary. In which case, Option 1 is best way to go.

Now what do we do? It’s time to clean up your manuscript in preparation for publishing–removing tabs, adding HTML tags, making sure all your quotes are smart quotes.

Of which more in Part II

Written by: J.M. Porup

Novelist J.M. Porup is An American Dissident in Exile. Read More


Leave a Comment