Kindle Once Again - this time for Walk, Hike, Saunter

Image
 Last time I did this was Dec 2017. At the moment, memory of how to do it is pretty foggy, but luckily I have my earlier blog posts on this to refresh my memory so printing them out to review. (look for Kindle label in this blog to find).  This book is a little easier than the others - text and inline photos, a table of contents, but no index. Susan has promised it will be out in two and a half weeks, so will try to do that. My immediate issue is that I remember that I have to make some changes to the Indesign file before putting out the epub file that I will update for Kindle, but don't remember quite what they were. Pausing to read my prior posts, and to review Kindle code for Healing Miles . From my 2012 notes I saw that to get reliable chapter breaks, each chapter had to be a separate xhtml file. The default of Indesign is to put out one big xhtml file, but it will break on a style, so I need to be sure the current Indesign document (for Walk, Hike, Saunter ) has an appropriat

Kindle Revisited (a publishing post - not hiking)

About a two years ago I posted on the process of putting our first two books on Kindle - converting-our-books-to-kindle-work-in.html. That involved getting a text file from the original page making software (Pagemaker and Indesign), and putting that text into a Word file just to get Word's ability to put out an html file. Getting the initial text was messy as I had the original Indesign CS. The easiest way to get text out of it was open it in Story Editor and cut and paste that text into Word. Then I would save as filtered web page to get html.

The resulting html was run into Mobipocket Creator, and the file out of Mobipocket Creator was one I could load directly onto my Kindle, and when satisfied, send to Amazon. Once the initial html file was created, I never went back to Word. Corrections were made by editing the html file with Notepad++. Mobipocket Creator also built the initial versions of the toc.ncx file and the contents.opf file. The toc file creates the little tab bar across the bottom of the Kindle screen, and the opf file is where you have the link to the cover image, to the table of contents in the book, and to the start point (page where you want the book to open when the reader first opens the book). This was tedious but straightforward. I had to get the color originals of all the book photos and recrop them for the Kindle size (600 x 755 leaves room for one legend line). A problem was chapter page breaks. That required using a Kindle special statement plus keeping everything but text out of the chapter heading h1 statement. The cover image was 1653 x 2500.

In the two years since that time new Kindles have come out, as well as new Ipads. I just finished putting our new book Patagonia Chronicle on  Kindle. It has to look good on all Kindle devices, and I only have the K3, a black and white version with a keyboard. Amazon has provided Kindle Previewer, which both simulates all Kindle and iOS (ixxx devices), and writes the mobi file which I load onto my Kindle for testing, and is submitted to Amazon when I like the results. Mobipocket Creator is still around, but I decided I needed to stay with current software, so used Kindle Previewer for this conversion.

I now have Indesign CS6, so getting the initial file out of it was easier. I chose output in epub format to a folder called KindleFinal. That automatically produced the initial toc.ncx file, content.opf file, as well as an xhtml file. They are initially hidden, as you see a single epub file out of Indesign. Then I created a folder inside the KindleFinal called something like Epub_Zipped_and_Unzipped_Originals. I moved that epub file into that folder, and renamed it from epub to zip. Next I extracted (unzipped) the entire zipped file into the same folder and looked at each file (with Notepad++). There was a container file, a css file, an xhtml file, a toc-ncx and a contents.opf, as well as an image file with all the images. The css and xhtml were very similar to the html file I worked with 2 years earlier, as was the toc-ncx and opf file. The opf had more stuff in it, as became obvious when I made changes later.

So, at this point I had the zip file in the zipped folder, as well as all its unzipped contents. I would do my edits on those unzipped files, then double click the zip file, which opened a separate window. I would drag the changed unzipped file into the zip file, and click add, repeating the process for each file changed.

2017 update. Had to make a change to existing Kindle book. When I dragged the updated file into the zip archive, it would fail in Kindle Previewer for file not found. Looking at all files display of zip archive, I saw that path for updated file was blank, while all others had a folder id. I put the zip archive in folder view, double clicked the appropriate folder so original file was displayed, and then dragged the updated file in. That worked.

Then on the zip file, I would hit File>Close Archive and exit the zip file. I would then copy the zip file into the outer KindleFolder file. In the outer file, I would rename that zip file back to epub, after backing up or deleting the epub file that was there from the last test. Once the corrected epub was in KindleFolder, I would start Kindle Previewer, and drag the epub into the Kindle Previewer window. That automatically starts the Kindlegen compile of the epub, and writes a file suitable for Amazon or my Kindle if there are minor or no errors. At the end of the generation, I click ok, and the simulated Kindle screen comes up, and I can see how it looks. I would repeat this till it looked good, and when appropriate, plug my kindle into my computer via the usb port and see how it looked on the Kindle. I repeated this process till everything looked good on my Kindle.

The surprises. I did some moving of photos and added some additional ones. This is when I found out that files are named in multiple locations in the epub. One is in the image folder, but they are also in the contents.opf, and I didn't realize that till I got the error msg.

Surprise two was the chapter pagebreaks. The didn't work when run through Kindle Previewer. I didn't believe this, though I had read it, because my earlier books still worked. I even went back to those earlier books and unconverted them from mobi to html,  and ran that identical html thru Kindle Previewer - the resulting file didn't pagebreak consistently. It worked when branched to directly from table of contents, but not when encountered by flipping through the pages, backwards or forwards. The only thing that would always page break is the start of a new file, i.e. each place I needed a pagebreak had to start a new file. My original single xhtml file ended up as 24 files. That was tedious because I had a lot of index entries pointing back all over the book, as well as endnotes all over the book pointing to the back of the book. All those simple bookmark entries had to be changed to links. My suggestion to others is when you export the epub from Indesign CS6, have it split the files at that point (on a paragraph style).

Surprise three was the Kindle Fire. I was stunned by how good the book looked with the chapter break images in color. I had no idea color would make that much difference. The not so good thing was that some formatting errors appeared that could not be ignored. Bullet points were the main issue. On the Fire, the bullets overprinted the first character. I resolved this using some techniques from Joshua Tallent's blog post https://ebookarchitects.com/blog/backwards-compatible-poetry-for-kf8mobi/ . This required putting tests for type of device in the css file as well as adding some code to the bullet point xhtml.

I found working with xhtml and a css file essentially the same as working with html. I had a book by Elizabeth Castro that I found valuable HTML, XHTML & CSS. Also, her blog, Pigs, Gourds and Wikis was helpful.

Comments

Popular posts from this blog

Patagonia - Torres del Paine - Trip Planning Stream of Consciousness

Hot weather hiking affliction: Golfer's Vasculitis

Kindle Once Again - this time for Walk, Hike, Saunter