How Not to Get Meatgrindered

I’ve heard a lot of complaints about the Smashwords ‘meatgrinder’ and the difficulty some people have had with it. I came to the self-publishing world from a web design background, but I figure the layperson might benefit from a simplified explanation. I have now published seven books through Smashwords without encountering a single formatting-related issue. Here’s how I did it.

An ebook is an HTML document. That’s all there is to it. It’s HTML, formatted and processed by whichever e-reader wants to display it. Here’s one of the simplest HTML documents in the world:

<!DOCTYPE html>

HTML uses tag pairs to define its content. In the example above, we have an opening declaration of <!DOCTYPE html> to tell our browser/e-reader that this is an HTML document. After that are three pairs of tags: html, head, and body. Each pair has an opening <> tag and a closing </> tag.

In your ebook, the text of your book goes between the <body> and the </body> tags. That’s everything from the opening title to the final word of your back matter. You could just shove it all in there as one big wall of text, but that isn’t going to look pretty.

The way we make our text look pretty is by using CSS. CSS is the icing to HTML’s cake. It works hand-in-hand with HTML to tell it how things should look and behave. The goal is a simple, clean ebook file with just our words, wrapped in HTML and styled by the necessary CSS.

Enter Microsoft Word.

If you format your ebook in Word and you don’t do it the right way, you’re going to end up with all kinds of extra markup that doesn’t need to be there. Word is good for its fair share of tasks, but it sucks when it comes to marking up HTML. That’s the major reason people have so many problems with the meatgrinder.

How to Format an Ebook Using Microsoft Word

NEVER format anything in your ebook by hand. That means NEVER use hard returns to create space between lines. NEVER bold or underline your titles one at a time.

Instead, use styles. In Word, there’s a big box on the HOME ribbon called ‘Styles’ where you can create a look for every single part of your ebook.

Do this.

Make a style for chapter titles. Make a style for the regular text within your book. Make one for your book title, make one for your front and back matter headers. Make one for the chapter listings in your table of contents. Make a style for everything. EVERYTHING. Using styles, you can specify whatever you want, from font size to font weight to margins, indents, line spacing, alignment, etc.

When you’re done making all those styles, apply them to the corresponding parts of your book. Remember that ‘Regular Text Paragraph’ style you made? Highlight your entire book and apply that style to it. Go through and highlight each chapter title in your book, then apply the ‘chapter title’ style to it.

Why are we going to all this trouble? Well, the first reason is because if you ever want to change the look of every chapter title in your book, all you have to do is change the style and it will update them all at once. No going through to highlight and change them all one at a time again. Once the style is applied, it’s there, and it can be changed.

Want to know the big secret of modern web development? That’s how CSS works, too. Think of a website like Reddit, with millions upon millions of pages. Do you think Reddit is going to pay its employees to change the look of every last thread title when they decide the site needs a facelift? No. That’s all done with CSS. There’s a CSS style somewhere that changes the look of thread titles all across the site. They change one style, all the thread titles change accordingly.

That’s the second reason we’re going to all this trouble: because these styles you’re creating in Word will become the CSS of your final book document. The icing on your HTML cake. Properly formatted cake looks good, doesn’t it? It also doesn’t get snagged in the meatgrinder. It’s cake. It shouldn’t have to worry about meatgrinders.

Converting Your (Expertly-Styled) Ebook

You want to know another crappy thing about Microsoft Word? Even after you’ve painstakingly styled your ebook, it’s STILL going to add a bunch of extra unnecessary crap into your HTML document. Fortunately, this is easy to fix.

Okay, so you’re all styled up and ready to go. Next, SAVE your Word document as type: Web Page, Filtered with a .htm file extension. We use the Web Page, Filtered setting rather than just the normal Web Page option because Word claims its filtering process strips out all the extra stuff and just keeps the content and styles. This is a lie. Do not believe Word when it tells you this. But save your document like this anyway.

Next, open your Word document in a text editor. I recommend Notepad++, but regular old Notepad will work fine.

Remember our plain old, basic HTML document from earlier? You’re going to see something that looks a lot more complicated here, but it really isn’t. You still have your three basic tags: html, head, and body. Inside the <body> tag is the contents of your book. Inside your <head> tag, another tag called <style> is nested. All your CSS is inside this <style> tag. A great deal of this CSS is unnecessary for the purposes of creating an ebook.

The first thing you need to do is check for what are called “inline styles” in your text. These are styles which, instead of being contained within the <style> section of your document’s <head>, are added to the text itself. Scan through the text of your book to see if any of these are present. They usually appear within normal HTML tags, and use the “style” attribute. They might look something like this:

<span style=’text-indent:.5in’>

Your text indent should’ve been defined using the styles you created above, remember? If one of these inline styles creeps up, it’s because you hit the TAB key to make your indent instead of making the indent part of your paragraph style. Essentially, if you find any of these inline styles at all, it means you didn’t apply a style correctly somewhere and Word had to make up for it. Go back into Word and correct the issue, then save out to HTML again before moving forward.

Once you’ve removed any inline styles from your text, go up to the <style> tag in the <head> of your document.

First things first: any font definitions can and should be removed. Fonts are not something you want to mess with in ebooks. There are so many different e-readers, you only risk causing yourself more problems when you lock yourself into a particular font (which not every e-reader is guaranteed to have). Take these font definitions out of your document. Delete them.

Next, you may see a bunch of styles called “Mso”-something or other. These are Microsoft Office styles. If you formatted everything in your ebook correctly, using ONLY the styles you created yourself, you DO NOT need any of this Mso junk cluttering up your document. Take them out.

You might also find basic header styles (h1, h2, h3, h4, h5, h6) defined in your CSS. Again, if you didn’t specifically use any of these to define the headings or titles in your book, you don’t need them. Take them out.

Finishing Up

In the end, the <style> section of your HTML document should contain ONLY the styles you created and applied back in Word. Cleaning up your document this way ensures that everything is in its proper place and you won’t end up with a bunch of impurities for the meatgrinder to take issue with.

One final step – currently, the meatgrinder only accepts .doc files. So once your HTML is clean, open it up in Word (yes, open your newly-scrubbed HTML document in the very application that dirtied it in the first place) and save it out as a Word 97-2003 Document (*.doc) for uploading to Smashwords. Don’t worry; as long as this is the only thing you do, Word isn’t going to add a bunch more uncalled-for crap to your document. That’s all there is to it. Upload the .doc and you should be fine.

I hope I’ve helped you surmount every obstacle on your path to published-ness. When done correctly, there is absolutely no reason a properly formatted book shouldn’t pass the test with flying colors.

Happy meatgrinding, folks.

Extra: Tips

A few things I didn’t mention above.

  • Don’t justify your text. A lot of e-readers will do that for you. Best practice is to left-align paragraph text and let the e-reader format accordingly.
  • I did mention this above, but it bears repeating. Don’t define fonts. You don’t need to, and you’re not doing yourself any favors by forcing people to use your preferred font face.
  • Don’t ever specify the color of your text. Even if it’s black. Some people like reading white text on a black background. If you specify black, the text will disappear when they change their background to black.
  • For advanced CSS/HTML users, size your text using EMs instead of pixels, points, or inches. EMs look better on any size screen, because EMs scale up or down in relation to one another, rather than using the predetermined sizes of other units of measurement. Pixels will still work, they just aren’t as flexible.

Leave a Reply

Your email address will not be published. Required fields are marked *

nineteen − 10 =