Formatting your ebook

It’s taken me a long time to get round to writing this post, because it is complicated and I want to make sure that I get it just right for everybody. When I had finished my novel Only the Innocent, I wanted to get it uploaded as quickly as possible – but I also wanted it to look good. I read so many bits of advice all over the web, and much of it was conflicting. But in the end, I managed to pull some different strands together that worked for me.

So in this post, and possibly one or two more to follow (as this takes some explaining) I will explain which bits of advice I used, which I rejected (and why) and my ultimate conclusion. I really hope this helps.

The simple approach – using your Word file!

Just a note about Word files to start with. I believe that if all you need from your formatting is a completely straightforward, every paragraph the same (except chapter headings) novel, then you only need to follow the advice for Getting the Word file right. This is consistent in all the style guides – Smashwords, Kindle and any others that I have read. I am going to include the basics here purely because it makes sense to have everything in one place, but you can get this advice from both of these sites. I think that the Smashwords guidelines are clearer, but I would read them both.

I should point out at this stage that whichever format you are ultimately going to create, the core code for any ereader will be HTML, and Microsoft Word really does put a lot of rubbish into your file. So if you want it to be perfectly formatted with no glitches, you probably need to go the extra mile. Particularly if you are like me and you actually want your book to look like something that has come from a professional publisher. For example, you will probably want to make sure that your first paragraph is NOT indented, but all the others are. Look at any published novel (well – any that I have seen anyway) and you will find that the first paragraph isn’t indented, but all subsequent paragraphs are. Publishers have followed this style through to their ebooks, and so that is what I decided to do.

I had an added complication in that my book contains letters sent from one character to another and I wanted these to look different, so that the reader doesn’t get confused about past and present action. So I wanted these to be left justified (no indent) with a space between paragraphs. And to make matters even worse, there are sections of the book that relate to something else which is going on – and these brief sections are all in italics. So I had a few formatting issues to deal with.

However, whichever way you decide to go – the first thing is to get the Word file right. Then the level of complexity that you decide to follow will be up to you – bearing in mind that even if you produce the most stunning epub in the world, Smashwords won’t take it. They will only take a Word file. So let’s start with doing the best we can with that. Getting the Word file right The most important question – have you been using STYLES in your word document? Any time you produce a document in word, it is always sensible to use styles to get your indents looking right, your font the right size and the line spacing correct. Here are some basic rules :

  1. Never use the tab key or the space bar to indent a paragraph – use styles
  2. Never press the ENTER key to signify the end of a LINE. It should only signify the end of a PARAGRAPH. If you have done this, other than for poetry, there is a solution which look a little strange, but it does the job as you will see below.
  3. Never press ENTER twice at the end of a paragraph. You can create space between your paragraphs automatically.
  4. Don’t individually style each heading with bold and a different font size. You will get confused! Use a global heading style.
  5. Whatever you ultimately want to call them, I would initially call all chapters CHAPTER plus the number, the word, any name you want. This will make it much easier to find each new chapter and add style to it later in the process. You can then remove the word if you want to.

So let’s assume you have used the tab key at the beginning of your paragraphs. How are we going to solve that one?

The first thing that you need to do is back up your manuscript.

Keep a copy as it is now, and don’t touch it. This means that as a worst case, you can always go back to this version.

The next thing you are going to do is stop Word from auto formatting as you type. The option you need to find (depending on your version of Word) is likely to be called something like Automatic Correction Tools. It’s difficult for me to be precise partly because of the difference between versions, and partly because my computer is an Italian one – so I can’t translate literally. When you go into this section, you need to switch off all automatic correction with the exception of the replacing of quotes, which you should leave ticked.

Now switch on the format symbols within Word. It all depends which version of Word you are using, but typically you will see a menu option marked with the paragraph marker ¶. When you click this, you will see any tabs as arrows, spaces as dots between words, and paragraph markers like the one above.

The first thing we are going to do is get rid of any formatting that you don’t want. Then we’ll replace it all – so don’t worry.

First, we’ll get rid of tabs. Open the Find and Replace window in word, and in the FIND section, type ^t which is the tab symbol. Alternatively, you can go to the special characters option at the bottom of the find window and choose the tabulation marker from there. Put your cursor in the REPLACE box, and press backspace to make sure that there is absolutely nothing in this box at all – not even a space. Then select substitute all. All of your tabs will now have disappeared.

Next, we want to get rid of excessive spaces – for example, if you have pressed the space bar a few times to indent your work. The question is, do you know how many presses? Was it consistent? If it was, go back to the find and replace box. In the find, press the space bar for the required number of spaces. You won’t see anything, but it’s there! Then go to the replace box, and make sure this box is completely void. Replace all. If you haven’t been consistent with the number of spaces, you can do something else. You can search for every use of a double space, and replace it with a single space. I would recommend doing this anyway, because I was taught to always put two spaces after a full stop when typing. That is no longer considered acceptable, but I often do it automatically, so I always run this through.

If you have used the space bar to position headings, you may have to run this through several times. For example, if you have used four spaces, the first time you run through the find and replace you will replace two spaces with one – and this will happen twice (ie 4 spaces = 2 lots of 2). So you will end up with two spaces (each double space has been replaced with a single). When you run it again, those two spaces become one. Ultimately you will end up with one space where in fact you don’t want any at all. So how are you going to get rid of that odd space? Back to search and replace. Now you need to be sure that your search and replace boxes are completely empty, using the delete key. Insert ^p which is the paragraph marker, followed by a space in the find, and just put ^p in the replace. Your leading space at the beginning of a paragraph or for a title will now have gone.

So that’s tabs and spaces taken care of.

What about those of you who have put a RETURN or ENTER) at the end of a line, rather than the end of a paragraph? I find it hard to believe that people still do this, but it’s a possibility, so we need to deal with it. Of course, if you have poetry or some specially formatted areas, this might be necessary. If that’s the case, you can ignore this next bit of advice.

This section is ONLY for people who have used return at the end of a line as well as the end of a paragraph.

If you have pressed return at the end of each line and also at the end of each paragraph, you need to keep all of those markers that actually signify the end of a paragraph, but lose all those that mark the end of a line. It sounds complicated, but it isn’t.

First, we need to mark up all the double paragraph markers and retain those for now. This will allow us to get rid of the single ones that just mark the end of a line. To do this, we are going to replace the current double paragraph markers with a sequence of characters that is unlikely to appear anywhere else in your document. So, go to Find and Replace. Enter two paragraph markers in the FIND section (making sure that you have an empty box first) – you can either type ^p^p or make a selection from the special characters box. We are going to replace this by typing £££ in the REPLACE box (unless for some reason you have used three pound signs elsewhere in your manuscript! If you have, choose another 3 characters). Click replace all.

Now you can get rid of all the other paragraph markers which are marking the end of lines. Go to find and replace, enter ^p and in the replace box, make sure it’s empty. Click to replace all. Now you will have one pretty solid looking piece of text, with no paragraphs shown, but a load of £££ signs in your document. Go back to find and replace, and Find £££ and replace with ^p. You will now have no paragraph markers at the end of LINES, but you will have paragraph markers at the end of paragraphs.

If you have used double returns at the end of a paragraph (ie you can see two paragraph markers) but you’ve not pressed Return (Enter) at the end of each line, then we can get rid of the double returns and replace them with a single – which is what we need for the final formatting. Just go back to find and replace, make sure both boxes are empty of spaces, and put ^p^p in the Find box, and ^p in the replace box. All double returns are now replaced with single returns.

If in some places you have used more returns (say, before a new Chapter) you can run this through several times – but it will eventually leave you with a single return before a chapter heading. Depending how you’ve handled page breaks, this can be fixed.

This can be fixed too. What we need to know is whether you have manually inserted a page break before each Chapter heading. If you haven’t and there are no page breaks in your document, you don’t need to worry about this. The problem will go away when we style the pages.

If you have manually inserted page breaks before your chapters and then pressed RETURN several times to insert extra space, you will now only have one space and a page break. We do actually want to get rid of the page break, because we’re going to include that in the styles.

So for those of you who just have a page break, go back to find and replace, type ^mChapter in the FIND box, and make sure the REPLACE box is completely empty, then type in Chapter. The page breaks before chapter headings will disappear.

If you have inserted paragraph spaces and despite the cleaning up operation you have just done, you still have one before each chapter, you need to insert ^m^pChapter in the FIND box, and just Chapter in the REPLACE box.

Now all unnecessary and incorrect formatting is gone. For the next post, we will add back the styles, so that your document begins to look like a manuscript again!

I am happy to have any feedback that might improve this post – we are going to move onto the styling, and also then onto some basic HTML for those who are a bit more adventurous. Ultimately, we will talk about using tools such as Sigil and Calibre – but that’s a way down the line yet!