Book Production Services: Ebook and Print-on-Demand

Regular readers might have noticed something different about my blog. I had to take down my Ebook Services page. Long story short, life happened and I got tired of telling people, “Sorry, I can’t help you right now.”

quinnmail2I apologize to those people. I’d love to work on every project offered to me, large or small, but that’s impossible right now. (For my regulars, you’re in–no worries, I’ll take care of you.)

Since I have to limit what new projects I can accept, I’ve decided to focus on areas where I can do the most good.

MOBI Conversions for Calibre Files. The number one search term that brings people to this blog is, Calibre broke my Kindle book, or words to that effect. The number one email query I get is, Calibre broke my Kindle book. I’ve tried to help with how-to guides, but it seems I just confused the hell out of a lot of people. I’m getting more cries for help than ever. Not that I want to be in the conversion business, but I really do want to help writers–and readers!–so here goes: Send me ten bucks along with the validated EPUB file you produced in Calibre and I’ll put the fix in and convert a MOBI file that works. Email me at jayewmanus at gmail dot com.

DIY Consulting: My favorite indie writers are those who are invested in learning how to be great indie publishers. They are curious about all aspects of book production and eager to learn. If you’re one of those and you’re stumped by a glitch in your formatting or you want to learn some nifty tricks to kick your production values up a notch, contact me at jayewmanus at gmail dot com. For around twenty bucks, I can troubleshoot your files, show you some formatting tricks, even whip you up a template.

Back List Restoration and Production: If you had the rights reverted for your back list, but you’re putting off reissuing the titles as ebooks and/or print-on-demand because of the complexity of the project, the costs involved or the time it will take, let’s talk. This happens to be something I’m very good at and, I promise, I’m a lot faster than you. 🙂 I can scan old books, restore the text, format the files for digital and print, and even help with the covers. I won’t charge you an arm and a leg, either. We can work out price deals on a case by case basis.

I’m hoping that life settles down for me soon and I can go back to helping out every person who asks me to help. Until then, I’ll try to write more blog posts to make your DIY book production easier.

Advertisement

Word to Calibre to MOBI: Part 3: File Conversion

You went through Part 1 and styled your Word file properly. In Part 2 you learned how to turn it into a functional html file. Now it is time to convert your file.

A caveat before we begin. I use Calibre, but I don’t really use it. It has a pleasant display and it’s a good way to double-check EPUB files I create. I don’t use it to convert my files. What I am about to show you is the result of some serious screwing around with the program. It’s a hack and it may not be the very best one. What it does is work. So, if any of you are more familiar with how Calibre works and you have a better way, feel free to share.

STEP 1: Open your html file in Calibre. It will convert into a “zip” file.

CAL16STEP 2: Convert the ebook into an EPUB file. (Yes, EPUB, not MOBI. You will never again use Calibre to convert MOBI files for commercial purposes. It’s still just fine for personal use.)

CAL17STEP 3: Once your book is converted and you are back at the main page, right click on the book title and a drop down menu will appear. There will be an entry that says “Edit Book.” Click that.

CAL18STEP 4: Holy Moley time again. It’s an EPUB editor.

CAL19STEP 5: In the left hand sidebar, under “Text” delete the file that says “titlepage.xhtml”

STEP 6: Under “Styles” open the file that says “page_styles.css”. It will contain some code that says:

{
margin-bottom: 5pt;
margin-top: 5pt
}

Delete that and Copy/Paste in its place this bit of code:

{margin: 0; padding: 0; border: 0; font-size: 100%; vertical-align: baseline;}
body {text-align: justify; line-height: 120%;}

STEP 7: Under “Images” will be your cover image. Open it. Now resize it. (make sure the Keep Aspect Ratio box is checked) Change the width to 800px. (The cover height should increase proportionately.)

STEP 8: Under “Miscellaneous” will be a file called “content.opf.” Open it. Scroll down to the bottom and you will see two entries: <guide> and </guide>. If you built your html file the same way as in this tutorial and deleted your titlepage.xhtml, there will be nothing in the guide.

CAL20Using Copy/Paste, insert this code between the two entries

<reference href=”FILE NAME” type=”toc” title=”Table of Contents” />
<reference href=”FILE NAME” type=”text” title=”Beginning” />

STEP 9: Figure out which of the files under “Text” is your table of contents. Copy the file name and paste it in the reference line so it replaces FILE NAME. (use Ctrl C to copy and Ctrl V to paste)

Do the same thing for whichever file (your title page or Chapter One or your preference for the beginning of your ebook) in the “Beginning” reference line.

Mine looks like this:

CAL21STEP 10: Save and close the EPUB editor.

STEP 11: Open the Kindle Previewer. Click on “Open Book” and select the EPUB file you just modified. If you did this right, you will get this box:

CAL22Now you have a MOBI file that will upload successfully at Amazon–and it will work. No squishy lines, no messed up formatting, and the user’s navigation guides will work.

I’m sure there are plenty of things you can do to modify the file in the EPUB editor. (I didn’t, for instance, even touch on the toc.ncx) This is a pretty rough hack I’ve come up with, and it can probably stand some streamlining. There is plenty of room for fine tuning. What I hope you see is that Word can be used for styling, but its html leaves far too much room for error in ebooks. With a little knowledge of html, you can write in Word, but then you do your styling in the text editor. When you’re comfortable with html, you can make complete ebooks and not have to use Calibre at all. (And you’ll be ready for Paul Salvette’s guide to ebook development, it’s featured in the sidebar.)

Again, you probably have plenty of questions. So send them to me at jayewmanus at gmail dot com and I’ll put together a FAQ post to answer them.

Guest Post: Karen Myers–No Need For Calibre

When I ran the recent ebook formatting contest, I noticed some similar issues with many of the entries, all of them the result of Calibre conversion. I have no beef with Calibre, it’s a great online reading platform and I use it myself, but it’s a not-quite-right tool for converting Kindle books. One entrant, Karen Myers (Perkunus Press), contacted me about the problems in her ebook.

KMblog6The flaws weren’t fatal, but Karen was not satisfied with not-quite-right. So I pointed her at Sigil and Paul Salvette’s books, tutorials and website, and now I’ll let her tell you the results:

__________________________

Silly me. I’m an old programmer and I pride myself on trying to get my ebooks “just so”, as if I were writing a piece of code. I want to create worthy offerings to add to humanity’s river of books; at the very least, they should be shiny and well-scrubbed.

So when Jaye offered to judge the formatting of a few books from her blog fans, I hopped right on board, and she was very kind in her review.  But I read with horror things like “squishy line spacing” and links to chapters not working quite as they should, systematically.

I use an EPUB reader and hadn’t seen the book on a Kindle device other than the PC Previewer, so it was useful to see this from the Kindle reader’s perspective, since none of my buyers had complained (yet). Without a Kindle device, I hadn’t realized quite how irritating it was to not properly trigger the “Cover” and “TOC” hard buttons.

Now on the one hand, it wasn’t really broken, but on the other hand, I want perfection in book formatting, and some cosmetic and graphic flourishes. I’m not willing to settle for “good enough,” so Jaye was nice enough to coach me through some of the issues.

(Jaye here: I made a template for Karen based on Paul Salvette’s The Ebook Design and Development Guide)

If you’re content with auto-conversion from EPUB to MOBI or vice versa, or output direct to ebook formats from products like Scrivener, then this is overkill for you and you can stop reading now. But if you want as much control as possible over the results without killing yourself, you might find this approach useful.

Originally I formatted my ebooks in raw HTML using tips from a variety of online recommendations, like Guido Henkel’s. The first book was a real learning curve for me, but after that it wasn’t difficult to just do the same for later books.  Automated search/replace macros took care of things like wrapping lines with <p></p> tags, and so forth.

I took the HTML output, opened it in Calibre, added the cover and converted it to EPUB using Calibre defaults (more or less). I did the same with a separate conversion to MOBI, which required me to maintain a different HTML file because of the way Calibre generates the MOBI TOC. These outputs were what I was uploading to the distributors. The MOBI files produced this way were not ideal, possibly because of AZW vs MOBI choices (in other words, me as a Calibre user, not necessarily Calibre as a tool), and I was left with two files to maintain (EPUB and MOBI) and the Smashwords EPUB as a third file, since my approach wasn’t modular.  So every time I found a typo…

Jaye has taught me a better way… (Sigil)

KM blog1KMblog2I poured my HTML file for a book, broken up into chapters, into a Sigil template.  Each part of my book has a separate file: Beginning Blurb, Title Page, Copyright Page, Also-By-This-Author Page, Small TOC, Chap 1… Chap Last, Guide & Name Index, If-You-Liked-This-Book Page, Excerpt-From-Next-Book Page, Author Bio Page, Long TOC.

KMblog3I have 3 outputs: MOBI, EPUB, Smashwords EPUB. The difference between Mobi and the two EPUBs is that the “stylesheet.css” file is a little different between MOBI and EPUB, and the Cover page is treated differently (EPUBs require an extra step). The difference between my EPUB and my Smashwords EPUB version is that the Copyright Page has different content.

Now, thinking in the long term, I expect that the differences between MOBI output and EPUB output are likely to be persistent, and other devices may come along and generate different optimum stylesheet requirements. So I’m fine with having two different (but very similar) stylesheets which I maintain externally and copy in as needed into the stylesheet.css shell.

Likewise, the fact that Smashwords requires its own ISBN means only that I maintain two different external Copyright Page HTML documents and copy the contents of whichever one I want into the shell in Sigil.

Both of these make use of a simple modular structure.

So, what happens when I finish a new book and want to format it?

PREP

  1. I copy the Sigil file (MOBI version) from the previous book and rename it.
  2. I create Copyright.HTML files for both the normal and Smashwords copyright pages by copying the ones for the last book, renaming them, and updating the content.
  3. I create a new Title page (it’s a graphic) and a new Cover.

KMblog4MAIN CONTENT (MOBI)

  1. I work on the MOBI version first (it’s the master). I copy the text in, chapter by chapter, the front blurb, and the back excerpt.  I run saved searches to wrap the lines with <p></p> tags and to convert special characters to named entities.
  2. I update the Also By and If You Like This book pages by hand.
  3. I run a saved search to update the Title field on all the HTML pages to the new work, and update the equivalent fields in the TOC.NCX and CONTENT.OPF files.
  4. If the book is a little longer or shorter (number of chapters) than the last one, I update the TOC.NCX and CONTENT.OPF files and the HTMLTOC file.
  5. I update the metadata in the TOC.NCX and CONTENT.OPF files. This allows me to do some things that either Calibre doesn’t, or I don’t know how to find, such as set a UUID (Unique User ID) for my short stories that don’t have ISBNs, embed book descriptions, add keywords, etc.  There’s a great tool for this that Jaye told me about:

bb ebooks meta-pad generator (courtesy of Paul Salvette, BB Ebooks Thailand)

KMblog5Run the file through Kindle Previewer (which runs Kindlegen) and check the results.

How much time does this take?  I just updated my entire backlist (3 novels, 5 short stories, 1 story collection) to Sigil–it takes me about an hour for a novel, and 20 minutes for a short story.  Making the short story collection from the already-formatted short story files was truly trivial.

EPUB VARIANT

  1. Substitute the content of the EPUB stylesheet into the stylesheet.css.
  2. Run the Sigil tool to insert the cover.  (Kindlegen does that a different way for MOBI).
  3. For the Smashwords variant, substitute the contents of the Smashwords copyright.html for the default one.

That’s it.  I import the files into Calibre for one last look to make sure they seem healthy, and do a quick scroll through on my EPUB reader. If I find typos, I fix them in the MOBI version (and the Scrivener original) and redo steps (10)-(12).

Why not use Calibre?  I am confused by the various options and clearly, for MOBI conversion, I wasn’t doing it quite right. Also, my original HTML file was one big file with a stylesheet and all chapters together, making modular changes clumsy. Calibre created its own version of the styles it found, and they weren’t always what I expected. It’s a big black box to me, and there were some issues with the results, which may be my fault, not Calibre’s.

Why not use Scrivener?  Like Calibre, you are at the mercy of whatever Scrivener decides to do to instantiate the different conversions. Since the Scrivener text isn’t in HTML, there are all the issues of named entity conversions to deal with, and you have little control over the default styles. The results may be clean, but you can’t do anything special, such as use graphic chapter heads, scene dividers, and so forth, at least not in the Windows version.  Perhaps there’s a way…

Other tools, like Scrivener, will take your word processor input and generate EPUB and MOBI output, but the black box in between what you write and what they produce leaves you at the mercy of the limitations of others, and so your output will remain at best functional vanilla. That’s not a bad thing, but we can do better.

It’s really not that hard to go through the learning curve once.  After that, each new book becomes quite easy.  Your book designers or people like Jaye can help you get started by setting up the first one and explaining how it works.

_____________________________

Jaye again. Thank you, Karen. Now I’d like to add a word about Sigil.

Sigil creates EPUB files. Kindle ebooks are MOBI files converted from EPUB files. So, you can take an EPUB file created in Sigil and convert it with KindleGen into a MOBI file that will work on Kindles.

There’s a gotcha–One size does NOT fit all. EPUB and MOBI handle styling differently. They handle covers differently. If you know what the differences are, you can use Sigil to create ebooks that work exactly how they are supposed to, on EPUB and Mobi. You can control how the devices handle your work, as opposed to being at the mercy of whatever the conversion program decides is best.

I have a special offer for readers of this blog. If you are really serious about creating ebooks that work properly across devices, and you are ready to climb the next step on the learning curve, go buy Paul Salvette’s The Ebook Design and Development Guide. It might freak you out the way it freaked me out when I first read it (I have zero programming experience). If it does, but you’re still motivated, send me an email (jayewmanus at gmail dot com) with a screenshot of your receipt for Paul’s book and I’ll set you up with a template similar to the one I made for Karen.