Countless book publishing articles and seminars have discussed how big publishers might add ebooks into an existing book publishing workflow. You read about “starting with XML” and a lot of other ideas that sound good in theory. However, they rarely take into account the tools most people actually use.
Here at our admittedly tiny publishing company, we have established a book publishing workflow that works for us mostly because of one core concept: our book text is separate from the formatting.
Our book production process relies heavily on the use of styles. If you don’t use styles for formatting, or worse, don’t even know what styles are, you are starting at a tremendous disadvantage.
In Word or InDesign, styles are a named description for a selection of text. In HTML, cascading style sheets (CSS) do the same thing. This point is crucial. No matter what tools you use, if you can get the styles to carry forward from one format to another, you can reformat easily.
Here’s how this plays out in real life with the tools we have available. Although your tools may be different, keeping that one core idea of styles can save you a lot of grief in the long run.
1. Start with Text
We believe that while you are writing, you should not be concerned about formatting, so we created software called IdeaWeaver that we use for writing. Other tools like Scrivener also force you to focus just on the words. For us, writing without formatting makes a big difference in productivity.
2. Apply Formatting with Styles
We export our text from IdeaWeaver into Word format. Once it’s in Word, we spell check everything and do initial editing. We then format the document with styles. We use built-in styles for headings and apply other formatting such as bullets with named styles. We don’t use any local formatting, except for bold and italic, and we never use anything but the simplest Word features. Because Word lets you apply styles with keyboard shortcuts, you can format a long document quickly.
We’ve standardized on the names for what few custom styles we need. For example, endorsements often have special formatting. Whether an endorsement is in a Word document, InDesign file, or Cascading Style Sheet, the style name for that text is “Endorsement.”
3. Map Styles in InDesign
We use InDesign to prepare the print edition of the book. If you do not plan to publish a print edition, you can skip this step.
We create our InDesign template with style names that exactly match the style names in Word. When we flow the text into InDesign, we map the styles so they are formatted with the InDesign style. Then you do final pagination, tweaking, and create any additional styles. If we need tables or graphics, they are all put into the InDesign file. We do our final proofing on the InDesign file.
4. Export the InDesign Text to RTF
Once the book is off to the printer, we move on to the ebook. We export the final text from InDesign to RTF.
5. Map Word styles to HTML Styles
The print layout work often introduces a few formatting features that we can’t or don’t want to replicate in the ebook. Drop caps, for example, generally get converted to raised caps. We make a pass through the Word document, tweaking print-specific styles as necessary.
6. Generate HTML
We run an in-house program to convert the Word document to HTML. It maps Word styles to HTML styles, and generates simple, clean HTML. (Note: we do not use the built-in Word HTML export tools from Microsoft because in every version of Word we’ve seen, they makes a bloated mess.)
Because we use Word’s built-in styles as much as possible, it is easy to reliably map a Word Heading 1 to an HTML H1 tag. Similarly, our custom styles, which use standardized names, can easily be automatically matched up to a corresponding HTML style. All of the HTML styles are pre-defined in a separate CSS file.
The goal is to end up with extremely clean HTML. Our HTML converter is home-grown, but you could do something fairly similar by pasting Word text into Dreamweaver, which is fairly smart about “reading” Word headings as HTML headings and so forth.
7. Assemble an EPUB File
We assemble the HTML files for the book into an EPUB project by hand. You can also use one of several tools on the market to do this step. However, we’ve never found one that gives us the level of control we want.
A linked table of contents is arguably the hardest (and most time-consuming) part of an EPUB to create by hand. We have another home-grown tool that helps us assemble the TOC and insert hyperlinks into the HTML.
8. Run Epubcheck
Most vendors that allow you to upload an EPUB require your book to pass an industry-standard validation program called Epubcheck. We always validate our EPUB files with Epubcheck and correct any errors we find.
Once the EPUB file passes Epubcheck, the ebook is ready to be uploaded to Barnes & Noble PubIt!, as well as any other vendor who supports EPUB files.
9. Run Kindlegen
To generate a Mobipocket version of our ebook for upload to Amazon, we run the EPUB file through the Kindlegen program, which is a free download available from Amazon. Kindlegen takes the EPUB file and converts it to a Mobipocket file. We upload the Mobipocket file to Amazon’s KDP for Kindle sales.
Although Mobipocket supports proprietary HTML tags and styling tricks, we’ve been able to get good results without resorting to tweaking the HTML specifically for the Mobipocket edition of our books.
One thing to note about this entire process is that it is one-way. If we need to change the book after it has been published, we have to change the InDesign file and the EPUB project. The Mobipocket file just gets regenerated from the EPUB. For a completely new edition of a book, we would start over in Word.
Like I said, we have created some home-grown tools to help with our workflow. But if you think about the core concepts behind what we do, you can probably replicate a workable workflow for yourself in much the same way using the tools you have available to you. The key is to make sure you use styles consistently throughout the workflow.
As a side note, after reading this article, it probably comes as no surprise that we only offer ebook conversion services to clients for whom we have also done the print layout. Because of our strict use of styles, we can create ebooks that look good. Trying to do that with source files created by someone else who doesn’t use styles would make us insane, so we just say no.