Story Hack

Self Publishing is Easy; Writing Still Hard

josl_title

Over the weekend I published the ebook version of The Journey of St. Laurent. I started the whole process Saturday night with a plain text manuscript. About an hour later, I was done. As in done submitting the proper files to three different stores. Each website took whatever time it needed verifying my submission (all had done so by Sunday night, with one half exception) The novel is currently available here:

Gee, Bryce,  how did you do it so fast?

I did not have to sign up for new accounts at any of the three places, so that did save me an extra hour of waiting for confirmation emails and  looking up banking information. Also, I pre-wrote the book description and other info that I was going to need when filling out publishing forms.

The secret, then, to self publishing quickly is automation.

As I’ve discussed before, I primarily use plain text editors and I format the text as I write using markdown. For fiction, this mostly means putting a “#” before chapter titles and then wrapping words/phrases that I want italicized with asterisks. So it’s not like it’s a lot of extra work or anything.

But since my novel was in markdown, and I’ve had a cover ready for almost a year now, there was very little to do.

First, I used SPAB to produce the epub for Barnes and Noble. (Yes, SPAB produces a bunch of other files that can be used, but I wanted to be extra picky about formatting.)

Second, I used Amazon’s Kindle Previewer to convert both the epub mentioned above and the zipped html (produced by SPAB) to mobi, then I picked the one that looked the best to me. That mobi went to Amazon.

Third, I used pandoc along with templates I made for the old version of SPAB to make a LibreOffice odt file. I opened LibreOffice and saved it as a word doc. The word doc got uploaded to Smashwords.

In all fairness, I probably could have just used SPAB and been done with it. However, the file that SPAB produces for Smashwords is an epub. Smashwords will take an epub, but it won’t convert that epub to the ten or so other formats it likes to sell. The book was for sale at Smashwords itself very quickly, but is still pending review to be distributed everywhere Smashwords distributes. That’s the half exception.

Still, the files I needed were ready to go within 15 minutes. Then it was a matter of uploading and filling in forms.

But writing is still hard

Publishing the book was a snap. And even if you don’t use the same method or tools I do, it is still pretty easy. But do you know what wasn’t easy? Writing the thing. Also: editing it.

I’m confident this is a much stronger novel than the last one, but the more I write, the more I recognize my writing weaknesses.

Anyway, the tools to self publish will continue to get better and easier. That only means we writers should spend the extra time bettering our craft.

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.