Managing File Sizes for Ebooks

The majority of fiction writer/publishers will not run into overall file size problems. Text doesn’t create monster files. Using graphics or illustrations can add significantly to the overall file size, but I’ve yet to create an ebook that exceeds –or even comes close to–Amazon’s 50MB limit (which may be changing due to the introduction of the new Fire HD tablets). Even with illustrations and graphics, I do my best to keep the overall file size under 5MB because of Amazon’s delivery fees ($.15 per MB). Those fees are charged against the publisher and can eat up royalties quickly.

As I said, most fiction writer/publishers will not run into problems with overall file size.

Where fiction writer/publishers do run into problems are with the size of individual chapter files within the ebook. When you use <h1> or <h2> tags in html, or the Heading 1 or Heading 2 style in a word processor, you are alerting the conversion programs (such as Calibre or KindleGen) that this is a new chapter and should be split into a new file.* If you don’t use the headings or tags, the conversion programs look for certain words–Chapter, Part, Section, etc.–to determine where the file should be split. What is NOT reliable at all is using page breaks (in a word processor) or the “page-break-before” command in html/CSS. (I have absolutely no idea why those work sometimes, but sometimes they don’t–my best guess is the whims or moods of the Digital God.)

I always split html (text) files into chapters or parts, which manages the overall ebook very nicely. Even though this example is from a novel (Prophet of Paradise by J. Harris Anderson) that is almost 200,000 words long, notice the size of the individual chapters:

File Size

What happens if you don’t use tags or headings and your chapters have titles the conversion programs don’t recognize? What happens if you don’t have chapters at all and your ebook is deliberately one long tract? If it runs up against the 300KB file size limit (approximately 45,000 words), several things could happen:

  • Your file fails to convert
  • The conversion program inserts page breaks whether they are appropriate or not
  • The file converts, but some devices tell the user the ebook can’t be loaded

If your files are less than 300KB, but still largish (over 150KB) your readers could experience serious screen lag as they page through your story. This is an important consideration for genre fiction writers since the chances are your readers are Super-Readers and might have hundreds or even thousands of ebooks loaded on their devices. They will not be happy if your file sizes and their addiction cause several seconds of lag every time they “turn” the page.

What to do?

  • If you are using a word processor to style your ebooks, use the Heading 1 and Heading 2 styles for your chapters, parts and sections. (Do NOT depend on the conversion programs to recognize your inserted page breaks!)
  • If you are styling in html, use the <h1> and <h2> tags.
  • If your project does not have natural breaks such as chapters or parts (it’s long short story or novella) consider a minor restructure. Use the page count as your guide and try to find natural breaks around the 15,000 word mark–a scene break or time or pov shift or even an illustration that sits on its own “page”.

* If you are using Calibre to convert your ebooks, you can check the file splits in Calibre’s EPUB editor. You’ll see the list of individual text/html files and can open each one on the viewer/edit screen. If you are experiencing inappropriate page breaks, you can manage the fixes in the editor.

 

 

When You Are Your Own Publisher

quinnbookI get a lot of emails from people who are just starting out with self-publishing. For the most part I enjoy the conversations. Self-publishing isn’t all that difficult to do, but there is so much information available, so many options, it can be confusing as hell. I like to think I’ve set a few folks on a path that lessens the confusion and takes some of the mystery out of the process.

What I don’t enjoy are the emails that sound fueled by panic. I fear for the panicky folks–fear sets them up to be taken advantage of by overpriced “services” and vanity presses. These folks are easily led to believe that ebook conversion is too hard for less-than-technical geniuses and that distributing ebooks is worth an upfront fee and annual charges on top of retailer commissions. They are desperate for someone to take care of them–and taken they do get.

By emailing me, I can usually steer them away from the predators. Assuaging their fears is more difficult. Especially when they’re prefaced by, “What’s the RIGHT way to do this…?”

The subtext is, “I am terrified of not doing this perfectly and so I need someone else to take responsibility.”

I’ve yet to see a perfect book–and I’ve read thousands. I’ve yet to see a perfect publisher. But that’s okay. Readers aren’t looking for perfection. They’re looking for entertainment and information and education. Publishers–self or otherwise–have a duty to those readers to give them the best value in exchange for their time and money. That doesn’t have to be perfect.

So let’s talk about the reality. When you are your own publisher, you’re in charge. Period. The book is yours. YOU decide how it is written. YOU decide how much editing is required. YOU decide on the packaging and formatting. YOU decide how much to charge and where and how to distribute. YOU broker deals for rights and editions and exclusivity or not.

When you are in charge, you make your own rules. Your contract is with your readers. Those are people you need to satisfy. Or not. Your choice.

Being in charge also requires some courage and conviction. If you’re in a panicky state of mind, it’s difficult, if not impossible, to have either. You also need to be able to tolerate some mistakes. Everybody makes them–you’re no exception. The trouble with panic is that any decision you make will end up being made for the wrong reason and so it will probably be a mistake and there, your worst fears realized.

How does one get over the fear? First and foremost is realizing that with the great responsibility of self-publishing also comes almost unlimited freedom. Part of that freedom involves “do-overs.” If you screw something up–the editing, the cover, the distribution, the price–do it over and do it better. You don’t get that luxury if you turn your responsibilities over to someone else. It’s been my experience that anyone who’s motivated to get better, will get better with time and effort. So whenever the rising panic tells you, “Perfection or die!” shut it down by reminding yourself that you are doing your best this time and next time you’ll do it even better.

Next, and this is really important, find mentors. There are many, many successful self-publishers all over the internet. They blog, they tweet, they facebook, and many engage with readers. Their books are widely available. You don’t have to talk to them directly in order to learn. Read, observe, try some of their methods to find out what works for you. Look for positive messages and genuine success stories.

Find good examples. If you want to self-publish, you need to know what readers like. You need to develop a vision for yourself and your work. Read, browse, collect samples. It’s very empowering when you’re ready to produce a cover if you have a collection of designs that you think are effective. Or you can tell your formatter, “I like the way this book is laid out, do mine with a similar design.”

Build a tribe. Panic is isolating. Fear thinks it is unique. That’s a lie. So make an effort to put yourself out there to find like-minded folks. It might take a while, but you’ll find people who’ve made mistakes and survived to tell the tale. You’ll find helpers and people you can help.

I’ll leave you with a little list of things about self-publishing that I know are true:

  • Everybody has an opinion, but nobody knows everything.
  • Your book matters, but it’s not the most important thing in the Universe, so worlds will not collide if you muck something up.
  • There is no ONE RIGHT WAY to do anything. Find what works for you.
  • Shit happens. Deal with it.
  • Anyone who promises you the moon is staring at your wallet and wondering how much they can take you for.
  • The only people you need to satisfy are your readers–everyone else is just noise, noise, noise. So get your priorities straight.

Hi ho, hi ho, back to work I go…

 

 

Fun With Ebook Formatting: Make a Little List

Did you know that most ereaders handle lists quite nicely? Here are some screenshots from a Kindle Paperwhite of one of my projects:

List1

List2Tidy, eh? The best thing is, lists are very easy to do with css and html.

List3There are two types of lists: Ordered and Unordered. Ordered lists use numbers or letters to mark list items; Unordered lists use symbols such as bullets. The html tags: <ol> for ordered lists; <ul> for unordered lists; <li> for list entries.

List5For some reason ebooks don’t care for type declarations in the html. The EPUB validator issues klaxon call warnings about that. I have found best practice is to declare the styles in the css stylesheet then assign classes.

Styling in css:

List6You can have fun with lists, too. Lists can be nested–perfect for complex Tables of Contents. And take a look at the screenshot where it says Add a Fancy Symbol. The fast and simple way is to make an unordered list with a style declaration of “none” and then insert a named entity (in this case, the right arrow).

List4You can tart up your lists with circles, squares, Roman numerals, and even images. To learn more, the w3schools site has all the information you need. For list type properties, go here. Just keep in mind that ebooks don’t like the “type” declaration, so use either “class” or “style.”

Have fun!

 

Soft Hyphens for Kindle Books

I don’t care for automatic hyphenation in ebooks. The devices are pretty dumb and because they use an algorithm instead of an English major’s sensibilities, we get words like “mi- nute” instead of “min-ute” or “alt-hough” instead of “al-though.” While it is possible to turn on hyphenation for Kindle books, I’d rather not.

But. If a word has too many characters to fit on one line, this is what you get:

shy1Just like an oversized image, characters disappear off the screen. Because there are so many Kindle devices and apps, you have no idea what settings or screen size your reader might be using. Judicious use of soft hyphenation is an easy fix to an annoying problem.

Here is the same text, hyphenated, at various settings on the Kindle Previewer:

shy3shy4shy5What I did was use the named entity for a soft hyphen — &shy;

shy6The above example is a bit of overkill, but it was easy, so I did it. This way, no matter what preferences or screen size the user has, the text will not disappear off the screen.

If you’re building a non-fiction ebook, especially one with many long terms (technical or medical) inserting soft hyphens can prevent those unsightly gaps when a long word/term is jumped to the next page.

Have fun!

 

They Just Don’t Get It…

I tried to resist the fray, but sue me, I’m weak. So here goes.

gatekeeperHugh Howey and Anonymous X published their first report at authorearnings.com. I won’t go into the details (go read it for yourself), except to say I knew it would cause a shitstorm. To see one example, take a peek at the absurd rebuttal from Dear Author PG posted on The Passive Voice blog. All this comes on the heels of a sudden spate of self-publishing bashing by such luminaries as Steve Zacharius, Robert Gottlieb, Donald Maas and others. (Joe Konrath had a great run fisking their foolishness over on his blog. One example where he fisks Mike Shatzkin.)

As interesting as it all is, I’ve noticed a whole lot of “missing the point” going on.

It’s really not about the money.

Oh sure, money is a measure, an easy way to calculate one’s progress. Money is very nice and pays the bills. But every real writer I’ve ever met (and by real, I mean the passionate, even hypergraphic wordsmiths and storytellers who love nothing more than bringing mere words to life) will write and tell stories even there is no money in it. Their real goal is not money, but readers. Because without readers a piece of writing is incomplete. It exists, it is tangible, but without readers it is dancing on an empty stage in a closed theater or singing in the shower. Readers complete the connection.

Publishing houses know this impulse, this hunger. They know writers will endure almost any abuse in order to be read. For a long, long time they were the only game in town and it was their way or the highway.

Self-publishing is nothing new. Anyone with the bucks to pay for it could get their work printed and bound. But what the individual could not do on any scale was find readers. The publishing houses had a lock on distribution. While a bookstore might carry self-published hiking guides or cookbooks from local authors, they wouldn’t touch a self-published novel. Self-publishers were reduced to hand selling every copy. Unless one were selling books via seminars or workshops, there was no feasible way for the self-publisher to connect with readers.

Because the publishers had so much power, they (of course) abused it. Ever seen a publishing contract? It’s ugly and from what I understand, they are getting uglier. Want to know if your publisher is paying all your royalties? Be prepared to pay a CPA and sign a non-disclosure statement. Want input on your cover, editorial, marketing, distribution, pricing and scheduling? Find another job.

Writers endured it because they had no choice. Because they had no choice, writers were afraid. “The publishing world is small, all those agents and editors talk, so don’t make waves! Don’t piss anyone off! Watch out, if you complain, you’ll get blacklisted!” In public writers LOVED their publishers. In private, in hushed conversations, they shared horror stories. You don’t know pain until a publisher has botched your book–and there is not a damned thing you can do about it. Except take the blame for the lousy sales, that is.

Then there’s the soul-crushing despair that the cycle of submission and rejection can cause. On one hand it’s a badge of honor to be able to say you endured the lengthy response times and form rejections before some agent or editor recognized your brilliance. On the other hand it’s humiliating. Even more so when I see all the nasty mockery and snark by agents and editors all over the net. It’s as if they enjoy humiliating writers. Many probably do. That they would show such disdain publicly says a lot about the general attitude in the industry.

Then along comes Amazon and Smashwords and ebooks and something astonishing happens. Suddenly self-publishing is feasible. Hugh Howey’s Author Earnings data proves, without a doubt, that it is feasible. Self-publishing offers the means for any writer, anywhere, to find readers.

And that’s the real point.

Writers can find readers without the humiliations, the shitty contracts, the bad editorial, the lousy production values and high prices. They can do it without the condescending attitudes, disrespect and disregard. Writers can go with a publishing house if they want to. But if they don’t want to, they have the feasible option of self-publishing.

Judging by the sheer number of self-published works available to readers, a whole lot of writers don’t WANT to go with publishing houses.

The publishers have stood between writers and readers for so long they believe they are essential to the process. Thousands of writers and millions of readers are proving that not only are publishers non-essential, but in many cases they throw up unnecessary barriers and actively interfere with the connection between writers and readers.

Publishers are running scared. Fewer writers are demanding entry at the clubhouse door. Many couldn’t care less that the clubhouse even exists. My God, publishers and agents are being *gulp* rejected. Writers no longer fear being “blacklisted” and are talking openly in blogs and forums about publishers and contracts and money and all those other “forbidden” topics that publishers don’t want discussed. The feasibility of self-publishing has proved the trad publishers are non-essential–now they are running the risk of becoming non-entities.

That’s where the nastiness is coming from. This is what has reduced publishers and agents to act like that jerk in the bar who, upon being snubbed by a pretty girl, calls her a “fat lesbo who hates men.” Sorry, fella, she just hates you.

There are some things the traditional publishers are very good at and they have the infrastructure and connections and experience to do them exceptionally well. Unfortunately, for them, a lot of things they do well can also be done very well by the self-publisher. And, the self-publisher can do it faster and more cheaply. Doubly unfortunately, what publishers don’t do well at all is compete. They don’t like being reduced to “an option.” The days are over when they can sit back and wait for treasure to fall into their laps. The days are over when they can say, “My way or the highway,” because nowadays that highway is pretty damned tempting.

This little commentary of mine isn’t about “Us versus Them.” It’s not a declaration of war. As a reader I don’t give a damn who publishes the writers I like. I’ll discuss pros and cons of publishing options with any writer who asks–and there are pros and cons with all options. This is a reality check. My data might be all anecdotal (except for my dealings with multiple publishers and agents and the contracts I’ve signed), but it is twenty-plus years of anecdotes. I can read the signs. I can see with my own eyes what is going on. The question is, can you?

Creating a Professional Look for Ebooks

Can you spot an ebook produced by an amateur? I’m not talking about the writing–I’m talking about the interior production. Take a look at these side by side screenshots:

AmPro2 What about these?

AmPro1Take a good look and see if you can spot what I see.

Screenshot 1, upper left, self-published, amateur. I’m fairly certain the publisher converted a Word format. The story sounded interesting so I downloaded a sample. It looks like a manuscript and I knew it would trigger my Inner Editor and seriously affect my reading enjoyment, so I passed on buying the book.

Screenshot 2, upper right, trad-published, professional. The overall ebook is visually interesting, designed with the reader in mind. Purchased, read and enjoyed.

Screenshot 3, lower left, self-published, professional. One of my productions.

Screenshot 4, lower right, trad-published, amateur. Ugly and distracting. Purchased without sampling because this is one of my favorite authors, but I will definitely sample any other offerings from this publisher and if the next is as poorly done as this one, I’ll pass.

It drives me a little crazy when publishers put so much effort into ebook covers and give so little thought to the interior. I have never once heard a reader say, “Oh, I just loved the cover on Wendy Writer’s ebook, I think I will buy the next one.” Granted I’ve never heard one say, “Oh the formatting was so lovely, I think I’ll buy the next.” I have heard people say, “The sample was such a mess, I didn’t buy the book.” and “I wanted to like the book, but there were so many errors…” Worst of all, they say nothing, just refuse to buy another book by that particular publisher.

AmPro3Readers judge. When the ebook looks amateurish, they judge before they even start to read. They’ll be more aware of and less forgiving of typos. If the ebook makes any visual impression at all, it will probably be a bad one.

On the flip side, professionalism establishes trust. It sends a message to the reader: “You’re in good hands. Sit back, relax and enjoy.” Readers might not consciously recognize how much thought and effort you put into your formatting, but sub-consciously they will notice and it will have a favorable effect on their reading experience.

So how do you cross the line between amateur and pro? If you’re thinking about hiring someone, look at samples. (There are a lot of amateurs out there charging a lot of money for crappy formats.) If you are doing it yourself, start with

THE BASICS

  • Squeaky clean text.
  • Printer’s punctuation.
  • Proper paragraph spacing.
  • Proper paragraph indents.
  • Proofreading.

THE LAYOUT

  • Control your Front Matter (If potential readers have to page through 20 pages of front matter in the sample, you’ll probably lose the sale)
  • Always include a Table of Contents–and make it useful. If, by chance, your book’s ToC is a lengthy list of Chapter 1, Chapter 2, etc., come up with a way to shorten it or move it to the back.
  • Make your back matter work for you. Include an author bio, and links to other works and your blog/website.
  • Consider text ornaments or other visuals, especially if your story is long or the text is dense. This gives readers some eye relief.

THE CONVERSION

  • One Size Does NOT Fit All. A Kindle format is different than an EPUB format.
  • Use the right tools. (I know this will cause howls of outrage, but it’s the truth: To create a professional quality ebook using Word, you need some mad-monkey Word-fu skills. If you have those skills, then you’ll have no problem learning html, so why don’t you?)

snoringIf your ebook is already published and you know it’s not up to professional standards, do not be afraid to do it over. That’s the beauty of ebooks–fluidity. Amazon makes it easy to update files. Other distributors aren’t so user-friendly, but updates are still possible. Taking your already published ebook from amateur to professional won’t recover past lost sales, but it will help future sales. It will definitely help sales for your other works.

 

Why You Shouldn’t Format Your Word Docs

Dungeon babyThere’s a reason my ebooks are superior–two reasons, actually–and neither has anything to do with my technical prowess (I don’t have much) or talent (anyone can do what I’m about to tell you).

Reason Number One: Pre-production, I clean the text. As soon as a document comes up in the queue, I open it and start stripping it of everything that can mess up an ebook: extraneous paragraph returns, extra spaces, and tabs. I tidy up punctuation, tag areas that require special coding, neaten italics and check for special characters that won’t translate. As a writer and editor myself, I know most of the writer tricks and have a rather lengthy list of things to look for. By the time I’m ready to start coding, the text is so clean it squeaks.

Reason Number Two: Post-production, the ebook is proofread. I don’t care who proofreads the ebook. I can do it, the writer can do it, the writer can hire the job out to someone else. I give the writer a proof copy of the ebook and a mark-up document and encourage them to be as picky as they can stand. Even if they hire me to proofread, they still get the proof copy to load on a device or their computer so they can check the formatting and layout. The point is to find mistakes before the readers do. The point is to make sure the ebook works properly.

I am shocked and appalled that every single person who produces ebooks doesn’t do the exact same thing. They don’t and I know they don’t because I read ebooks that are filled with the types of errors and hiccups that text cleaning and proofreading would have rooted out.

The trad pubs are actually worse offenders than are indies, especially when it comes to back list. I can see it with my own eyes, but it’s amusing to see a publisher admit it publicly on The Passive Voice blog:

J.A. Our experience with Kindle is that as soon as a customer complains they take down the file and send the publisher a takedown notice. It’s actually a real pain in the neck. It could be one person complained and something very minor. We get them occasionally and we fix them right away. They give the reader a credit for the download. I should add that when files are converted they generally aren’t checked page for page like a print book might normally be. We rely on the conversion house to do a good job. If we keep catching errors or getting complaints we would change vendors. We pay pretty good money for these conversions. Our books are almost all straight text so conversions aren’t generally a major issue, but books with columns or charts, or unusual layouts do cause problems and need to be checked carefully. –Steven Zacharius, CEO, Kensington Books

Emphasis mine.

Having personally cleaned up well over a million words of scanned and OCR’d text, that statement offends the shit out of me. Writers deserve better. Readers deserve better.

So what’s that got to do with formatting Word docs? Everything.

If you’re a Do-It-Yourselfer, and are formatting your own ebooks, you cannot skip these steps. (On a sidenote, my biggest gripe with Smashwords is how difficult they make it to proofread an ebook. An upload has to go through the whole publishing process before you can look at it live on a device. Depending on how fast you are at proofreading, the ebook can be live–all goofs intact–for weeks before you can fix them and go through the process again.) My suggestion for the indie formatting Word docs for Smashwords (or any other distributor who accepts Word docs) is to convert them first with a program like Calibre and proofread the results. Find and fix problems before uploading the Word doc to Smashwords.

If you’re hiring a formatter, find out first if they clean up your file pre-production. Many do not. If that’s the case, you need to do the cleaning. Some pros charge by the hour to clean up the Word doc. The more elaborately you’ve formatted your document, the longer it will take to clean it up and the more expensive it will be. (Not to mention wasting your own time on needless work.) My suggestion, if you have special requirements, arrange for a system of tags to let the formatter know what you want. I ask writers to put instructions inside square brackets, i.e. [HEADLINE, PUT IN SMALL CAPS, CENTERED, EXTRA SPACE ABOVE AND BELOW].

Find out, too, the professional’s policy on proofreading. Do you get a proof copy? Does the formatter charge extra to input changes and corrections? (I charge for actual proofreading, but I don’t charge to input changes and corrections from somebody else’s proofread.) If you are not allowed to make post-production changes to your ebook, find another service. Trust me, no matter how well edited, cleaned and formatted the file is going in, you will find something to fix while proofreading. (Gremlins!)

So, for you writers working in Word, one final suggestion: Post the following where you can see it while you work and keep repeating it until it sinks in:

What I see on the computer screen is NOT how how my text will look, or act, in an ebook.

Buh-Bye, 2013–Howdy to the New Year

2013 was a helluva year. Lots of personal drama. Evacuated because of a fire, followed by months of malaise from the smoke because the entire state of Colorado was on fire. Massive rains and subsequent flooding that destroyed my basement. Far too many days spent at the hospital with my children and grandbaby. One thing after another and wondering, oh god, what’s next?

QuinnSeatBut 2013 was an amazing year, too. The Amazing Poop Machine is happy, healthy and growing fast. Everyone is healthy now. I got a promotion–Larry Block has dubbed me The Production Goddess. (I’m practicing how to work that into casual conversation.) I worked with some incredible writers this year: Thomas Pluck, Randall Wood, Jerrold Mundis, Julia R. Barrett, Robert Silverberg, Katherine O’Neal, William Arnold, Sharon Reamer, Carole Nomarhas, Chuck Dixon, Steven Ramirez, Penny Watson, Marina Bridges, and far too many others to list. (Heh. I always wanted a job where I am paid to read, and now I have it and it’s the best job ever!)

Burglar_Limited-XmasI took part in a project that tops my Best Of list for all time. Lawrence Block’s new novel, The Burglar Who Counted the Spoons, which he decided to self publish. From the first read of the manuscript to receiving the gorgeous hardcover limited edition in the mail, it was The Dream Job. I ended up producing four editions, including a print-on-demand Large Print edition. (You can find the ebook and trade paperback here and the special limited edition here.)

The best part of the year was learning new skills. I’ve learned tons and tons about ebook covers. (And bless you brave folks who have allowed me to do my on-the-job-training with your books!)

Cover montageI’ve learned to format fiction for CreateSpace print-on-demand editions. It’s way different than ebooks and a lot trickier, but it’s well worth the effort. (Pay no heed to the bald spots where I ripped out my hair in frustration. Heh.) At the risk of annoying the Hubris Gods, my book designs are pretty darned good.

pod montageIn the coming year, I’ll be stretching way beyond ebooks. I want to do concierge publishing for writers who’ve reclaimed their back lists and need to bring them back to life. I’d like to offer troubleshooting and production consulting for do-it-yourselfers. I can even do graphics for ebooks–wouldn’t your ebook look delicious with something fun like this for your chapter heads and title page?

titleSo buh-bye and sweet dreams to you, 2013. 2014 is here and it’s going to be a good one. I can feel it! And as a very special treat for all you writers out there, here it is, hot off the production line, available at CreateSpace, and soon available at Amazon and LB’s Book Store, the brand new print edition of Write For Your Life: The Home Seminar for Writers.

wfyl blog

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.

Word to Calibre to MOBI: Part 2: The html File

You finished Part 1 of this tutorial. Now on to Part 2. If you’re not familiar with html, what happens next is going to be freaky. But trust me, if you can copy/paste, you can do this.

NOTE: If your ebook is as simple as the one I’m using as an example, with no images and limited styles, you can stop right now and directly upload your Word file to Amazon. It will convert just fine and work well.

STEP 1: Do a Save As of your styled .doc file as an html file. It will look something like this:

CAL5Now you are done with Word.

STEP 2: Open your html file in Notepad++

Holy Moley! This is what it looks like?!?

CAL6CAL7STEP 3: Turn your special formatting tags into proper html tags

  • Italics <i> </i>
  • Bold <b> </b>
  • Underline <u> </u>

Easy to do with Find/Replace in Notepad++.

CAL8

Very important. ALL tags that are open must be closed. So if you have <i> for italics, then you must have </i> to close the tag. So use Find/Replace and make sure your numbers match up (Notepad++ will tell you how many items it replaced)

STEP 4 (Optional): Get rid of soft returns. Word has a nasty habit of inserting soft returns at the end of lines in paragraphs. In theory, they are meaningless. If you leave them in, they won’t affect your ebook very much. I have noticed, however, that they cause a wobbly quality to the justified text and some unusual behavior in line spacing. Not enough to affect reading quality, but enough to bug hyper-sensitive readers (like me). I prefer to remove them. If they bug you, too, let me know and I’ll show you how to use Find/Replace in Notepad++  to quickly remove them.

CAL9STEP 5: Get rid of the Section junk. If you styled your document the same way I did, you will have two lines of code–one at the beginning that says something like <div class=Section1> and a closing tag at the end of the document, </div>. They are extraneous. Delete them.

CAL11CAL10(by the way, if your Notepad++ file doesn’t look the same as mine, it’s because I have turned off word wrap and eliminated the extra soft returns)

STEP 6: Extract your styles. In my example there are three: MsoNormal, Center, and h1. Select them, copy them and paste them into a new text file.

This is what they look like. Comments in italics are mine.

h1
{mso-style-next:Normal; (Word junk, delete)
margin-top:48.0pt; (We are going to change this)
margin-right:0in;
margin-bottom:48.0pt;
margin-left:0in;
text-align:center;
page-break-before:always;
mso-pagination:none; (Word junk, delete)
mso-outline-level:1; (Word junk, Delete)
font-size:14.0pt; (We are going to change this)
mso-bidi-font-size:16.0pt; (Word junk, delete)
font-family:”Times New Roman”; (Delete)
mso-bidi-font-family:Arial; (Delete)
mso-font-kerning:0pt;} (Delete)

p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:””; (Junk, Delete)
margin:0in; (Delete)
margin-bottom:.0001pt; (Delete)
text-indent:.3in; (Change)
mso-pagination:none; (Delete)
font-size:12.0pt; (Delete)
font-family:”Times New Roman”; (Delete)
mso-fareast-font-family:”Times New Roman”;} (Delete)

p.Center, li.Center, div.Center
{mso-style-name:Center; (Delete)
margin-top:6.0pt; (Change)
margin-right:0in;
margin-bottom:6.0pt;
margin-left:0in;
text-align:center;
mso-pagination:none; (Delete)
font-size:12.0pt; (Delete)
font-family:”Times New Roman”; (Delete)
mso-fareast-font-family:”Times New Roman”;} (Delete)

STEP 7: Modify the styles. The coding in an ebook is actually quite simple. The major bits for your css stylesheet are as follows and most are self-explanatory:

  • margin /This is the margin for each paragraph block. This controls the top, bottom, right and left
  • text-indent /This is for paragraph indents
  • font-size /Kindle books render in either “ems” or percentages. Converters do their best to recognize points (pts) and inches, but results are iffy. That is why we’re going to change them.
  • font-style /For italics
  • font-weight /For bold

We are going to keep this very, very simple. Because there will be some coding for the body text, you don’t need much in these paragraph styles. Basically, we will whittle and adjust so they look like this (feel free to copy/paste these):

p.MsoNormal
{text-indent: 1.4em;}

h1
{margin: 2em 0;
text-indent: 0;
text-align:center;
page-break-before:always;
font-size: 1.4em;
font-weight: bold;}

p.Center
{margin: 0.5em 0;
text-indent: 0;
text-align:center;}

If you want to play with the styling, go to the w3schools website. To know what works in a Kindle book, you can look at their “approved” list (which often seems to change on a whim).

STEP 8: Replace the header. Copy the text that follows:

<?xml version=”1.0″ encoding=”UTF-8″ ?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&#8221; >
<html xmlns=”http://www.w3.org/1999/xhtml&#8221; xml:lang=”en” >
<head>
<meta http-equiv=”Content-Type” content=”application/xhtml+xml; charset=utf-8″ />
<title>BOOK TITLE</title>
<style>
/*===Reset===*/
html, body, div, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, acronym, address, code, del, dfn, img, ins, kbd, s, samp, small, strike, strong, sub, sup, tt, var, center, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video
{margin: 0; padding: 0; border: 0; font-size: 100%; vertical-align: baseline;}
body {text-align: justify; line-height: 120%;}

<!– Insert your paragraph styles here –>
</style>
</head>
<body>

Paste it in your file as follows:

CAL12New header and styles pasted in:

CAL14Step 9: In the menu bar in Notepad++ find Encoding and click it. In the drop down menu it will say: Convert to UTF-8 without BOM. Click that.

To see your styling live, in the menu bar you will see “Run.” Click it and in the drop down menu choose “Launch in (whatever browser you use)” Here is mine in Firefox:

CAL15See, that wasn’t so hard was it? Now you have a serviceable html file you can convert into an ebook. BUT, your job isn’t done quite yet. In Part 3 I’ll show you how to convert your file into a MOBI file that works.

_________________________________________

Styling ebooks isn’t difficult. Armed with only a few lines of code, you can create beautiful ebooks and some very interesting text effects. If anyone is having trouble getting their styles just right, feel free to email me–jayewmanus at gmail dot com–and I can probably come up with just the paragraph style you need.