E-Book Self-Publishing: Part 3

Note this was moved here as part of my HowToSelfPublishABook.org redesign.

Here is part 3 of J. Dane Tyler’s series. You can read Part 1 here, and Part 2 here. The original appeared on his whatnot blog, and appears here with his explicit permission.

If you get a minute, you should also go check out his produced ebooks:

All right, in this section of the tutorial – which, among us geek-types who like to learn on the interwebz is known as a “tute” – we’re going to have to dig, and worse still, script. *Shudder*

What you’ve done so far, if you’ve followed all my steps to the letter, is to take your Microsoft Word or OpenOffice Writer document, strip out all the formatting (and I do mean ALL the formatting), and now you’ve got it back into a nice, handy little HTML template suitable for you to transform into a .prc file which is DTP- and Kindle-friendly and allows you to check out your creation with the Amazon Kindle Previewer software.

So you’ve got an HTML document with no formatting. Now what?

Put back what you lost

You lost a lot. If you’re anything like me, you use a fair amount of italics to emphasize certain words in your manuscript. Don’t do that. As much as you can avoid it, you should. As a writer, you should have a strong enough voice to where that kind of thing is rare and well-placed in your document. But whatever the case, be you heavy-handed or light-touched on formatting, whatever you had, you’ve lost. It’s gone. There’s nothing there but a plain ol’ text document with a few paragraph tags now.

So, I’m going to tell you how to add back italics. This will go for any other inline sort of formatting you did too – bold face, underlining, strikethrough, whatever. As long as it isn’t a title or heading, a footer or a block quote, it’s probably inline and this is how you have to put the formatting back.

  • Open your word processing document, NOT the HTML document. The one with either the .doc(x) or .odf file extension. Open it with whatever the native word processor is.
  • Now, go to the Edit menu and choose “Find”.
  • Locate the special or format location features on the “Find” dialog box.

image

  • From the special formatting selections, locate the selection for “Font” and choose the font and the type of formatting to locate. For instance, in the image below, the Find dialog is set to locate Times New Roman 12 point italic font.

image

  • Once you click OK on the setup you can have Word (and presumably Writer) locate the  instances of italicized text in your manuscript. Presumably. I’ve never actually tried this, of course. Ahem.
  • When Word or Writer finds an instance of formatted text, you can locate it in your HTML document using the “Find” feature in either Notepad++ or your text editor (if it has one) to locate the same text in the HTML document.
  • When you’ve found the text to italicize, put an <em> before the text you want to italicize and a </em> after it. Note those differences! The one without the slash is called a start tag, and the one with the slash (and it’s a forward slash, leaning from lower left to upper right) is called an end tag. You need BOTH, or everything AFTER the <em> tag will be italicized in your manuscript. BE CAREFUL!
  • Okay, finished with that? Great! Now go back and do it for every other type of formatting you did.
  • Did you manage to use drop caps in your document? Well, while HTML and CSS (that’s Cascading Style Sheets to you an’ me) might be able to replicate that for you, the Kindle doesn’t show it. If you HAVE to use that technique, you have to make the initial cap a larger font face than the rest of the text. I kid you not, that’s the work-around.
  • Save your HTML document after EVERY CHANGE and check your progress by opening it in the web browser of choice for you. EVERY. CHANGE. NO. EXCEPTIONS.
  • Close the word processor document when you’re finished.

Now for the Rest of It

Okay, with that done, let’s go back and add your book title, chapter headings and any other subheadings you might like to add. Remember your book is going to need “front matter” too – this is the copyright statement at the beginning of the book, and you’re going to want a table of contents in there if you’re doing a book with, say, multiple stories. You know … like my eBook, f’rinstance.

So let’s format the title. First, you want to open the manuscript in Notepad++. If you’ve installed N++, you probably noticed it asked you if you wanted to add it as an option to your context menu. I find this extremely handy for this part. I right-click the HTML file and click on the Notepad++ option in the quick-menu that comes up. Bada-bing, it’s open in N++ ready to edit. It should automatically be opened with HTML as the language selected too.

When you copied everything from the KompoZer screen and pasted it into the <body> section of your HTML document, it presumably brought over the title and other information you had there as well. I, personally, leave all that out until it’s time to do this portion, but if it’s there, that’s fine too.

Find the book title if it’s there. In front of the first word (i.e., to the left in English-speaking, right-to-left reading countries), type the code <h1>. Note the angle brackets. That’s mandatory on all HTML code and you must use it with everything you do in HTML. This puts the Heading 1 or top-level heading format on the title. If you look at your nifty little template, you’ll see I did a tiny bit of CSS scripting for you. What happens to your title is, it becomes all uppercase, 24-point bold-face font and is centered on the document. When you save and reload the HTML document into your web browser, you’ll see this happen. Cool, no?

Now, after the last word of the title, put the end tag for the Heading 1 formatting, </h1>. This makes sure ALL the text in your manuscript isn’t transformed to a level-one heading.

There’s more. If you have a subtitle, you can use an h2-format heading by putting <h2> in front of the subtitle and an </h2> end tag after it. I have a special format set up for the author’s name too.

So find your name. The part where it says “by You” or whatever. And in front of that line, put <p class=”auth”>. Then, after your name, i.e., where you want the formatting to end, type </p>. Save your document, reload in the browser, check it out, be impressed.

Now, you can place your copyright front matter. Copy and paste it if it’s not in place, and if it is, put <p class="ctr"> in front of it and </p> at the end of it. And your front matter will be nicely centered on the screen for you. Voila! You’re finished with the front matter formatting.

A word about Amazon and Smashwords front matter – be especially careful not to include a statement like “printed in …” with your country of origin. It is NOT a printed book and this statement is meaningless. It will probably get you kicked off of Smashwords.com. Amazon doesn’t like it either. They both have very particular standards about their front matter, so research it carefully before you put one in place.

For my hierarchy of headings, I use this guide:

  1. H1 headings: Book title only.
  2. H2 headings: Story or chapter titles.
  3. H3 headings: Section titles or chapters within shorter works included in anthology.

I don’t go below level three for myself. You can go down to H6, it’s up to you.

Locate your chapter divisions and make sure they are formatted correctly.

Now, let’s discuss the pages.

Pagination in HTML

There isn’t any. None. Zero. Here’s what you have to remember: this is one long document. On a web page, each page is a separate document. In a Kindle, that’s not possible, each eBook is all one document. But there are tricks you can use to keep some page breaks in place.

Microsoft Word creates this neat piece of code when I convert the document to an HTML file.

<br clear=all style=’mso-special-character:line-break;page-break-before:
always’>

Now, I’m not sure what, if any, of that gobbledygook is of use to the browser, but I know I can create page breaks so that each story starts on a new page and each chapter does too, if you’re so inclined. But the idea is free-flowing text without margins and bottoms and tops. The Kindle likes this best and even does some formatting for us, all by its little lonesome.

The problem is that little ‘mso-special-character:’ part. The one I used on my hand-made book was similar, but cleaner:

<br clear=all style=’page-break-before:always’>

Much simpler, yes? And no ‘mso-’ specific formatting, which is bad juju.

Table of Contents Crafting

Crafting a good, working table of contents isn’t easy. It’s pain-staking, in fact, and you can’t just let your word processor do it for you. At least, Smashwords hated that. So you have to build them by hand.

  1. Open the HTML document in Notepad++ if it’s not already.

  2. For each story or chapter (I’m going to call them chapters to save a little typing from here on out), you create an entry on a Table of Contents page. So, I put in a page break right after my front matter and dedication, if any.

  3. At the top of the page type “Table of Contents” and apply an h2 formatting.

  4. In the body of the page, add the name of the chapter, such as “Chapter One” or “Chapter 32” or whatever.

  5. In front of each one, type the following code: <a href="#ChapterNum">. For “ChapterNum, of course, you use the actual digit. Or name, if you’re going with named chapters. At end of the chapter name, you type </a>. So, a complete entry is <a href="#Chapter01">Chapter 01</a>. And see the pound sign/hash mark/tic-tac-toe/whatever you want to call it thingy? That’s required before the chapter name or number. Won’t work without it.

  6. Save your HTML document, but don’t bother loading into the browser yet; we’re only half finished with the ToC.

All right, what you just did is create a bunch of anchor tags, or hyperlinks, which we now have to assign targets for. You can click ‘em now, but nothing’s going to happen because they have no destinations to connect to. So let’s give them the targets.

“Target” is where the links take you. So, let’s finish them off.

  1. Open the HTML document in Notepad++ if you closed it.

  2. Go to the first chapter title in your book after the ToC. Chapter 01 or Prologue or whatever you called it.

  3. Before the chapter title and either INSIDE or OUTSIDE the heading format tags (doesn’t matter), type the following tag: <a name="ChapterNum">. The ChapterNum is replaced with whatever you named your chapter and it must PRECISELY AND EXACTLY MATCH WHAT YOU TYPED IN THE TOC LINK. Otherwise, the link will not work, period. BE CAREFUL! So, a full entry would be: <a name="Chapter01">Chapter 01</a>.

  4. Do this for all the chapters in your book. You can use the find and replace feature and just type in specific numbers if you want, but for named chapters or story anthologies like mine, this is a manual process.

  5. Save the HTML document when you’re finished. Make SURE you get them all.

  6. Open your HTML document in the browser and test each and every link. Every. One. No. Exceptions. Test. Re-test. Test again, then do it all over again. Close it, open it, save it, then test test test testtesttest! Test it, over and over! Get it?

  7. Do they work? If yes, GREAT JOB! If not, don’t be bummed out. It’s probably a typo somewhere, and will be easy to fix. (Yeah, right.)

Okay, this is a lot. A LOT. But don’t worry, the hard part’s over. Now we have a hyperlinked, well-formatted HTML document and we can run it through a couple of crunches and get a new file type. We’re almost there!

Oh, and a cover image. We need a good cover image. We’ll talk about all those things next time.

Have fun, gang!

E-Book Self Publishing: Part 2

note: This was moved here as part of my HowToSelfPublishABook.org redesign

Here is part 2 of J. Dane Tyler’s series. You can read Part 1 here. The original appeared on his whatnot blog, and appears here with his explicit permission.

If you get a minute, you should also go check out his produced ebooks:

Welcome back, fellow eBooklets! …0r whatever we are. Today’s segment of my eBook publishing tutorial gets into the file conversion part of the process, which can be fun or really aggravating depending on your skill, patience and how well you follow instructions.

Let’s get to it then.

Open the File in the Word Processor

First, open the story or manuscript you’re going to convert in Microsoft Word or whatever word processor you’re using. If you’ve created a plain text file, you can skip this step and go on to the next portion of the tutorial. We’ll catch up.

Once the file’s open, you want to create an HTML file from your story which will be manipulated elsewhere. So go to the Save As feature of your chosen word processor and in the file type designator box, choose “HTML” for the file type.

image

Now save your story as an HTML document. When it’s finished, open your file explorer – My Computer or Windows Explorer for Windows; you weirdos using stuff other than Windows are on your own again.

The file should be named something you can easily recognize and remember. It will have an .htm or .html extension wherever you saved it. Now navigate to it with Windows Explorer.

Check Out the Ugliness

This is an optional step, but it gives you some idea of how bad word processing software is at generating good HTML code.

When  you’re finished, you can open the file with your brand-spankin’ new Notepad++ text editor. If you didn’t download it, shame on you, lazy-butt. Open it in whatever plain-text editor you want. Not a word processor, though; that’s critical. If you DID download Notepad++, make sure you select HTML under the Language menu.

With the HTML version open in your text editor screen, you’re going to see a LOT of code you didn’t know was there. Matter of fact, it’s gonna be a hot mess.

image

Yikes! Look at that!

But don’t despair! We can get rid of almost all of that gobbledygook and clean this up jiffy-quick.

Cleaning It Up

Okay, now we’re going to clean up the HTML from this thing properly.

  1. Open the file in its native software again – Word, Writer, whatever it was.
  2. Hold the Ctrl key and press the A key (Ctrtl + A) to select all the text in your file.
  3. Copy the text (Ctrl + C).
  4. Close the word processor; click YES if prompted to make all the text available to other applications.
  5. Open your text editor (Notepad, Notepad++, etc.).
  6. Paste the text into the text editor (Ctrl + V). This eliminates all unnecessary formatting and word processor-specific coding.  If you use Notepad++, check the Language menu to see it’s on Normal Text.

Okay, so you’ve got a nice clean document now. It has no formatting. What’s that you say? You had italics in some places, centered scene break markers, things like that? Too bad, Bucky. They’re all gone now. It might be in the HTML document you made, and it will still be in your original file, but it’s gone from this puppy now.

Some sites, like Smashwords, for instance, call this the “nuclear option”. This removes any and all formatting from your file. The curly quotes will still be there, pointed in the right direction, but pretty much anything else you added, like italics for emphasis or special formatting for chapter titles, things like that … gone. Zap. Pow. Bzz. Pbbt.

Getting It Laid Out

Once that’s done, you need to lay the text out in a way such that the HTML file will have paragraphs in it. If you don’t do this, you’re going to have one long, continuous paragraph. Or you’ll have a bunch of lines broken with line break tags, which might look okay or it might not, depending on how the reader sets the sizing for the text in their Kindle/eReader.

You need to make sure the device knows where to break paragraphs, so they don’t end up in the middle of a line somewhere. You also don’t want any other headaches associated with bad HTML coding. So let’s get this done.

I like to use KompoZer, the HTML editor, for this step. There is also a composer window as part of SeaMonkey, the Mozilla browser no one knows about, but … you know. If you didn’t download KompoZer, you’ll have to do this all by hand. Have fun. Remember, copy and paste is your friend.

  1. Copy all the text from the text editor (Ctrl + A to select all, then Ctrl + C to copy).
  2. Open KompoZer.
  3. Paste the text into the design screen (Ctrl + V).
  4. Go to the View menu, and choose HTML Tags view.
  5. Select all the text on the screen (Ctrl + A).
  6. On the Format menu, choose Paragraph, Paragraph.
  7. Switch to the Source tab (at the bottom of the window).
  8. Go to the Edit menu, choose Find and Replace.
  9. In the Find box type <br>; leave Replace blank. Click Replace All.
  10. When the search is finished, return to the top of the document and run it again. You should get a message saying it can’t find what you’re looking for.
  11. Click the Design tab again; you should now have nicely formatted HTML paragraphs.
  12. Click on the Source tab again and copy all the text from the edit screen (Ctrl + A, Ctrl + C).

The KompoZer Source tab should show something like this:

image

See the pretty paragraph tags (<p> and </p>)? You’re finished with KompoZer now, but leave it open, just in case of boo-boo later.

Okay, the next steps are pretty easy, and very straightforward, but crucial.

Putting It into a New HTML Document

Open Notepad++. In a blank document, go to the Language menu and choose HTML.

BE CAREFUL! Remember you have your entire story and your HTML code for paragraphs on your clipboard; DO NOT COPY ANYTHING! If you have to delete to correct a mistake, either double-click on the error and re-type, or use the backspace key to erase it. I REPEAT, DO NOT COPY OR CUT ANYTHING DURING THIS PROCESS!

Type the following text into the document, just like you see it:

image

Don’t worry about the little + and – signs on the far left; that’s a function of Notepad++ and you don’t have to type that part. Just the rest of it.

What you have now is a template you can use for all your Kindle-published stories and manuscripts. It will do all sorts of neat tricks; anything you tag with the HTML heading 1 tag will automatically be changed into all uppercase letters, with a font size of 24 points and be centered. All the h2 tags will be centered; all the paragraphs of the class “auth” will be centered, 10-point italic font; and so on. The Kindle Previewer software had no difficulty with this little style sheet added to the HTML document, but YMMV, so use this template at your own risk. You can eliminate everything between the head tags if you’re worried.

All right, with that done:

  1. Open the Kindle Stories template you just made (if it’s not open).
  2. Save the document with a new name.
  3. Open a new tab in N++.
  4. Paste the markup text from KompoZer (Ctrl + V).
  5. Go to the top of the document (Ctrl + Home does this quickly).
  6. Delete everything from the top of the document to your first paragraph tag (<p>). All this information is already in your template; you don’t need it.
  7. Select all the remaining text (Ctrl + A) and copy it (Ctrl + C).
  8. Switch to your Kindle Stories template.
  9. Move the cursor between the two body tags (<body> and </body>).
  10. Paste the text from the other tab into the template (Ctrl + V).
  11. From the Languages menu, choose HTML.
  12. Save the story in N++ with an .htm extension as file type HTML from the File, Save As menu. You can overwrite your existing HTML version of the story if you’d like.
  13. Open the new HTML file from My Computer or Windows Explorer with an Internet browser.  Or just double-click on it to have it open in your default browser.
  14. Verify all the necessary formatting is in place — titles, subtitles, chapter names, italics, bold — all were removed and have to be put back manually.

Next time, we’ll do a little HTML markup to make your story pretty again. Hang in there gang, we’re almost finished. See you next time.

E-Book Self Publishing: Part 1 by J. Dane Tyler

This article was written by J. Dane Tyler and originally appeared on one of his blogs. You should also check out his fiction blog. It’s one of the guest posts I’m moving over from my self publishing blog.

This series reflects the path Dane took to self-publish his short story collection via the Kindle Store and SmashWords. You can check it out prove to yourself that he knows his stuff. (And of course read some good fiction)

Thus begins my series of posts about how to self-publish an eBook on Amazon.com’s Kindle store and Smashwords.com. As I warned before, if this is not something you’re interested in, click away and I’ll see you when the series is over. I’m not sure how many parts this will run, though, so I hope at least some of you with stories you feel are entertaining and would be enjoyed by others but don’t think you have a market for them will stick around and consider this.

J. A. Konrath also suggested if you’ve got a manuscript which did its rounds – that is, you sent it out for representation and an agent didn’t pick it up or your agent sent it around and no publisher picked it up – you consider doing this with those as well. What have you got to lose? At the worst it languishes just like it is now. At best, you have an eBook bestseller on your hands and who knows what doors that will open.

I self-published my eBook for a number of reasons.

  • Short story markets are generally non-paying and take months and months to respond, in general, to submissions. Not all, but some. The benefit is a publishing credit, and you know what? I have those already from a non-fiction book. Why do I need them from non-paying markets?
  • My situation isn’t stable and my future’s a little rocky. I wanted to see results now.
  • I believe the buying public will let me know if story collections are still interesting or desired by the readers of the world.
  • EBooks are the way of the future. As many people as there are bellyaching about I’ll never give up books, I’ll never give up books, lots of figures show eBooks are currently outselling print books by a fair margin, which is only going to grow. Get with the program or be run over by it.
  • I can get 70% royalties with Amazon’s Kindle program. Try THAT with a mainstream publishing house. Go ‘head, I dare you.
  • My stories were already on my blog for free; why not try to make a little money from them?

I could keep going, but you get the point. All the money I’ve made so far is that much more money than I made with them by not publishing them on Amazon and Smashwords. I’m already ahead of the game. That’s why I did it, and it looks like I was right so far.

First things first: What you need

You’re going to need a few things, but you’ll already have most of them, and what you don’t have is free, so don’t freak. Just go get it.

  • A good text editor. Something like Notepad++ would be ideal, but you can use Notepad – which comes with Windows – if you’d like. If you’re not using a PC, or if you’re using a PC without Windows on it (AHEM, Bryce) [Note from Bryce: What? I use windows. I just don't use Word...], you’re on your own. But I think Notepad++ is multiplatform, so I use it and I’m going to assume you’re using it too for the rest of this tutorial series.
  • Amazon’s Kindle for PC or Kindle Previewer software. I prefer the latter, but I have both. I can’t speak for how Kindle for PC works; never used it. The previewer does everything I want it too. I need this; it’s the only way I can test the behavior of the file and get an idea about how it looks on a Kindle. You can’t skip this one; go get it from Amazon’s Kindle publishing page.
  • Microsoft Word, or something which can save as a Microsoft Word document, like OpenOffice Writer or such. Try to avoid Wordperfect; it does strange things and no one recommends it. Also Smashwords ONLY accepts Microsoft Word documents. Go figure.
  • Mobipocket Creator. This is the program which will transform your file into a Kindle-friendly format for you. This is completely optional; many, many people upload their HTML document straight to Amazon’s DTP (Digital Text Platform) and the conversion to the Kindle-native file format is done for them. No hassles, no hair-pulling, no cussing. What fun is that?
  • I like to use KompoZer – which is a free, multiplatform HTML editor (like a word processor for HTML) to do some of the heavy, repetitive lifting. It’s not necessary, but you’ll see why I use it when we get into the process.
  • Patience. Yep, you’re gonna need it. It’s gonna take a couple of days to get this right, but by the time you do, you’ll be a pro and can do it in your sleep.

Okay, once you’ve got all that stuff together, you’re going to need a story. Of course, that story should be imported or copied and pasted into Microsoft Word if you didn’t write it in Word. The part where you have a story, I’ll assume is done.

Next time, we’ll get to the nuts and bolts.

See ya then!

What is this?

Oasis_Portugese_Cover_small

Wait a minute, that looks a whole lot like the cover to my novel, but somehow different.

oasis_pubit_cover

Oh yeah, that’s because it’s the cover for the Portuguese language version. Rafa from Word Awareness has been hard at work translating Oasis and is now done. I just have to make sure my formatting is good and then I’ll upload it to Amazon. I’m going to put all my eggs in one basket this time (at least for 90 days) and try out the Kindle Select program, so that I can schedule giveaways and such. I know to most of you this means next to nothing, but that’s only because you aren’t cool like me and speak Portuguese. I’m pretty excited about the whole deal.