Friday, December 30, 2011

Table(s) of Contents and Kindle Books

Simply put, there are two of them, one embedded in the book and one, the Navigable Table of Contents (toc.ncx) housed in its own file.

At one point during the creation of my first Mobipocket book, I had three Tables of Contents associated with my book. One was the Table of Contents (TOC) I embedded near the beginning of my .html book. This embedded TOC is the standard, run-of-the-mill contents page which links to front matter, back matter, and chapters by way of simple anchors; Mobipocket Creator spat out the second TOC during the build stage; and the third TOC was the “navigable” (toc.ncx) file, which I created from scratch.

For creating/formatting the embedded Table of Contents (TOC) and the toc.ncx, I again refer the reader to April L. Hamilton and Joshua Tallent.

I looked for a good definition for the toc.ncx file and came up with Table of Contents Navigation Center eXtended, courtesy of the International Digital Publishing Forum (IDPF). No, this doesn’t define the .ncx file, merely breaks out the acronym. As best I’ve been able to figure, an .ncx file allows reading systems (by that I think the powers that be are referring to devices such as Nook, Kindle, iPhone, etc.) that recognize “auxiliary” content to navigate to that auxiliary content. Otherwise, the reader (the human holding the device) couldn’t get to it. In other words, the .ncx file “extends” the content that the device can access/show/read. Kindle 2, I assume, fits that category of devices; hence, Amazon requires an .ncx file for its Kindle books.

In the case of a simple fiction novel such as my River’s Bend, the toc.ncx doesn’t extend accessible content by much. For example, the .ncx file will take my readers two additional places that the regular TOC does not: River’s Bend’s cover and its (embedded) Table of Contents.

The cover is not present in the book’s embedded TOC because it’s not part of the book’s content, and the second item...well, I don’t really need to explain that, do I? In other words, the embedded TOC provides links to the book’s content and the .ncx file provides links to “auxiliary” content--it gets the reader to the book’s cover if he wishes to see it (and what reader doesn’t?) and to the Table of Contents, which gets the reader everywhere else in the book. Of course, the toc.ncx also gets the reader “everywhere else,” which begs the question, is the embedded TOC really needed? Probably not, but it is part of the book’s content right?
Actually, in my print version of River’s Bend, there is no Table of Contents and that’s true of the majority of fiction books these days. Nevertheless, the reader cannot “fan” through the pages of an eBook--an alternative method is needed.
I inadvertently created that aforementioned Mobipocket Creator-produced TOC (identified by the suffix .mbp) early on, when first getting acquainted with the Mobipocket Creator Publication Files window. I’ll admit, I struggled with what to do with the thing for hours. It was one line--said “Table of Contents”--then the page was blank. Of course, it was blank from lack of data that only I could provide. In point of fact, I now understand that the Table of Contents tab in the Publications Files window is for the publisher’s convenience to automatically create the book’s TOC, which I’d already done from scratch and embedded in my book. I know now that just because a tab appears in the Publications File window that doesn’t mean I have to use it.

Oh, duh!

Next week I’ll talk about River’s Bend’s OPF (open publishing format) file. The “glue” that holds the digital book together.

Thanks again for reading,

Sunday, December 25, 2011

Creating Mobi Files for the Mobipocket Creator

I didn’t make my Friday, 23 December 2011 deadline and bring my blog back on schedule, and I didn’t upload River’s Bend to Amazon’s DTP. Oh, but I do have a nice .prc book sitting in My Publications folder on my hard drive.

Mobipocket Creator compiled the book from five files: my book in .html format, River’s Bend's open package format file, the toc.ncx file, and the cover and logo graphics. The Creator didn’t create any of those files. I created them, then uploaded the finished document into Mobipocket Creator’s Publication Files window.

Okay, I’ve misspoken. In point of fact, way back in November, the Creator did make the first .opf file, which I subsequently annotated. Mobipocket Creator created the original .opf file automatically when I hit “Build” the first time. That file was compiled from the data I gave the Creator using my input to the “Book settings,” “Metadata,” and “Guide” sections in the Publications Files window. Without that step, I would have had to find an example of another .opf file for mobi, then modified it to fit my book. In the beginning, I wouldn’t have even known I needed an .opf file, much less thought to create my own from scratch. I know now.

As it was, I spent a significant amount of time changing (which mandated, by default, studying) that most critical “.opf file”. Good Lord willing and the creek don’t rise, I’ll not have to use the Creator to conjure up another generic .opf file. I now have, in my humble opinion, a beautiful .opf file. But I digress. A detailed description of my trials and tribulations with that .opf file will be the subject of a later blog. The file might be beautiful now, but it took a lot of work getting it to that point, and I want to share.

I intend to use the files I created for River’s Bend as a template for my other three published (and all future) books. I will, at that point, as I’ve done with River’s Bend, upload the completed files into the Creator’s Publication Files window. No more inputting data, then having the Creator crunch out files, which I subsequently have to modify.

In a nutshell, here’s the process I’ve come up with using the Mobipocket Creator to create a .prc version of my book for subsequent upload to the Amazon DTP:

1) I took the Word (.doc) document I created for Smashwords and saved it as a filtered web page (that converted it to .html.). [see my earlier blogs regarding the Smashwords Style Guide.]

2) Per April L. Hamilton's Indie Author Guide To Publishing For The Kindle With Amazon’s Digital Text Platform, Mobipocket Creator & MS Word 2003 Or Higher I went back into my graphics program (I use Paint Shop Pro 8) and reformatted my two graphics (cover and logo) to meet Mobipocket requirements. [Changed image size and dpi]

3) I opened my .html document in Notepad++, added anchors, and cleaned up the document.

Preparing the .html document for upload to the Creator (and subsequently to the DTP at Amazon) takes work, no question about it. But if you know the basics of .html, doing so isn’t hard. “Tedious,’ in my opinion, best describes the effort.

4) I annotated the .opf file as explained above.

5) I manually created the navigable table of contents (toc.ncx) required for Kindle 2.

Joshua Tallent and April Hamilton both provide guidance on creation of the toc.ncx. I, fortunately, had already created an .xhtml toc.ncx for another of my books I put in ePub format, so I was familiar with the structure of the .ncx file. I even used that previously created “xml” file as a template for the toc.ncx file associated with my .html document.

6) I uploaded the .html document and graphics into the Creator’s Publication Files window along with my now “beautiful” .opf file and my toc.ncx files.

You will not see the .ncx and .opf files in the Creator’s “Publication Files” window, but you will see them in your My Publications folder. Make sure you click on “all files” when you start your search.

7. I hit “Build,” which took me to the “Build Publication” window where I opted for standard suppression and no encryption, then hit “Build” again.

And it built. No errors and no warnings.

I reiterate that the 7 steps I outlined above are what I’ve boiled the process down to. You see, when, at point 7 I said my book “built” perfectly, I left out the first 50 times I’d come to point 7 and it did not. Failure after failure to the point I just wanted to sit down and squall. That or take a hammer to the poor ole computer, which really couldn’t be blamed at all.

I did neither. I went to bed and woke up the next day and started again. I’m pretty sure “I got it” now. Look in next week, and I’ll tell you what I understand about the Tables of Contents.

Thanks for reading.


Saturday, December 17, 2011

Those Elusive Files Required For a Mobipocket PRC

I may be a day late with this blog post, but I’m not a dollar short. In a week spent finishing up Christmas decorating, power shopping, wrapping, getting gifts and orders in the mail, and completing my Christmas cards, I still managed to figure out what files the Mobipocket Creator requires to produce a mobipocket.prc book for uploading to Amazon’s Digital Text Platform (DTP) and subsesquent creation of a Kindle book. PRC is a container format for the Palm OS PDA. PRC files are used by mobipocket eBook readers. I tell you this not because I understand it, but to let you know there is a connection between .prc and mobipocket, and what the Mobipocket Creator produces during the “build” process is a .prc file. The DTP uses that .prc file to create the Amazon.azw--a DRM or digital rights management-restricted format of the book. This is the Kindle book, exclusive to Amazon.

I love having all that straight in my head. I didn’t before. Here’s what happened this past week:

First, I discovered April L. Hamilton, author of Indie Author Guide To Publishing For The Kindle With Amazon’s Digital Text Platform, Mobipocket Creator & MS Word 2003 Or Higher. Joshua Tallent has a link to her book at his eBook Architects website. Ms. Hamilton’s focus (and here I allude to my last post) is the creation of a mobipocket.prc file for uploading to the DTP. From my point of view, Ms. Hamilton is to mobipocket what Elizabeth Castro is to ePub.

I downloaded Ms. Hamilton’s Indie Guide... and read it twice. I conclude that only four files are required to build a mobipocket.prc book in the Mobipocket Creator. Those files are:

1) The cover (embedded in the book’s .html file, but as is the case with a web page, for example, the graphic must be included in the folder or the system can’t display it)

Any other graphics in your book must also be included. In my case, I have a logo

2) The book in .html format

3) The Open Packaging Format (.opf) file, an .xml file that the Mobipocket Creator generates automatically with information provided by the author/publisher on the publishing page (Guide, Book settings, Metadata)

The .opf file consists of the book’s metadata, manifest, spine, and guide

4) The Navigable Table of Contents (toc.ncx) file, which the author/publisher creates manually, then uploads to Mobipocket Creator

Ms. Hamilton starts with making a clean, properly formatted Word document (.doc). This is what she prompts the publisher to upload to the Creator. From the Word document, the Creator formats the book into an .html document.

The conversion of a Word document into .html produces, in my opinion, messy .html. I create my own .html version of the book from the Word document before uploading to the Creator. BUT, I learned .html when I built my own website. Far from being an expert, I still know enough .html to be comfortable using it, and Kindle’s .html formatting is not complicated. Hence, I redirect interested readers back to Joshua Tallent’s book, Kindle Formatting. Mr. Tallent goes into great detail on formatting with .html, but abbreviates the creation process. Ms. Hamilton carefully walks the publisher through the creation process in her Indie Author Guide..., but scarcely broaches .html formatting for the book. By combining their guidance, I think any determined self-publisher can create a nice Kindle book on his own.

Note the qualifier, “I think.” I’ll let you know for sure next week. By then, I hope to have cleaned up River’s Bend in the Mobipocket Creator, produced the .prc version of the book, reviewed it in my recently downloaded Amazon Kindle Previewer, and uploaded it to the Amazon DTP.

My ultimate goal is to use the files I’ve created for River’s Bend as templates for my other three books and future books, allowing me to bypass the Mobipocket Creator automation of the .html and .opf files, uploading instead, clean, “build-ready” versions of the files to create the .prc file. The .opf generated by the Creator always will require manual changes/corrections and those corrections for my books will always be the same. Why redo the guide, book settings, and metadata, step by tedious step, every time I create a .prc version of my book?

Thanks for reading this week. Comments are appreciated.


Friday, December 9, 2011

Kindle Formatting

Kindle Formatting

When I purchased Joshua Tallent’s book Kindle Formatting The Complete Guide I assumed I was buying instruction along the same line as Elizabeth Castro’s EPUB Straight to the Point (Creating ebooks for the Apple iPad and other ereaders).

Well, duh, Joshua Tallent never promised to show me how to create a mobipocket book (specifically, unencrypted AZW for Amazon’s Kindle). He promised to teach me how to format a mobipocket book; then in the last two chapters, he did explain how to create a mobipocket book using Mobipocket Creator software. Nevertheless, what I was looking for was not the focus of his book, nor did he say it was; however, without realizing it, I had already completed the lion’s share of Kindle formatting for my book before I read Joshua Tallent’s book.

Last summer (2011) I began uploading my (now) four published books on the Smashwords website. For those of you who are interested, I posted a newsletter article on my website detailing how I turned the Quark typeset copies of my books into a Word.doc suitable for uploading to Smashwords. Here’s the link if you’re interested. The point of this article is to show the reader how, after using The Smashwords Style Guide, I had already accomplished the bulk of producing an .html version of River’s Bend suitable for uploading to the Mobipocket Creator. I merely modified my Smashwords version (the .doc file I uploaded to Smashwords), then saved it as a filtered web page. [Saving it as a filtered webpage put it in .html format.] There is no reason to reinvent the horse.

Of course, this only works if you have created a file for uploading to Smashwords. Some of you could also point out that the Smashwords’ meat grinder creates a mobipocket version of the book. True, but the problem is Smashwords and Amazon have not reached an agreement by which Smashwords distributes its mobipocket version of books to Amazon. That means if a reader wishes to download my book to his Kindle, he has to go to the Smashwords store. Many Kindle book buyers don’t want the hassle. They want to go to the Kindle store at Amazon. Their data is there, their payment history is there, they are sure what they are getting there, etc. Simply put, they are comfortable with Amazon and unfamiliar with Smashwords. Therefore, they won’t get involved with Smashwords even though the Smashwords store offers a plethora of reads they might be interested in perusing. So, until Smashwords and Amazon reach an agreement, I need to upload my books to Amazon's Kindle store.

Now, for those of you who don’t have a Smashwords file of your book, my first, albeit unsolicited, advice is to make one and upload it (no upfront costs, folks; Smashwords gets a small percentage of the sales). But even if you don’t want to get your books on Smashwords, don’t hesitate to use the Smashwords Style Guide to (properly) format your book into a Word.doc or, taking it one additional step, as I did, an .html document, before uploading to the Amazon DTP or to your downloaded Mobipocket Creator software. The Guide is free at the Smashwords website (You can download it in every format the Smashwords meat grinder can create your book in.), and you can certainly use it in conjunction with the Joshua Tallent book, which provides additional guidance unique to Kindle.

Now, speaking of “unique to Kindle,” I’m not quite done with Christmas decorating--much less shopping--but I’ve done a little poking around trying to uncover what files comprise the AZW-mobipocket book folder. I hope to have devoted lots of time to that effort by my next blog. Thanks for reading


Thursday, December 1, 2011

My First Kindle Book and What I'm Gonna Do About It

Three nights ago I retired at Recently, I’ve kept some late nights--working on my publishing--but by , one should consider staying awake and watching the sun come up. I didn’t do that; I slept. I’ve seen the sun before.

The significant thing about that  bedtime is that I went to sleep having created my first mobipocket book. I spent hours putting River’s Bend into mobipocket format, repeatedly opening up the “My Publications” files created by Mobipocket Creator on my computer, correcting, creating and re-creating files in Notepad++. With every minor (and some not so minor) change, I’d go back to the Creator window, remove the old file, add the new file and then try to build the book. Occasionally it would build, but there was always something wrong with it. When I tried to fix it, I’d be back to the point where it wasn’t building again.

As I struggled, I resolved to determine how many files I actually needed in the mobi folder to make my book build AND look right at the same time. I can be an anal individual. I like to know what I’m doing and why. I’d done extensive work this past spring creating an epub version of my third novel Epico Bayou.  I’d used, as my guide, Elizabeth Castro’s EPUB Straight to the Point. From my point of view, Ms Castro had done a credible job explaining the epub’s files. And I also noted familiar-looking files between the epub I created last March and the mobipocket creation I struggled with in the wee hours of this past November night. Terms such as open packaging format (.opf), metadata, guide, spine, and toc.ncx, a navigation control file for XML. I’m not clear on what that means, but I do know that the ncx file is a tool by which the human reader can navigate my book. A table of contents is needed for the Kindle, but Kindle2 requires a “navigational” table of contents. If Kindle2 needs one, I want my book to provide it.

I used Joshua Tallent’s how-to guide Kindle Formatting as the basis for creating my Kindle book. He does not elaborate on the whys and wherefores of the files making up a mobipocket book the way Elizabeth Castro explains epub files. Perhaps that’s because there are programs such as Mobipocket Creator (which I used) and Calibre--and there are others--that automatically create the critical .opf files, the table of contents, and whatever else, then zip it all up together into the “book.” With epub files, given the way Ms. Castro instructed, the publisher creates the files manually, then zips up the folder (which comprises the book), and uploads it to a capable e-reader device so the author/publisher can check it. In truth, that’s the kind of guide I’d like to use to create my mobipocket books. I don’t even know if that’s possible, but I do know that as of right now I have a mobi book that looks really good on my Kindle and behind that little beauty is a folder in my computer’s “My Publications” containing nine files.

Yes, my gut tells me that with only two graphics, I've got too many files. Certainly the two .txt documents saved by mistake during the long hours of editing are suspect, but those I can deal with. The real problem, I fear, is that I have too many tables of contents. The tocs are the source of my main confusion, but that I’ll save for a later post.  My point here is, I’ve got the files, and I can use each of those files (once I figure out the ones I really need) as templates for all my books. I’m gonna start working on that next week--as soon as I’ve got the Christmas decorations up. In the meantime, I want to share with you some of my lessons learned as I navigated Mr. Tallent’s book, which got me as far as I am today. Next week, I’ll start with the Smashwords Style Guide and relate it to formatting for Kindle--the subject of the first six chapters of Joshua Tallent’s book . As I said in my last post, I love Smashwords and for more than one reason.

Thanks for stopping by, and if any of you know how many files the Kindle book folder requires (and which ones, precisely, they are), please feel free to let me know. I’d appreciate it.