Saturday, April 2, 2022

The self-publisher's bible!

  Now in its twelfth edition, Notjohn's Guide to E-Book Formatting includes a chapter on how to format a print edition of your book. (And just to prove how easy that is, here's the paperback edition.)

I became an Amazon e-publisher in November 2007, uploading a few Word docs to what was then called the Digital Text Platform. I soon changed to Html, the markup language used to build web pages. (All e-books are web pages at heart.) Then I discovered the wonders of the free and excellent Sigil software, which builds an "epub" of the sort used by Amazon's rivals in the e-book industry. It is by all measures the best way to format your e-book, creating a single file that can be uploaded to any retailer.

I outline the process in ten steps, with screenshots of my progress along the way. It's simple enough that anyone should be able to follow it, but as a fallback I also provide Plan B -- the Ultimate Basic Template that you can adapt to your own book. (And also a Plan C, in case you're still not convinced.) The Guide is intended to be used in connection with this blog.

Happy publishing in 2022! -- NJ

Thursday, March 24, 2022

Blogger prevents me from answering questions, sorry!

If you have a question, just email me at the Gmail address in my book. Stupid Blogger software has taken away my ability to reply online, so I am shutting down the option to Comment. Sorry! -- NJ.

Friday, May 3, 2019

Html for publishers

Asked on the Kindle Community forum this morning:

It's looking more and more like I've got to learn publishing HTML if I go the Sigil route. Your book doesn't have enough detail on how that aspect of the process. Any suggestions on other books or resources?

To which I replied:

"Publishing html" is a good term. What we use in books is a whole lot simpler than what people now use to build websites. I discovered the web in 1992, using a dial-up modem to the local university's Unix mainframe. All one really needed to know was the paragraph tag, and some of us managed without even that.

Here's how I build an epub: I run a Word doc through Word2CleanHtml.com online, open a new Epub2 file in Sigil, and paste the html right there, replacing the placeholder line between the two body tags. (Nothing wrong with leaving the placeholder there, though it does add a blank space.) Sigil does not provide a style sheet. So I replace the opening lines with my own (which you can borrow from this blog). It contains four lines similar to what Sigil provided, plus four lines of a new head section, including a link to a style sheet call epub.css.

I then add my style sheet to the folder labeled STYLE. It's nothing but a plain-text list of  all the styles I have ever had occasion to use more than once, and which again you can borrow  from this blog. Name it epub.css

The html from Word2Clean should have every paragraph marked with an opening and closing tag, so your book should be paragraphed throughout, the first line indented, and the text justified (flush left, flush right except for the indented line). If you have centered or boldface or italicized phrases in your Word doc, they should be centered, bolded, or italicized.

Depending on your Word doc, you may have to change all chapter headings to H2.  Working in Code View, you do that in Sigil by swiping them with your cursor and clicking on the H2 icon in the menu line.  You could now save and upload the "book" to the KDP, but of course you'll want to tweak it. For example, we don't usually indent the first line in the opening paragraph of a chapter. So you change such <p>  tags to read <p class="first"> and bingo! They are not only indented, but there's a bit of extra space between them and the chapter heading above.

That, plus the Sigil chapter in my Guide, will start you off. If I have a question, I always turn first to the website W3Schools.com. Good luck! -- NJ

Wednesday, October 19, 2016

Q&A

I got an email yesterday which will perhaps interest others:
I read your book Notjohn's Guide to .. 2016. Which is very good but I could not find an answer to my basic question. I'm finishing my hopefully sixth and final edit of my non-fiction book which is typed on a current version of Word.

Q: I've typed my book in word in the style in which I would expect to see the final book, namely indented paragraphs at 0.3, justified margins, bold chapter numbers and titles, oversized headings of H1, H2 , etc. If the html style tags ultimately give these same commands to the epub, should I have typed the manuscript with no indentation, no bold or oversized chapter headings, etc? Will html result in excessive paragraph indentation, oversized headings, etc? 
A good question, to which I replied:
Are you going to use Word2CleanHtml.com and Sigil with the style sheet from my blog? If so, it doesn't really matter. Word2Clean will probably show all paragraphs as [p] but if it gets fancy with sometime like [p class="normal"] you can just do a search and replace in Sigil to change them instantly. (I'm using square brackets because Gmail software doesn't permit angled brackets. Of course you would substitute < for [ and so on.)
I use Word to build the basic book, especially if there's going to be a print edition. So all my paragraphs are indented except for the first para in a chapter or major section. Word2Clean doesn't seem to care -- they all come back as plan [p] tags, so all I have to do is go find the ones I don't wanted indented and change that to [p class="first"].
Good luck! -- NJ

Tuesday, July 21, 2015

All about e-publishing

Everything I know about publishing e-books through Amazon's KDP platform and elsewhere (updated August 2022):

Helpful forums

Worth viewing on a regular basis is the Kindle Formats forum on MobileRead dot com, though it doesn't get heavy use and tends to be rather technical. And since I much prefer epub for uploading to the KDP platform, I also read the nearby epub sub-forum. And of course the KDP platform has its own forums, which I visit every day when I have internet access.

MS Word

I prefer to work in html and upload an epub (see below) because it gives me complete control over the book. There's a learning curve, but the same is true of any method of submitting books to the KDP. However, the Amazon software does a fair job of converting *.doc and *.docx files, if you are religious about using heading and paragraph Styles. (The more recent your version of Word, the better it works. Word 2000 is terrible; Word 2007 isn't bad.) If you're determined to go this route, here are some free resources:

Jason Vorhees Word Styles 101 video
Shauna Kelly on using Word (Basic Concepts, Styles, and Tips for Using Styles)
Tech Republic advanced formatting tips
Mark Coker's Smashwords guide
JT Bigtoad's rules for formatting Word
Tips for Formatting Your Book Correctly in Microsoft Word

And for transitioning from Word to html: Guido Henkel: Take Pride in Your Formatting

And whatever you do, PREVIEW that book after it has converted (Step 2 in the publishing process). I no longer use the downloadable Kindle Previewer software, preferring the online preview. Check you book in all the available emulations.

Kindle Create

Amazon's latest trap for the unwary is a bit of software that makes the process easier but offers no real advantage over a well-styled Word doc. And it can't be used on Apple, Barnes & Noble, Kobo, Overdrive (for libraries), or any other non-Amazon platform.

Epubs

I have settled on a single book file, style sheet, and format across all retailers. That requires me to build an epub. This is more challenging than Word, html, or mobi format, because epubs must be validated in order to get on the iBookstore. This is my system (subject to change, as always):

1) For a variety of reason, I generally wind up with my book in the form of a Word document. To turn it into a workable html file, I run it through word2cleanhtml.com on the web, a free service. (This also works for an Open Office file: just save it as in Microsoft Word 1997/2000/XP format.)

2) I then paste the html file into a template I have previously created. It contains the basic framework of a web page and a link to my standard style sheet. Clean up the word2cleanhtml file as needed (it's not 100 percent accurate) and validate the result at http://validator.w3.org/ -- vital for building an epub, and a good idea for uploading to the KDP. Though the KDP conversion is fairly forgiving, as applied to the e-ink Kindles, good html has become more necessary with the advent of the Fire and especially for the Look Inside preview.

3) I open the html in Sigil (a free download) and break it into chapters (epub devices prefer mutiple files to one large file). I use the Semantics and Metadata tools to build the OPF and NCX files, and I validate the result at http://validator.idpf.org/ -- vital for the iBookstore.

The resulting epub will work on the KDP, on Barnes & Noble, on Kobo, and will pass muster at the iBookstore.

If all else fails

If you're ready to move on from Word, but html terrifies you, there are three purpose-built word processors that will help you advance: Jutoh, Scrivener, and Atlantis Word Processor. Each costs about $40 and has a trial version, each will give you some control over formatting, and each will create an epub you can upload to the KDP or any other e-tailer. From my limited experience with these softwares, I would be inclined to favor Atlantis WP. For Mac users, there's the pricey but popular Vellum software.

Going "wide"

I regard Kindle Select as a suicide pact under which self-publishers will eventually become unpaid or poorly paid serfs of Amazon. So I am a strong believer in making my books available through as many online bookstores as possible. I once uploaded directly to each site, but I now use Draft2Digital wherever I can. My sales breakdown over the years has been about 4/1 between Amazon and the rest of the world, meaning that I improve my sales by 25 percent by going "wide."

Similarly, for print editions, I use KDP Print and choose its "expanded distribution" option. I sell about 30 percent of my paperbacks through Barnes & Noble, the Book Depository, and other independent stores. However, if I were starting new today, I would buy my own ISBNs and publish the same book both on KDP Print and through IngramSpark, for maximum distribution and income.

Promoting your books 

I maintain several content-rich websites and send out a monthly newsletter on topics covered in them. I think most of my sales come from that exposure and through worth of mouth. Even better but only occasional is the "shirttail" that accompanies an article or review published in a national periodical, which says something like "Mr XXX is the author most recently of XXX." In the nature of things, I only place three or so of these a year. But they really have an impact.

Here's a useful blog post on promoting your book: https://insights.bookbub.com/marketing-a-new-book-tactics-authors-publishers-love

And one on getting the most out of your Amazon store listing: https://www.writtenwordmedia.com/2017/03/07/sell-more-books-on-amazon/

And a somewhat biased look at the whole process of self-publishing (you can ignore the BookBaby promotions): https://www.bookbaby.com/pages/pdf/5-Steps-To-Self-Publishing.pdf

Good luck! -- NJ

Friday, August 9, 2013

The e-book framework (full version)


The template for an e-book is an html  package containing a head and a body. Each can contain several elements. In my basic framework or scaffold, the head contains the book's title, the author's name, and a link to the external style sheet posted earlier.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Your Book Title Goes Here</title>
<link rel="stylesheet" type="text/css" href="epub.css"/>
</head>

<body>

<!--Insert your title page here-->

<!--Insert your table of contents here-->

<!--Insert your book file here-->

<!--Insert copyright and author pages here-->

</body>
</html>

"Html" stands for "Hyper-Text Markup Language," a typically geeky title for what is really a very simple system for building web pages. All e-books are html at heart. Most html tags are doubled: the opening tag comes in front of the word or section to be affected, and a similar tag with a diagonal slash closes it off. Thus the statement <b>bold</b> comes out looking as bold. If you forget the closing tag, the rest of your book will be bolded.

There are excellent tutorials on the internet about html and style sheets (usually called CSS for cascading style sheet, another geeky term). Unfortunately most of them describe styling far beyond the needs of the author-publisher.

In other posts, I describe how I build the table of contents, title page, and text chapters of my e-books. Because I use the epub format, the html can be very simple. The html  shown here, for example, won't pass a validation test because it omits most of the throat-clearing that makes html look so frightening. E-books don't need that all that stuff--and if the truth be known, neither do most web pages. If uploaded to a website, the framework above will work as a web page just as it is, with the only content being the statement "Your book content goes here". (In addition, "Your Book Title Goes Here" will appear as the name of the page.)

Wednesday, July 17, 2013

A style sheet for e-books

Here is the style sheet I am currently using. It has the name epub.css and it is a plain-text file unto itself. You are welcome to copy it or adapt it for your own use. - NJ

p {
margin-top:0.0em;
margin-bottom:0.0em;
text-indent:1.5em;
text-align:justify;
}

p.first {
margin-top:0.5em;
margin-bottom: 0.0em;
text-indent:0.0em;
text-align:justify;
}

p.left {
margin-top:0.5em;
margin-bottom: 0.0em;
text-indent:0.0em;
text-align:left;
}

p.center {
margin-top:0.0em;
margin-bottom:0.25em;
text-indent:0.0em;
text-align:center;
}

h2 {
margin-top:1em;
font-size: 150%;
text-indent: 0em;
font-style: italic;
text-align:center;
}

h3 {
margin-top:1em;
font-size: 125%;
text-indent: 0em;
text-align:center;
}

h4 {
margin-top:1em;
font-size: 125%;
text-indent: 0em;
text-align:left;
}

p.large {
font-weight: bold;
margin-top:1em;
margin-bottom:1em;
font-size: 200%;
font-style: italic;
text-indent: 0em;
text-align:center;
}

p.medium {
font-weight: bold;
font-size: 150%;
font-style: italic;
margin-top:1.0em;
margin-bottom:1.0em;
text-indent: 0em;
text-align:center;
}

p.small {
font-weight: bold;
margin-bottom:1em;
font-size: 125%;
text-indent: 0em;
text-align:center;
}

p.block {
font-family: courier, monospace;
text-indent: 1em;
text-align:left;
margin:0em 0em 0em 1em;
}

p.blockfirst {
font-family: courier, monospace;
text-indent: 1em;
text-align:left;
margin:0.5em 0em 0em 1em;
}

p.blockcenter {
font-family: courier, monospace;
text-align:center;
margin:0.5em 0em 0em 1em;
}

span.smallcap {
font-size: 90%;
font-weight: bold;
}

div.image {
text-align:center;
margin-bottom: 0.25em;
}

div.icon {
text-align:center;
margin-bottom: 1em;
}

div.caption {
margin-bottom: 1em;
text-align:center;
font-style:italic;
}


Tuesday, April 9, 2013

How wide the image?

I don't own a large tablet, so I was slow to realize that Amazon's 8.9 inch Fire HD was seriously degrading the images in Kindle editions. (The same doesn't seem to be true of the Apple iPad.) The problem arises with the larger, high-resolution screen, combined with the lack of a software default that would enlarge an image to fill the screen, or something close to that.

For years Amazon has recommended that we use images sized to a 600 by 800 pixel ratio, and that is what I have used in recent years. But even when the image was smaller than the recommendation, it was enlarged to full screen in most Kindles and Kindle apps. With the advent of the Fire HD tablets, this no longer seems to be the case.

As a fix, I have made two changes. First, I now upload images that are 800 pixels wide by however tall. (Some formatters use 1000 pixels wide, but I think the smaller images expand quite well. Second, I changed the html for my images to include a width="100%" instruction. This solves the problem on the Fire HD and on its larger sister, which I think of as The iPad Killer, and it makes no difference whatever in the e-ink Kindles or the various Kindle apps. This is what the html looks like in the case of the Sony Data Discman illustration early in my Guide:

<div class="image" id="disc"><img alt="Sony Data Discman" width="100%" src="discman.jpg" /></div>

The "class" tells the Kindle or app to follow the instructions in the style sheet for formatting an image. The "id"  links the illustration to the table of contents. The "alt" tells the Kindle text-to-speech feature what to say when it encounters the illustration. The "width" instruction provides an enlarged image in the HD tablets. And the "src" (short for source) points to the image file itself.

Saturday, January 26, 2013

A simple table of contents


<h2 id='toc'>Contents</h2>

<p class='center'><a href='#chapter01'>Chapter One</a></p>

<p class='center'><a href='#chapter02'>Chapter Two</a></p>

<p class='center'><a href='#chapter03'>Chapter Three</a></p>

<p class='center'><a href='#chapter04'>Chapter Four</a></p>

<p class='center'><a href='#chapter05'>Chapter Five</a></p>

<p class='center'><a href='#copy'>Copyright - About the Author</a></p>

You will of course add as many chapters as needed, advancing the link (#chapter06, #chapter07, etc.) with each addition. I like to number them as shown, but if you like you can give the link a descriptive name, as I have done for the final section (#copy) containing the copyright information and a brief biography of the author.

Update: If you work in Sigil, as I recommend, this task is simplified for you. First, you can actually build an "html table of contents" using the Tools option on the top menu. (Click on Tools > Table of Contents > Create HTML Table of Contents.) I don't do this because I prefer my own layout, and it's a chore to edit Sigil's version. Second, you don't have to put anchors in the chapter headings or even to use the href= instruction.. By breaking the large html file into separate chapters and sections, you can use the Insert > Link option on the top menu to quickly connect an item in the TOC to that chapter. Just swipe the mouse cursor over, say, Chapter Five, then link it to the appropriate file. The link will look something like this: <a href="../Text/Section0005.html">.

Wednesday, January 16, 2013

Plan B: The Ultimate Basic Framework

Copy everything below this paragraph and paste it into a text editor like Notepad++. Paste in your book text as appropriate, preferably as clean html. Save the document with the extension *.htm and open it in Sigil.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Your Book Title Goes Here</title>

<!--First we have a basic style sheet, sufficient to format our book-->

<style type="text/css"> 

p { margin-top:0.0em; margin-bottom:0.0em; text-indent:1.5em; text-align:justify; }

p.first { margin-top:0.5em; margin-bottom: 0.0em; text-indent:0.0em; text-align:justify; }

p.center { margin-top:0.0em; margin-bottom:0.25em; text-indent:0.0em; text-align:center; }

h2 { margin-top:1em; font-size: 150%; text-indent: 0em; text-align:center; }

p.large { font-weight: bold; margin-top:1em; font-size: 200%; text-indent: 0em; text-align:center; }

p.medium { margin-top:1em; font-weight: bold; font-size: 150%;
margin-top:1.0em; text-indent: 0em; text-align:center; }

p.small { font-weight: bold; margin-top:1em; font-size: 125%; text-indent: 0em; text-align:center; }

</style>
</head>
<body>

<!--Next we have a title page with each line centered-->

<p class="large" id="start">Your Book Title</p>

<p class="medium">The Sub-title</p>

<p class="small">Author</p>

<p class="small">Publisher <a href="#copy">2018</a></p>

<!--Which is followed by the Table of Contents, also centered-->

<mbp:pagebreak>

<h2 id="toc">Contents</h2>

<p class="center">1 - <a href="#chapter01">Chapter One</a></p>

<p class="center">2 - <a href="#chapter02">Chapter Two</a></p>

<p class="center">3 - <a href="#chapter03">Chapter Three</a></p>

<p class="center"><a href="#copy">Copyright</a></p>

<!--And now the text chapters, as many as you like-->

<mbp:pagebreak>

<h2 id="chapter01">Chapter One</h2>

<p class="first">

<!--The first paragraph is flush left with a few words capitalized-->

</p>

<p>

<!--Following paragraphs are indented, and each ends with a closing tag-->

</p>

<mbp:pagebreak>

<h2 id="chapter02">Chapter Two</h2>

<p class="first"> </p>

<p> </p>

<mbp:pagebreak>

<h2 id="chapter03">Chapter Three</h2>

<p class="first"> </p>

<p> </p>

<!--Adapt for as many chapters as you have, then end with the copyright-->

<mbp:pagebreak>

<h2 id="copy">Copyright</h2>

<p class="first"> </p>

</body>
</html>