I've written over 50 novels, some of which I traditionally published, while others took the indie route. Because of that, I've had to spend a lot of time converting documents into a format acceptable to retailers like Amazon and Barnes & Noble.
When I first started down this path, it was a tough row to hoe. In fact, I struggled with it a bit. I'd do my best to convert the document, only to find whatever meat grinder I was submitting to would reject the file.
Also: 3 easy ways to subscribe to your favorite authors online
Everything changed when I discovered the open-source Calibre. With this free, cross-platform, easy-to-use app, I could quickly and easily take a document or HTML file and convert it to numerous file types, such as EPUB, MOBI, and PDF. Once converted, I could then use those files to submit books to any given retailer or share them with readers, clients, or customers at will.
Of course, converting documents into e-books isn't just for authors. E-books can transform cumbersome documentation or very long essays, documents, or papers into portable files that can be easily carried around and consumed on an e-book reader. I've converted company documentation into e-books and transformed long documents into a form that's easier to read on the go. No matter the purpose, you'll need to have a tool that makes the conversion easy. For me, that tool is Calibre.
Also: The best e-readers aren't all Kindle
Calibre is available for Linux, MacOS, and Windows and works the same, regardless of platform. You can download an installer for your platform of choice from the official Calibre Download page. The installation process is the same as installing any software on your operating system of choice, so you shouldn't have any problem with that.
Once you have the software installed, you're ready to convert.
What you'll need: The only things you'll need are Calibre installed and either a .docx or .html file to convert. I find that both file types work well, so you'll be fine with whichever is easiest for you to create. I highly recommend you make sure the source file is laid out exactly how you want it. For example, make sure all chapter heads are either H1 or H2 (unless you absolutely must use H3) and the text uses Justify alignment. You should also be using a font like Verdana. If you don't have that font available, you can go with a Sans Serif font, Helvetica, Lucida Sans, Calibri, or New Times Roman.
The first thing to do is open Calibre. Once open, click Add books from the main window.
When the file picker opens, navigate to the folder housing the file you want to convert, select it, and click OK.
You can convert a single book or do batch conversions in Calibre.
Jack Wallen/In the main Calibre window, select the file you want to work with and click Convert books. This will open a new window, where you can customize the look and layout of the converted file. The first thing to do is click the Output format drop-down in the upper right corner. Select the format you want (such as EPUB or MOBI).
Also: The best tablets for reading: Does anything beat Kindle?
It's important that you do this first. If you customize your book in the wizard and then select the output format, it will erase all of your customizations and you'll have to do them again.
If you already have the book cover, make sure to add it by clicking the folder icon associated with Change cover image.
Jack Wallen/Next, click the Look & feel tab in the left sidebar. In this window, you can configure the fonts (disable font rescaling, font size, minimum line height, font family), text (input character encoding, text justification, smarten punctuation, unsmarten punctuation), layout (remove spacing between paragraphs, insert blank line between paragraphs, linearize tables), styling (extra CSS, margins, padding, floats, colors), transform styles (add rules to convert styles), transform HTML (add rules to change HTML styles). For my purposes, here's what I've always done:
I generally only concern myself with the Look & feel and Structure detection sections.
Jack Wallen/Next, click the Structure detection tab. In this window, look for 'h1' and 'h2' in the Detect chapters section at the top. If your document uses either H1 or H2 for chapter headings, you don't need to change anything.
Also: How to automatically convert Google Drive uploads to Docs format
However, if your original document uses, say, H3, you'll need to change one of those entries so Calibre can pick them up.
Make sure to match the Detect chapters section with whatever heading style you used in the original document.
Jack Wallen/You can go through the other sections, but those two are the primary focus for me. If the source file is already formatted properly, you shouldn't have to do too much massaging. Click OK and the conversion will begin. When the conversion is done, you'll find the new e-book file listed in the Formats section of the book's details. Click the new e-book format and it will open the file for you to check. If all is well, you can submit the file to whoever needs it.
A successful conversion!
Jack Wallen/And that's all there is to converting documents to e-books with Calibre.