Tuesday, 12 January 2016

Adventure #1 in publishing: Creating the ebook!

Ebook conversion.

Hoo, boy! This should be the easy step, but I think this is where most of my effort went, in the ten days before my publication deadline. You need to convert your book to the ebook format required for the publishing platform you've chosen. This should be straightforward and painless, but I'm told it's anything but. My early experiments bore that out: but read on, I found a good and simple approach using Calibre.

Lest this sound a bit scary, I should cut to the chase and say that once you've cleaned up your source document, and entered the metadata into Calibre for your book (by typing in the blurb, ISBN, title, author, etc.), the conversion to epub or Amazon's .mobi using Calibre requires only a few minutes of effort, and produces a good and reliable result.

What you want is the ebook format to be as nicely laid out and as well-formatted as what you have in your word processor. But for a various reasons, the conversion can have major problems.

I was using LibreOffice 5.0.3 for my word processor, incidentally, at the time I wrote this blog post. Most people probably use Microsoft Word. A few people (especially if they're producing something like a photo book or a children's illustrated story) might use InDesign. I think InDesign is poorly suited to producing a reflowable ebook: InDesign is, after all, designed to do the opposite, to place each piece of text and artwork exactly where you put it, and not to be movable or resizeable. (That said, it would be great for non-reflowable ebooks, like children's picture books or coffee-table books with lots of images.)

In contrast, one of the biggest strengths of an ebook is that the reader can enlarge or reduce the font (or possibly change the font completely), to suit their eyes and/or the lighting conditions. So this means that you have to be careful about preparing your MS so this reader-directed reformatting can work well: you need to use true page breaks when you want a new page, and an indent or centring style when you want to indent or centre something. An awful mistake is to use spaces/tabs and blank lines to manually position some text so it looks right for you in your MS. Likewise, it's a bad mistake to make a piece of text look like a chapter title but not mark it as such. In short, you should be using paragraph styles exclusively. Doing so also means that if you decide you need to make a change to how you've laid out every instance of something, you need only change the paragraph style, not each paragraph!

Here are some problems I've encountered, using LibreOffice:

The HTML it produces is far more complex than it needs to be. I have basically two kinds of paragraphs (body text and chapter titles), and a few pieces of text that must be centred. I use italics for emphasis. But LO (currently) splits the runs of text into shorter spans of differently-named but identical styles (usually, showing where I went in and edited the text), and for my MS produced literally thousands of paragraph styles.

Worst problem for me was when I copied the whole MS into the new template I wanted to use: after resetting all the paragraphs to the correct body text style, and setting all the chapter titles to the chapter title style, it lost (randomly as far as I could see) about half the places where I'd applied the italic style. I delved into the XML and after a days work of writing some programs, was able to recover about 90% of the italics. The rest I just had to notice and re-do manually during one of my many read-throughs.

Conversion to Microsoft docx and back seemed to help somewhat: but then other aspects of the page formatting got messed up (left and right margins, footers, etc.). So that was a dead-end.

The table of contents generated for the ebook format was just bizarre. You don't want page numbers matched to chapters in the TOC, since page numbers basically don't exist in the ebook format (because the ereaders don't want to calculate this up-front and store and display the information: the technology may change in future). Anyway, not only did my chapters have page numbers, but after conversion, each chapter in the TOC occupied a separate page. Ouch!

Loading up the LibreOffice .odt file into Calibre for conversion also produced poorish results when I then used Calibre (v2.45) to convert it to epub and Kindle (.mobi) format. Calibre seemed to work better when I saved as a .docx and then loaded that up. But the formatting wasn't what I wanted, so more investigation was needed. I made this note to myself when I started this step:

"I have some notes on a page at Goodreads about tips for conversion to ebook formats, and a few web pages to read, as well as my own experiments to perform. Worst case, I may have to unzip the epub format and have a look at the raw HTML, and simplify it down to the bare minimum. This is not meant to be rocket science, after all."
(Which is what happened, incidentally.)

Oh, I also had a plug-in for LO that converted straight to ebook formats: but that seemed to have its own problems, so I uninstalled it.

Here's a very good explanation of self-publishing on Kindle.

Now, at this point I could have delved into the HTML side of things, since Kindle uses a subset of HTML as one of the possible input file formats for producing a book. (The others are PDF and mobi.) If you want to delve in and get your hands dirty, and take control of lots of aspects of the layout, then learning about the HTML may be the best approach. I didn't do that in the end, but rather than ignore all the tips I've gathered, I'll stick them in an "appendix" after this main article ("Kindle's HTML").###Fix this link

The approach I took in the end was much simpler, and I believe generally more useful, and should only continue to improve with time, so I'll focus mainly on that.

My approach was to rely on Calibre, since one of Calibre's important main functions is to perform ebook conversions.

I thought the best starting point was probably to see what it produced, and to look into any problems I found. In that way, if I found something that looked like a genuine problem in Calibre, I could inform its creator, Kovid Goyal. Or, it might point to problems in what I'd done.

Importing my .odt file and converting to epub was painless, as was reading the resulting epub version within Calibre – but I noticed quite a few issues. Here's a screen shot of Calibre in action, with Wild Thing imported into it:

Calibre is powerful, flexible, and has a well thought out user interface that makes it pleasant to use. But the flexibility (necessary to deal with all the different tasks it can perform), meant that I found myself at a bit of a loss as to work out what to do. Calibre also comes with lots of good documentation, including video demos.

Another thing I found was that Calibre itself has what looks like an excellent editor built in, with a well-written user manual available for free here. (I did what I normally do: "printed" the web page to a PDF file, then opened it in Adobe's "acroread" program, selected "booklet" printing, and sent that to the printer, stapling the result with my long-arm stapler to make a convenient A5 reference booklet for easy reference.) Obviously, editing the MS in Calibre is a last resort: if I make changes to the original MS and re-convert in Calibre, I'd need to make any edit in Calibre again – or else make the Calibre version the main source file for the book, which wouldn't be a good idea since then I'd have different "source file" for the print and the epub editions.

The trouble for me was that my deadline was now so close I simply didn't have the time to study and learn Calibre thoroughly. I needed some shortcuts.

Because I'm technical, I decided to poke about under the bonnet and see if I could work out what was happening. Now, most of this poking about was unnecessary and is merely a distraction: so I'm again going to put most of it into yet another "appendix" to this article ("Poking about in Calibre").###Fix this link, too

But one aspect of it proved so useful that I'll shortly describe some of my poking about, within this article proper.

The ".epub" file is actually a ZIP file with specific files and file formats inside it (that's good design!). One of the intentional consequences of this is that you can poke about inside. If you know what you're doing, and don't break the rules, you can even change things. (You just zip it all back up into an .epub file again.)

So I poked about and spent a while developing some scripts to try to fix what I saw as problems, and continued delving into and learning the technical details of how the .epub format worked, and what Calibre produced. I made some progress, but then reached a point where things looked sufficiently wrong that I filled in a bug report to describe what I was experiencing.

The three big errors I had were:

  1. After importing my LibreOffice MS into Calibre and converting to epub, the Table of Contents (of about 70 chapters), appeared as one separate line on each page: you have to page forward through 70 pages to get to the actual 1st page. Or, if you wanted to "jump" to chapter N, then you have to page forward N-1 to get to the ToC entry for Chapter N, and then click on the link.
  2. I was getting white square rectangles appearing for some of the non-breaking space characters when I uploaded the .mobi file to KDP.
  3. Lots more fonts than I expected in the output file, leading to strange changes in the paragraphs.

The developer of Calibre, Kovid Goyal, was very helpful. And, the executive summary of the long and detailed description of my trials and tribulations are that all the problems were caused by either a wrong setting I'd chosen in Calibre, or a genuine bit of messiness in my MS.

To fix problem (1), Kovid pointed out two simple corrections to what I was choosing for the conversion operation:

  1. He recommended converting from .odt to .docx format , and give Calibre the .docx file, since a lot more work had gone into the conversion from .docx. So I chose "Save a copy" as .docx and tried that.
  2. In the Structure Detection section of the conversion dialogue, either change the "chapter mark" to none, or change the chapter detection expression to "/". So I set the "Chapter mark" to "none", and also changed both the "Detect Chapters at" and the "Insert Page Breaks before" to just a "/" (this means, "disable this function").

Together, those two pieces of advice fixed pretty much all the errors I'd found in the conversion process – apart from errors obviously coming from my MS itself. Here's another screen shot, showing all three (changed) settings in Calibre:

For problem (2), it turned out to be a character I was occasionally (accidentally) somehow typing instead of a non-breaking space, in LibreOffice. The character appeared to be a non-breaking space in LO but was illegal for Kindle (specifically, it was the Unicode character U+FFF9). I just had to find and delete all those characters from my MS.

Problem (3) – fun with fonts! When I paged through the ebook in Calibre, doing a visual check, I noticed there were some sections in the wrong font. Checking back into the MS I found that, sure enough, there was a genuine font change in the MS – with a visual difference so small that it was almost undetectable in LibreOffice. But then I realised that finding all these by visual inspection (i.e., manually) was an unnecessarily laborious way of finding and fixing them. By manual inspection, I had learned that the font errors so far had been because some of the text was still in Garamond 9pt. Because Garamond is not installed on my system and the license costs for me to acquire it and pay the annual fees were prohibitive, I had changed the body-text paragraph style to Georgia 10.5pt. Anyway, the odd slippage back into Garamond 9pt would have happened because I must have done some manual formatting, so that when I changed the font style within the paragraph style, those manually-applied formatting changes persisted.

So I called up the Find&Replace dialogue, clicked on Format, and then on the Fonts tab. Now, since Garamond isn't installed, I couldn't pick it from the list. However (and this is really praiseworthy on the LO developers' parts), I was able to type Garamond (with leading cap) into the font text field, choose "Regular expressions, and then enter ".*" (no apostrophes, naturally) into the Search field.

Now, I could fix them one by one, by clearing direct formatting, after noting whether the text should be italic or not, and then setting it italic as needed, after clearing direct formatting. But that, too, was tedious. Useful to do a little, though, to get a feel for the errors and start correcting them.

I could see exactly how it had happened, and it had made sense at the time, but it did have this side-effect that I'd been unaware of. Anyway, understanding the types of errors, I then did a Find All (such a cool LO feature: you end up with multiple separate selections of the matching pattern throughout the document, so you can make changes to those pieces of text in one operation). LO told me it had 299 words and 1,457 characters selected, and I noted that the font size was 9pt in every case (by simply observing that "9" showed in the font size box on the main menu-bar), and then changed the font to Georgia and the point size to 10.5, and that was that!

(Except for LO bug 62603 – aarghh!)

The joy of the "stylesheet.css" file. I thought I'd do a search for other typefaces that might have crept in (Arial, Calibri, Times Roman). I found that there were a few places I'd unintentionally slipped into Times New Roman. Then I realised I could see every single font I had actually used just by looking inside the "stylesheet.css" file inside the .epub file.

And, yes, there were a whole bunch more there. Here's the list, for maximum self-embarrassment:

$ grep "font-family" WildThing-exp5.unz/stylesheet.css | sort -u
    font-family: "Liberation Sans", Arial;
    font-family: "Liberation Serif", serif;
    font-family: "Times New Roman";
    font-family: Calibri;
    font-family: Garamond, sans-serif;
    font-family: Georgia1, serif;
    font-family: Georgia;
    font-family: Times New Roman1, sans-serif;
    font-family: Ubuntu, sans-serif;

Actually, I couldn't make much sense of what was going on when I searched for Liberation Serif: it seemed like a high percentage of paragraphs in the document were in this font: I could clear the formatting so they weren't found, but doing so made no visible difference. And these weren't paragraphs that had proven to be a problem in the conversion. I wondered if some weird font substitution was still going on? The particularly weird thing was that these searches would also find the chapter and part headings – but when they were selected, the font showed as Times New Roman, not Liberation Serif. Yet when I'd searched for Times Roman, they hadn't shown up. (The only pieces of text in the whole MS in Times New Roman were the title and "by L. J. Kendall" on the title page. Because of a bug (feature?) in LO's ToC generation, I had had to add a space character to the end of each chapter title (to make the chapter names actually appear in the ToC). Because of that work around, it seemed like these were all appearing in Liberation Serif. Finding and fixing these was tedious. I couldn't do a Search& Replace because the word "Chapter" and the chapter number were supplied from the paragraph style (they weren't "in" the document body). It turned out that the text is provided via the Bullets and Numbering dialogue's Options tab; the font is kind of defined by the "Character Style" you choose; but I couldn't at first see where these character styles were defined (or modifiable). It was set to "None"; when I changed it to "Header Char", it changed to Liberation Serif, even though it appeared as Time New Roman because that was the font style defined for the Chapter Title style defined in the "Styles and Formatting" dialogue. A bit confusing, eh?

So, in the "Styles and Formatting" dialogue I needed to select the "Character Styles" section, and then change that to Liberation Serif. While there, I set the font size and colour, too. That changed all the auto-formatted chapter titles to be the same: I changed the Character Style for the Prolog to match, but chose not to do so for the Parts nor the Acknowledgement, nor Afterword etc.

So, I checked that after making that change, I checked to see if the "added space" to the title was still being detected as in Liberation Serif when I did my Find&Replace: it was, but I figured that since this was a non-printing character, letting it be changed to Georgia shouldn't make a visible difference. So I went ahead and did a Find All for the Liberation Serif font: this time, it worked harder, finding I think 66,000 words in that font. So I went ahead and changed the font to Georgia, and the font size to 10.5 for all of them. That seemed to make no visible difference, but now when I searched for Liberation Serif, there were no matches.


Okay, next on the list of probably-spurious fonts was Liberation Sans: that found only the Acknowledgement and Table of Contents headings – good!

I then checked the others – none of them were used, except for Ubuntu in four places. So, after that, it seemed that I had (finally!) cleaned up my font mess. Oh: and in the Find&Replace dialogue I clicked on the "No format" button to clear the search for font, and also unchecked the regular-expression, so as not to accidentally confuse myself the next time I used the dialogue.

In Calibre, you update the book by choosing "Add files to selected book records" from the Add books menu, and then selecting the (preferably .docx file) for your MS.

I noticed some odd justification; checking back, I discovered that my two-space pedantry had come undone: all the occurrences of a non-breaking space followed by a normal space, between sentences, had been lost somehow. A quick regular expression Find& Replace fixed that. Oh, and for some reason, every paragraph was no longer fully-justified. Re-converting fixed not just the weird spacing problem but also the justification problem. Now all that remained was trying to work out how to centre the chapter headings for the auto-titled chapters (and ideally, add a little space below).

Ha – in checking, I found that the back cover image I'd inserted on the last page, and anchored to the page, had stayed on that page even when the font change had increased the number of pages. It now appeared about 50 pages before the end. So I fixed that, too.

After that, "all" that was required was about half a day of intense and error-prone work to find the single-character "smearing" of regular-into-italics and italics-into-regular caused throughout the MS in every place where there had been a style-change at the edge of where a Find&Replace had operated.

Sigh. But at least that was the last of my problems, and things proceeded smoothly from there.

Okay – once again, this blog post has turned out to be much longer than I expected, so I'll need yet another separate and new post to cover the topic of the nitty gritty of uploading the file to Kindle and making your Amazon Author page and making updates. So I'll leave it there, for today. Stay tuned!

A Nice Table of Contents

Oh, one thing I did to make the Table of Contents nicer was to delete the leader-characters and page numbers from the auto-generated table of contents, leaving just the (useful) hyperlinks for the ebook edition. I've also found a problem, due to LibreOffice's bad habit of breaking runs of characters into separate logical spans of text. This means that if you edit any text in your ToC, and new text you type in will be in a separate text span. This was very visible because I'd chosen a colour for my ebook chapter titles (not plain black), so edits became very visible, as thed edit was in black and the auto-generated text was blue.

Editing the ToC manually to delete the leader characters (the row of dots) and the page number reference (mostly useless in an ebook), after the 1st time, instead of doing it manually, I used the Find&Replace dialogue: I turned on the Other Options, selected Regular Expressions, put nothing in the Replace With field and this text (without the quotes) in the Search For field: "\[0-9][0-9]*", and then quickly replaced each one.

Poking about in Calibre and .epub

So I copied the .epub file Calibre had produced, into a temporary directory to play with. The 1st step was to unzip the .epub file. Now, I noticed there were far more "index_split" files than there were chapters, and so I opened the first few of these files, and the content.opf, page_styles.css, titlepage.xhtml, and toc.ncx files. I immediately noticed a few unexpected things: text was still being broken up into some very short runs of characters, with different paragraph styles for each run. When I got to the stylesheet.css file, things started becoming clearer. That file defines all the paragraph styles in a very human-readable format, and it became obvious that I apparently had sections of text that looked the same, but which weren't. Since the paragraph style names created by Calibre are pretty distinct (like p-p1, p-p2 and so forth), it meant it would be easy to search the html files to see where they were used. In that way, I could find where I'd used these odd styles, and change the original MS to remove the weird styling.

Now, the 1st problem in my epub version is that Table of Contents (TOC) puts each line of the TOC on a separate page! Looking in the toc.ncx file, I see it looks like this:

<navPoint id="ujwaAQQK4di35KOrpmPFchB" playOrder="1">
        <text>Prolog 1</text>
      <content src="index_split_004.xhtml"/>
    <navPoint id="utE7axnMMjYH5AzmPYfyOp2" playOrder="2">
        <text>Part I 14</text>
      <content src="index_split_005.xhtml"/>
    <navPoint id="uyHLH5SBCmIBt42iiswSe24" playOrder="3">
        <text>Chapter 1 15</text>
      <content src="index_split_006.xhtml"/>

So it looks like the page-breaks must be inside the actual content files like "index_split_004.xhtml". Looking inside that shows that the text is "Prolog 1" as you'd expect, but that instead of being a normal paragraph, it's defined to be a header element (H1). That seems odd. Look:

<h1 class="p-p18" id="calibre_toc_2">
   <a href="index_split_075.xhtml#anchor8" class="s-t">
       <span class="s-t4">Prolog 1</span>
  <a id="anchor9" class="s-t"></a>
  <a class="s-t"></a>

Another odd thing there is that there are three anchor points: the 1st with the text "Prolog 1" and ID "anchor8", a 2nd with no text/content but an ID of "anchor9", and a 3rd with, again, no text/content, all the empty anchors with class "s-t", the "Prolog 1" text with styles-t4. I don't understand that. Looking again at the stylesheet.css, I see that the "s-t" class defines a style with 0 margin, 0 padding, and a 1.2 line-height, and s-t4 is the same but with font-height 0.77419em.

Ahhh...! Perhaps because I manually reformatted the main block of the TOC to be 9pt, and the PARTs to be 10pt? And the 1st anchor is for the left text, the middle for the leader/spacing dots (omitted) and the 3rd for the page number? Sounds plausible, except the page number is in the 1st anchor, not the 3rd. Hmm. It kind of matches the definition at http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element which says that if you leave out the actual link, "then the element represents a placeholder for where a link might otherwise have been placed, if it had been relevant, consisting of just the element's contents." So: why is the page number inside the 1st anchor, not the 3rd? The anchors are often used to indicate clickable content.

What is a class, anyway? Sitepoint says that an HTML element's name (like "h1" or "div" or "a" or "p" specifies headier, division, anchor and paragraph), the "class" attribute let's you specify one or more subtypes. These subtypes are used to label semantically-similar things for identification, so that CSS or JavaScript code can then do clever stuff like define some properties or do something to all elements in the whole document structure (DOM) that have that subtype.

It also means that if I want to auto-remove the page numbers from the TOC entries, I may have to remove it from both the index_split_004.xhtml file and the toc.ncx file – something to keep in mind. So: does this mean I should manually delete the TOC from the MS and regenerate one with page numbers turned off? Or write a script to do the edits, so I can keep a single MS file? Or maybe insert two TOCs, one designed for epub and one for print, and write a script to delete one or the other depending on whether I'm generating an ebook or a pbook? Or, is there a tweak in Calibre itself I could do? If you click on "Convert books" and then on the "Structure Detection" button, it shows you the code it uses to "Detect chapters" (which looks perfect to me), and also to"Insert page breaks", which again looks good, and explains where the 1-page-per-TOC-line problem is coming from: each line is of style "H1", so it's of course getting a page break.

So it sounds like a 1st step might be just to regenerate the TOC in the MS, and not fiddle at all with the formatting, and then see what Calibre produces.

Ah, and I see in Calibre's "Heuristic Processing" conversion option, one that says "Renumber sequences of <h1> or <h2> tags to prevent splitting" – that sounds like what I want, so the problem may become very simple to solve. Hmm: nope. It now has two lines of the TOC per page! An improvement but not a solution.

Oh, and while fiddling with fonts, noticed the paragraph indent was an absolute unit of measurement (cm) instead of relative (points). So:

To change the measurement units used in this dialogue, choose Tools - Options - LibreOffice Writer - General, and then select a new measurement unit in the Settings area.

Hmm, tried again after fixing up far more font-change issues than I expected: I did have several messes. Now, it's all in Georgia, 10.5pt. TOC still wrong. Changed an option to force it to use the auto-generated TOC – I assume that means the one in the .odt file…

"Appendix – Kindle's HTML"

Most of the text below (apart from the occasional editorial remark in italics) is directly quoted from the Support Indie Authors forum on Goodreads.

Never specify fonts or font sizes.

Use percents for indents and em's for margins.

Limit use of symbol characters (try to use HTML symbol codes) and in-line formatting. (We only use bold and italics -- not even super and subscripts.)

But Morris noted (good tips here http://www.morrisegraham.com/):

You can, and should specify font sizes for chapter and title headings. This is done by specifying size in the style part of your header by using a CSS style.


font-size: 1.5em;
text-indent: 0em;
text-align: center;
font-weight: bold

note that when I use an h1 header in my body, it causes the text to be 1.5 em, which is 1.5 times the width of the letter "m." So when the customer on the end adjust font size in their ereader device, the titles and chapter headings stay relative in ratio and proportion to the deafult font size. You can only get this kind of control by doing your book in notepad and then converting it to eBook with a converter later.

But Owen then noted:

If H1, H2, H3 etc tags are used, each device will display them in their own different default size. You can of course define your own styles and adjust the sizes if you want to, but we've always been happy with the defaults.

Micah noted:

One thing that always bugged me about the KDP defaults is that they automatically stick a huge extra line of space between paragraphs. This makes intentional section breaks very difficult for the reader to interpret. To avoid Kindle sticking in extra space, you do this (presumably in the CSS section):

I just define the normal paragraph properties:

text-indent: 1.3em;
margin-bottom: 0.2em;

I found that setting the bottom margin to 0 seemed a bit too tight, and also thought the default text indent was too large for most eReaders. But you can adjust them as you like.

And he added:

Oh, and another thing which I find a bit odd about Amazon's eBook formatting: if you do not hard code in justified text, Kindle eReaders will justify the text by default.

That's not an issue, however what may be an issue is that this default justification does NOT show up in their Look Inside feature.

I have not hard coded justified text, so in the Look Inside preview, it appears as if my books have left justified text. But in an actual eReader they show up with fully justified text.

Owen shared lots of good info:

In our case, we specify a "normal" style in our style sheet for all normal text that is:

p.Normal, li.Normal

Our paragraph style (which is hardly ever used) is:


Our heading styles follow this format:



h4, h5, h6

We've never set the text justification manually. I was unaware until Micah mentioned it that anyone would think this "unprofessional", since I would have thought that readers of eBooks would be aware that the Amazon "Look inside" feature formats things differently than eReaders. I don't think I want such people reading our books anyway (our characters often speak and act "unprofessionally" and that might annoy them?)

I have read that some readers find left justified text easier to reader. I suppose there might be some worth in not hard-coding the justification in case their device allows them to select that option?

And also:

Igzy wrote: "If it's not too much trouble could one of you offer an example of two properly formatted paragraphs laid out together? I'd be much obliged if I could see the tags in action, as I'm not familiar with HTML formatting. "

No problem. Of course GR interprets HTML code, so this example used parentheses in place of pointy brackets, thus ( = < and ) = > . This is how we begin a chapter, with notes after the ||:

(br clear=all style='page-break-before:always') || This tells the Kindle converter to break the page. Below are the headings: heading 3 for the main, and heading 4 for the sub, which is italic and aligned right.

(h3)(a name="_Toc410049128")Prologue: Zero Day(/a)(/h3) || name ID's the target for the TOC link.

(h4)Janin Station;(br) || br is a linefeed (line break)

Tau Verde, Vulpecula Region(/h4)

(p class=NormalBlock)It was make-and-mend day for the Halith Imperial Navy’s Kerberos Fleet ... ruled the lives of Halith mariners—especially when the fleet was lying up at a comfortable port like Janin. (/p) || This a paragraph container. HTML designates the beginning of a container with a code, just p here -- h3 above -- and ends it with a / in front of the code: /p. "class" defines the type of paragraph as defined in the style sheet. The is flush-left paragraph with extra space at the top. The CSS entry for it is below.

(p class=Normal)Watchstanding and sensor sweeps ... guarded by a ring of monitors. (/p) || This is a standard text paragraph. 

margin-top:2.5em; || creates the extra space. Note there is no text indent. 

That is 90% of an HTML text doc right there (with the CSS examples above, in the previous posts). Yes, you see a lot of godawful gibberish in the code here and there, like style="much gibberish" or (span style="much gibberish") (/span). Almost all the time, that is unwelcome. Word will put it in to try to mimic the exact look of a doc in IE -- not what you want.

And Amazon have their own guide which comes recommended:

"Building Your Book for Kindle", and the ebook is free.

Monday, 11 January 2016

Preparing to press the “Publish” Button

I drafted a far-too-lengthy blog post as I worked toward my publishing deadline: partly to get things straight in my own head. (This is the first part of it, polished and condensed.) I had been aware of most of the issues I cover in this piece, and had been attending to many of these tasks (listed below) as background work in between writing and editing. Some of the chores, though, I left till the end.

There's lots of good information about this same topic here, too, at Jane Friedman's "Self-publish your book" site.

So, you've written your book, you've got your cover design, you've decided how and where you're going to publish it: what are the “final” steps required to make your book available to the public?

I'll start off, as I seem to often do, here, with a check-list, in the order in which I think you need to complete them for the least pain, after you've written your book and edited it to be the best it can be:

  • Choose the template for your MS
  • Finalised MS
  • Tagline
  • Cover
  • Blurb
  • ISBN(s)
  • Pricing
  • Book metadata
  • Membership of the Copyright Agency
  • Marketing plan
  • “Elevator pitch”
  • Synopsis
  • Press release
  • Contact lists
  • Create your Author page(s)
  • Publish!
  • Tell people

Okay, let's go through each of those sub-topics, one by one. Template for your MS. This is listed first because in an ideal world, this would be your step zero, before you even start. I wish I'd known this before I started. It was a real pain (took me a couple of days) to convert my MS into the preferred template for the publishing platform I'd originally chosen (for me this was the CreateSpace template, since the print edition is the one whose layout and typography can be locked down, and with the tightest restrictions). Partly this problem was caused by LibreOffice (which reminds me, I still need to report some problems to that most excellent crew of dedicated and generous people). If I had started the MS using a template suitable for a print edition, most of those problems would have been avoided.

Physical size of the page for the printed edition. I would have liked to have chosen the traditional small paperback size, but with CreateSpace that wasn't an option, so I had to go for the smallest available, which in my case was 5"x8".

An interesting thing about this was that the number of pages used, for the same content, was only about 10% more, for a dramatic increase in the point size of the text. I quizzed a few people about the size I ended up using (Garamond 9pt on the native page size vs Times Roman 14pt then reduced to A5 size: so, 71% or close to 10pt), and the Garamond was far more readable, appearing roughly 50% larger! (Note: an issue with Garamond, later!) I had also adopted the LibreOffice paragraph style "Default" for my body text, and "Default" has an inter-paragraph gap. In contrast, most books (and the CS template) used no space but just an indent for the 1st line, instead. The results spoke for themselves. Have a look and see what I mean:

Note that the odd and even pages are different, since you want the wider margin near the binding when printed, for legibility. This odd-even distinction needs to be removed for the ebook edition, naturally. And remember to keep your ISBNs correct and distinct for each format. But at the Book Expo Australia, I went to a talk by a nice lady from IngramSpark (Debbie Lee), who gently quizzed me about my decision to use CreateSpace, and who suggested that IngramSpark might be a better choice. In the end, I did indeed change my plan, for these reasons:




Print locally, ship locally?

No: mainly US

Yes: every continent

Allow 4”x7” print size?


Yes. (Many more options)

Can print on inside of cover?



Handling of US tax exemption?

Yes, v. easy

Yes, a few hours work

Support team for production

TBD: reputation is good

TBD: they're bigger than CS

Production quality


“Indistinguishable from offset”

From what I've seen, they're pretty comparable in most of the other aspects you need. Here's a short article from someone who's used both: Print On Demand: CreateSpace or Lightning Source?

For me, the killer argument is the local printing. Amazon charges about A$30 to ship a printed book from the US to Australia: they have printing facilities in the US (and maybe the UK – I'm not sure). But although they have POD, they don't bother with offshore POD, which seems mad to me. It's certainly extremely unhelpful for self-published authors outside the US. That point alone was enough to make me change my plan: it makes my printed book affordable, rather than absurdly expensive, in most countries.

Finalised MS – including dedication, acknowledgements, and in the format(s) suitable for publisher. You'll also need this to know how many pages, so you'll know the spine width for the cover design.

Tagline comes before the cover, since it's usually a good idea to have this appear on the cover!

Blurb also comes before the cover design, since if you're going to produce a print edition, you'll need a blurb for the back cover. You obviously need to make this as compelling as possible. It's one of the massive hurdles for your book to be chosen by a reader: you need to make it an appealing invitation rather than an obstacle. Expect to spend a lot of time, and a lot of revisions, getting it right. The time is well spent, though.

Bio – again, needed before the cover is finalised. Make it engaging and suited to the genre. You'll also need several, of different lengths for different purposes. Cover – including license to use any images involved, and related notes (copyright or credits) to include in the MS. If you're a book cover designer, great. If not, buy a design somehow – I've blogged about that, earlier. (Book Cover Design).

ISBN(s) If you're going to produce multiple editions, it makes a lot of sense to buy more than one. You can often rely on the publishing platform to supply you with one if you want, but there are good reasons for acquiring a bunch of these: ten ISBNs will typically cost about the same as two individual ones.

A block of sequential ISBNs is used by some industry bodies to identify a publisher.

Check to see, in your country, who has the rights to sell ISBNs: it's generally not permissible, I gather, to re-sell an ISBN. For self-publishers, buying a bunch makes sense since the “publisher” (you, if you're self-publishing, obviously) is encoded in the number, and helps various organisations (like libraries) identify you as a publisher. To my way of thinking, that should be one small piece of the puzzle of branding yourself and promoting your work to help people discover you.

In Australia, the agency involved is Thorpe-Bowker Identifier Services.

I found Joel Friedlander's page helpful: ISBN for self-publishers since it answered a key question I had: do I need a new ISBN if I re-issue a novel if I fix errors found after publication? (Ouch!) The answer is “No” since that's considered just a reprint. (I suspect you should go and visit your ISBN management page and increment the Edition number in the ISBN register, however). Apparently the question of whether you need a separate ISBN for printed and eBook editions is still undecided (though IMHO, they're obviously different and deserve different ISBNs).

And for myself, since I'm seriously considering the idea of producing (1) a US and (2) a UK spelling edition separately, and (3, 4?) one or two more print editions, and possibly even an ebook edition that's helpful for the reading-impaired, I may well end up consuming 5 ISBNs per book I write!

You may be offered the option to buy barcodes. Doing so may be an easy option; or the publishing platform is quite likely to do it for you, since the visible barcode is produced simply using an algorithm that is fed your ISBN. There are also free tools like Zint (http://sourceforge.net/projects/zint/) for producing the barcode.

LCCN/CIP If you're in the US, you're advised to get a Library of Congress Catalog Number (here is one site that explains the hows and whys of How to Get Your LCCN). Though you might consider doing what is recommended for people outside the US, since I gather that provides a superset of what's needed for the LCCN. I'm speaking of obtaining a Cataloguing-in-Print number from your national body. This number is used for libraries all around the world, and I gather is somehow mapped to a LCCN in the US. In Australia, you use this link for Applying for a CIP: note that this step can take a couple of weeks, so don't leave it to the last minute. And keep in mind that there are steps you need to follow-through with afterwards, to finalise the details (like: sending them a copy of your book). You will need to have an ISBN before you apply for the CIP/LCCN, so that's another good reason for buying a few ISBNs for yourself. There's good information about the CIP on the Australian FAQ or on their search page, and also here: How to Complete the CIP form. Here's an excerpt:

Where should the CiP entry appear?

  • The CiP entry should be printed in the book on the reverse side of the title page.
  • The entry must appear under the heading: National Library of Australia Cataloguing-in-Publication entry.
  • The CiP may be ranged left or centered to suit publishers' individual design arrangements.
  • For electronic publications, the CiP entry should appear near the title and other publication details.

The (Australian) Copyright Act 1968 requires you to deposit a copy with the National Library.

Pricing I don't have much to say, here. Much more financially-savvy peole than me would no doubt prepare spreadsheets and make various projections and what-not. I basically just sat and thought about it for a little while.
Any printer/publisher must charge you a production fee for each book printed, obviously. For IngramSpark, the prices to me seem reasonable, and you can (and should IMHO) choose to print on demand (POD). The amount you charge above the production cost is how much profit you make; but you should offer a discount if you hope for any book stores to put your title on their shelves – they need to make their profit! I think the normal figure is something like 50%, but don't quote me on that.

A trap to avoid is “Returns”. I gather that no large chain book store will stock any book unless the publisher allows them to return unsold copies. The delivery cost for shipping the books back is paid by the publisher: that means you! So if the book store guesses wrongly, and orders too many, and returns them: yes, you can easily end up losing money. Smaller book stores may be content to order a few, with no returns, and will just sell off unsold copies at a steep discount (and order no more), rather than returning unsold books. I have no idea why the larger chains seem not to grasp the idea of POD and adopt the same approach, but since the norm is to use the “returns” system, and that costs them nothing, then why should they complicate their business just to support the smaller presses and self-publishers? Anyway, I decided not to allow returns. At least that way, I know I won't be plunging into debt if someone orders too many copies of my book.

Book metadata This includes the genre(s) your book falls into, tags or search terms that help categorise the book, ISBN, CIP or LCCN, series number, edition, publisher, author, blurb, etc. Put some thought into getting this right. If I recall correctly, when I assigned ISBNs to the print and ebook versions, using the “Manage my ISBNs” part of the Thorpe-Bowker website, part of that included specifying categories and sub-categories that applied to them, from long drop-down lists. Likewise, Amazon allows you up to seven category/search-terms to apply to your book to help readers find books they like.

Membership of the Copyright Agency You should locate your national body for managing and recording copyright, and register with them. In Australia it's the COPYRIGHT AGENCY.

I gather that if libraries buy books, they make some payments to the Copyright Agency and they in turn disburse portions of the total pool to the authors of the books. I don't know much about this.

Basically, I think they look after payments due to you that don't come from your publishing platform (e.g. if you're using KDP, Amazon should pay you directly).

Marketing plan Okay, this is probably the most important thing, second only to writing the best book you can. The title you choose, the cover you design or get designed, the blurb you write, the tag line, these are all part of marketing your book. But it goes far beyond that. I've blogged about marketing previously, with my initial thoughts here: “Marketing Your Book - Early Thoughts” and later thoughts here: “Book Publicity and Marketing”. But I'll summarise, and add a few points, below…

Social media: this is stuff like Facebook, Twitter, Instagram, Pinterest, Google+, your blog site, and so on. Everyone says that for authors, social media can be a huge time-sink. And it's true, you could easily let it get out of control. The main thing you should be doing is writing. A common piece of advice is to limit yourself to an hour a day of using social media, and I think that's a good way to keep it manageable. The other key piece of advice is to make what you say count: be funny, insightful, interesting, helpful, and be true to yourself. Do not use your social media time just “shouting at people to buy your book.”

Email list (Contact list): chances are, there are a bunch of people or groups you're in contact with via email, who may be interested to know you have a book. Think of the various circles of people you know: friends, family, acquaintances, colleagues, schoolfriends, facebook, twitter, goodreads, … IMHO each of these circles deserves a separately-written announcement, simply because each circle has a different aspect to it. I think it would be silly to do a “one size fits all” announcement: it's going to look like spam since it won't be written with the clear interests of the recipients in mind.

For myself, over the course of 2015 I told many people I know that I'd written a book and planned to self-publish it that year; and most of them said they'd like to know when it becomes available. So: a single email to those people, being careful to either email it one by one, or else Bcc to everyone (you don't want to be handing out all your acquaintances' email addresses to each other, naturally) seems like it will be appreciated. Don't send it more than once, if you want to avoid looking like a spammer to your friends!

And many ISPs (and gmail!) consider sending an email to a large number of recipients as suspicious, and possibly spam – and will react accordingly. So be careful.

Local book stores, libraries, or schools: if you frequent some local book-stores, newsagents, etc. they may be interested to know you've published a book. It can't hurt to have a chat, and pass on the information they'd need should they wish to put a few copies on the shelves. If you do have some posters, take them along with you, and have a few copies of your printed book. I don't know if they'd be so interested if you have ebooks only – I don't think physical book stores deal much in those (why should they?). A local school might be interested in having you along to speak to a class: you can tell them about the lavish lifestyle you can lead on A$12,500 per annum. :-) On the other hand, your books could potentially keep earning for you year in and year out, and even 70 years after you're dead, so it's a bit hard to compare writing to other careers.

Video chats – I've talked a little about this topic previously, “Emily Craven's brilliant idea for indie-published authors” and her idea about attending book club chats by video.

Reviews – I've talked about some risks involved in this very-important topic previously, “Amazon and reviews”. If you google for people who do book reviews in your genre, you should find numerous opportunities: but be aware that genuine reviewers will generally be flooded, and need months before they'll find time to get to yours. So contact them as soon as you have finished polishing your MS, and preferably contact them earlier to see if it might be possible to reserve a “slot” in advance.

Business cards, flyers, posters. It's not too hard to design a business card, and there are good online companies who will take a PDF and print you off a bunch of good quality cards at good prices. Put yourself in the shoes (mentally) of someone who wants to sell your book, and consider stuff you might use to help them to promote it.

Interviews could be with a local community radio station if you're lucky, or a text-based interview, or you could take questions and then post a video with the questions displayed while you answer them to the camera. There are many possibilities.

Book trailers - Advice on the value of this varies.

Discount promotions: as a marketing tool, people do like getting stuff with discounts, or even free. E.g. Amazon's Kindle Select programme allows you to nominate 5 days per month when your book is discounted. The idea is, of course, that you then let people know in advance that the discount days are coming up. You can choose either “free days” where people can literally get your book for free, or discounts (where it might cost just $0.99). I suppose I'll be finding out more about that in due course. For myself, I think people tend to assume that if they paid nothing for something, that may be what it's worth, so I'm not that keen on the free-days idea, myself.

Facebook: I found these pages very helpful, for my use of Blogger and making it easy for that to work well with Facebook users or followers: Adding meta description tags, and also here, here, and here. Honestly, though, those are probably going well above what you need to do, and you probably need some knowledge of HTML and maybe even a little coding. They're very optional things to do; only if you're comfortable with that kind of thing.

You can (and probably should) also set up an author page on Facebook, though. I myself plan to do that – but I haven't gotten around to it, yet.

Luke's marketing plan. I gather that traditional publishers can work very hard to market and promote an author's book: but note that the amount of effort they put in is completely commensurate with the expected return from doing so. That makes perfect sense: they're businesses, after all, so that's only fair. It does mean, though, that unless you're an A-list author, the marketing period will be brief and the “saturation” will be small, and that will be that. Some people Tweet endlessly, which frankly, I find annoying (at best); although the ones for which I think “Hmm, yes, maybe, later…”, I do tend to rely on seeing again when I have more time so I can follow up…. Then there are paid ads, and Amazon adwords, and …

Anyway, my own plan is to do almost nothing. When everything's all ready I'll tweet about it, probably a countdown of ten tweets spaced out through the day – with an occasional follow-up/reminder tweet (maybe once a month?), afterwards. I'll also blog a little and tweet about what I've done and what I'm working on next. But mainly, I'll be relying on readers telling people about it, provided they liked it. Ideally, some of them would also write a review! I figure that if people start doing this in general, any book will earn exactly the success it deserves, and readers will find good books by word of mouth on social media (or, heaven forbid, face to face). And to carry on writing the next book(s).

I should add, that when I prepared the first print edition, at the end of the process IngramSpark presented the option of a one-off charge of US$60 to promote the book. I think this is how book sellers are informed that your book exists, so it seems very worthwhile to do that.

I found this useful tip on Nikki McDonagh's blog Five FREE Tools To Help Self-Published Authors Succeed. In particular, and especially useful for Amazon ebook publishers, bookshow.me will give you a global URL for your book's Amazon URL, that will direct people to the appropriate Amazon store for their country. You simply go to the bookshow.me website and enter the URL for your book on Amazon, and it gives you a shortened URL which you use instead. When people follow that link, it takes them to the appropriate Amazon store for their country. (Of course, people can still navigate away to visit a specific country Amazon store, but for at least 90% of people, the local URL will be the one they want.) The global URL redirects to your local Amazon. E.g. for my book: http://bookshow.me/B019DQVR76 (thanks @McDonaghNikki!) (Of course you'd normally present it with sensible text for the link, like this: Wild Thing.)

Okay, that's the end of this "review" of the "Marketing Plan" topic. But make sure that what you do has a strong element of reciprocity: if people are helpful to you, make sure you are at least as helpful to others, in return.

Elevator pitch” Have this polished and memorised: people will ask you “So, what’s your book about?” It's well worth the effort to come up with a short, punchy description. Trust me, you don't want to sound like you yourself can't easily describe it, or you're not sure what your book is really about, at its heart!

Synopsis: I think this falls more into the category of stuff you need if you want to get traditionally published, along with cover letters, query letters, and outlines. It's probably a good idea to write a synopsis just for yourself, especially if your plot is complex, or you have a series planned and you want to keep things straight. It can also be helpful to getting you to distil down something for the press release.

Press release – I've talked about this topic previously, “Book Publicity in Marketing”

Create Your Author Page(s) This should at least be on your publishing platform – e.g. for Kindle Direct Publishing, they have an Author page (it's called Author Central: it's the 1st link you find if you enter this URL: https://kdp.amazon.com/help?query=author+central, and then Join, and set up your info. For my part, when presented with the Terms and Conditions page, I copied that and pasted it into a document and saved it away for possible future reference. Note that you can't complete this step without a published title; and if you have only saved your published title as Draft, then it won't be visible and you won't be able to continue.). For the platform that makes your book available, there's probably going to be somewhere for you to record information for tax purposes. Be aware that Amazon make it easy to do this, which will reduce the tax you pay in the US (provided your country has a reciprocal taxation arrangement in place).

Goodreads has a similar thing. You may need to have finalised the Publish step, or you may be able to create the Author page(s) just before publication, so that it's already when you finally “Push the self-publish” button.

On Kindle, Amazon provides the ability to create an Author page, and by default it gets a peculiar ID code built into the URL. But they also provide an easy way to set up an “Author page URL” so that potential readers see a meaningful (memorable) URL, not the weird code. (E.g. my Amazon author page is http://amazon.com/author/ljkendall, which is a much nicer URL than the raw one: http://www.amazon.com/-/e/B019DUHM9E). Amazon also provides various resources at their Author Central area: https://authorcentral.amazon.com/, and as an author, you also hav a kind of web-based dashboard for managing your Kindle ebooks: your titles will appear under a URL like this https://kdp.amazon.com/ with several useful tabs like https://kdp.amazon.com/bookshelf, when you create your Author page for Kindle. I expect those links I've provided won't be an indication of what they look like when you become an Amazon author – I've just provided them for reference for you.

This post is already too long, so I'll cover more about the nitty-gritty side of the conversion to ebook format and upload to Amazon in a later post.

You should provide the tax info that Amazon (or equivalent) asks for – you'll need your taxation ID, then you fill out the forms which are quite self-explanatory and well-designed. In my case, this meant that the tax withholding rate dropped from 30% to 5%.

You should also provide your bank account details, so the money can be paid to you directly, rather than via cheques. The only tricky part of this was providing the “BIC code” required to identify the bank, but a Google search on “BIC code” and my bank name lead me directly to the right page for my bank, and from there I was able to paste in the (in my case) 11-character ID for my bank.

Likewise, after your book has been published you can create an Author page for yourself on Goodreads. Mine is https://www.goodreads.com/author/show/14771366.L_J_Kendall. That page provides good opportunities to engage with your readers, so it's also worthwhile spending time setting up your “home” there on Goodreads.

You can get fancy with your author pages, and prepare “Trailer” videos for your book, and provide videos of “interviews with the author”. If you do, you'll probably need some coaching and advice at the least, and professional editing and video creation help as well.

Publish! Okay, there are two main sub-topics here: creating and providing your ebook edition and your print edition. Now, because this post is already way too long, and there's a lot to cover in each of these topics, I'll write each up separately. But hopefully the information above will help you prepare for the final(?) steps in your self-publishing adventure!

(I'll blog about these two topics very soon: I think I have things basically under control now, so I hope to at least post the ebook one this week.)

Friday, 8 January 2016

Even briefer status report - published!

This is going to be ultra brief...

I didn't manage to meet my deadline of 11th December, but I did manage to publish it four days later. As of I think Wed Dec 15th, it's been available on Amazon. Probably the best link to give is this slightly indirect one, via my Amazon author page L. J. Kendall. So, Wild Thing, Book 1 in The Leeth Dossier, is now available as an ebook. It's a sci-fi/fantasy novel.

In a nutshell, it's set about 40 years in the future, 10 years after magic has returned to the world. A magical researcher acquires a young girl to test his theory about how to develop magical abilities in someone. But things don't go at all according to plan.

You'll see that for the cover I decided on the serene dog and the translucent monster - because they make more sense in the story context; and since I'm self-publishing, I can't claim "Oh, the Marketing Department chose that, don't blame me."

I also approved the electronic proofs for the first of the print editions (the 5"x8" paperback) on Dec 31st, with IngramSpark.

And I have the draft of a 20-page blog article on what was involved just on the ebook production side: which is too long and needs to be tightened up (soon) to post here; followed of course by a blog about the print book production.

The paperback publication date is set at Jan 21st (2016), and I'm about to investigate the possibility of having a small book launch at the end of January.

I still need to make a proper announcement about the book release. I don't think this little status report cuts the mustard. :-)

Oh, and I see that Amazon now also lists the paperback edition as being available for pre-order; and so too does the wonderful Book Depository - how cool is that? :-) I think it's still settling in at Booktopia: when I 1st spotted it, it had no cover image available; later, it disappeared entirely; now, it's back again, but not marked as available for pre-order (as it was, when I first noticed it there); and right now, if you click on the link they give for my name, it says "Sorry, no matches". So I think I'm still "settling in" to Booktopia's database.

Anyway, I now have three reviews, two thanks to the writers at Amorina Rose - Barbara's one is here and Kay's is here, and one thanks to Aly at Riley Westbrook's blog. And all three reviews are at Amazon, too.

I've also learned that Amazon doesn't make the new versions of your book available to readers who have already purchased it, unless the author contacts them with a reasonably detailed list of the changes made, to decide whether they should allow readers to request an update. Their stated reason for doing so is "customers may lose their highlights, last page read, bookmarks, and notes when they download updates"; and say they are investigating how to address that.

But that doesn't explain why a reader shouldn't be allowed to choose to download an updated version when they wish - you could imagine a "You may lose your highlights, bookmarks, and annotations when you update - are you sure?" question to make that crystal clear.

I suspect the real reason is to protect Amazon customers from the small (tiny?) percentage of authors who might play games of some form - e.g. removing a critical part to sell separately. But if that's the reason, those acts to me sound like cheating at best, and criminal at worst. IMHO, a much better approach would be for Amazon to investigate complaints and then come down on such cheats like the proverbial ton of bricks if they found the author had cheated. Surely, the vast majority of updates would be improvements; and the large majority of readers would want to be able to request the update if they chose to?

I have to admit I don't really understand why Amazon has chosen to disallow updates by default!