Thread: editing HTML
View Single Post
Old 01-23-2012, 10:24 AM   #7
Whackatagin
Tweaker
Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.
 
Whackatagin's Avatar
 
Posts: 102
Karma: 324366
Join Date: Jan 2012
Location: Scotland
Device: Kindle / KOBO / PC
A rough guide to getting from Word.doc to Mobi

Dennis,

I know it's been a while since you posted this, but from what you've said you are obviously stumbling into this ebook thing for the first time. Don't worry we all did at some point. Firstly, don't let all the jargon put you off. I have no idea how fuel injection systems work, but I can look at my engine and say "that's the fuel injection thingy", that's really all you need to know to get started in the ebook making world.

Here are a few tips to get you started.

You write in Word, that's good. A good tip is make sure you are absolutely finished with your prose before you go any further, because editing in epub format is a real pain if your not pretty familiar with xhtml. So tweak, proof and revise it to death before you go any further.

Now you have your word doc and you want to make an epub, this is simple.

1. Save your word document "save as" and select filtered html from the options. Note: remove all page breaks before you start, best to make a copy before you do this.

2. Download the very popular Sigil program and open your newly saved filtered HTML word doc.

3. You now have one big long "Chapter". I'm not going to go into style sheets here, but if you are intending to use one, simple is best, and now is the time to do it.

4. There is a button at the top of your Sigil screen that looks like a little brush, switch it off, if it's on. Above that there is a button to insert chapter breaks. If you have not inserted a cover, do so now at the very start. Put your cursor after the picture and hit the break button. You will see a new file has appeared on the left...whaterever.htm..this is your cover page. Now move on to the last letter of your title page, hit break. Last letter of copyright page, hit break. Last letter of your intro/prologue, hit break. Last letter of your first chapter, hit break. Keep going until you get to the end of your book. You can add end verso or other stuff later if you wish.

5. Now you will see you have a whole list of xhtml files, one for each of your TOC items. Down at the bottom of this list you have a generate TOC from headings button, press it. Now check the boxes of the items you want to appear in your TOC. When you close this window you will now have a TOC.ncx on your list. This will convert just fine to any format. You can also click on the ncx file and edit what apears on your TOC. Just now it will probably only say "Chapter one" for instance. Just put your cusor inbetween the two chevrons and you can edit the entry to, say, "Chapter 1: A Strange Affair" or whatever. This will now appear instantly in your TOC. Note: If you have no entries in the generate TOC list you need to go back and highlight each chapter heading and select H1 from the little drop down at the top left of your screen. Try again and the chapter names should be on the list.

6. We get a "Little " technical here now, but please bear with me. On the top row of your buttons in Sigil you have three icons for changing your view. The first looks like a book, the second a small book with Tag brackets. Hit the second one and you will open a code view of your current file. (Note: every chapter or section is now a seperate file.) Now there are two main things you want to look for in this code view that will scupper you later if you're going for a mobi final product. One is <br/> remove EVERY instance of this. If you want to have a paragraph break, insert <p>&nbsp;</p> in it's place. Watch out, these br tags can be hanging on the end of your paragraph sections. Note: blank lines mean nothing in code view, they are ignored. Just put the nbsp Tag in a new line between your paragraphs you want spaced. Note: Sigil has a good find and replace feature that will do most of the work for you, but you should still have a manual scan thru yourself, just to be sure. Next you want to remove any rogue Tags. Each paragraph should start <p class=MsoNormal> pargraph text in her.</p> That's it, nothing else. Chapter headings will be different they have H1 tags, coz there in your TOC. If you have a chapter title, it will most likely be H2. That's really all the html coding you need to know. Once you have a look and a play with it it will seem so simple. Remeber the "Fuel injection thingy" Piece of cake, how did it seem so hard before?

7. As far as code changing or manipulation goes, SIGIL is a WYSIWYG editor, i.e. If you change something on the code view and click on the actual view you will see the change or error immediately. I know it's a pain, but if you must make changes, it's best to do it in the code window. The view window will write what it thinks it should do and not always what you wanted to do. Play with it, in a copy file of course, it's fairly straight forward.

8. Once you have your book looking the way you want it, add metadata. Just click the button and type in what you want. Language En, Author's name, etc. Now your done. You have a basic, clean epub file that should convert without errors.

9.
Download Kovid's excellent Calibre program and import your epub. Click convert epub to mobi, Input default-output Kindle,"Look & Feel" tick left align, in the MOBI output section, click put TOC at start of book and hit "Go"

10. 50-60 seconds later you should have a nice clean mobi you can upload to your kindle, or indeed Amazon KDP. You can go back and tweak your epub as much as you want now and just re-run the conversion until it looks spiffing. Good tip: to avoid multiple copies in Calibre, each time you make a new change, go into windows explorer, c:/documents & settings/your login name/calibre and delete the folder with your previous revision. Now go back to step 8. Easy peasy, and no degree in code programming required.

Tip: If you want to edit your epub without going back to Sigil, right click the file in Calibre and choose "Tweak" this will unpack your epub and let you poke around inside each file with the basic notepad or wordpad programs, don't use Word.

Get some practice.

Make a copy of your ebook files and play with them. Winzip or winrar will let you unpack them and get at the goodies. If you're feeling a little more confident, download notepad++ for a more "Codey" view.

In conclusion, you don't need to know how to build an engine, just where the fuel and oil goes. And if your keen, how to do a service.

Good Luck, and happy self-publishing.

G:0)

Last edited by Whackatagin; 01-23-2012 at 11:43 AM.
Whackatagin is offline   Reply With Quote