Make your illustrated Kindle book easily – with Mac, Calibre & Seashore! 2: Text preparation

Having outlined the process in the previous posting, we can now dive in!…

Type your text using italics, bolds, ampersands, Greek letters etc, into your preferred text editor (I used Scrivener but that’s much like TextEdit on an .rtfd file, when it comes to characters).  For example, to get the degrees sign as used in 34.5 ºC, alt-zero will do, and comes out nicely at the other end.  Clicking the flag to the right of the speaker sign in the tab bar at the top of a Mac screen allows the Character palette and the Keyboard viewer to be accessed; characters, or at least letters selected from there usually get processed correctly too.  The esoteric characters inserted into my reduced book example at the start of the “Flyleaf/Back cover” section were produced using either the Character palette or were guided by the Keyboard viewer.

In TextEdit, create a new file, and paste in your text.  “Save As” HTML.  Close the file. In Finder, change the file extension to .txt .

Reopen that file in Bean, which doesn’t interpret and display it as a webpage.  It will show your text liberally sprinkled with all the HTML cruft especially at the start, usually using lots of angled brackets.

Search down through the first dozen or two lines of pure HTML until you recognise your own beautiful wordage.  You will be giving a file to Calibre which will be an HTML file, but for now, chop out everything prior to your own words.  Download the file I supply: reducedsds-change-extension.html; open that in Bean too, and compare it with the formatted version reducedsds.pdf which approximates to the e-book view. Or, open the html file in the same folder as all its jpgs, for another approximation (images not size-normalised, and no page breaks of course).  You will be able to see which of my book’s details you’ll be replacing with the equivalents for your own book.  However, you don’t need to insert the table of contents as Calibre will do that later.

Having, for the time being, removed all the HTML guff that precedes your first words, you will have to replace, with a space, each mention you find in the file of “span” in the following kind of format:

<span class=”Apple-converted-space”> </span>

There will be several varieties of this, each occurring perhaps dozens of times.  For any one type, just use the “replace all” facility of “find” in Bean to replace each one with a space.  You can replace the </span> bit each one has with nothing, just replacing the longer first bit with a space.  It doesn’t matter if the whole thing gets converted into two spaces since in html that will appear as just one anyway, but there does have to be at least one space substituted otherwise words will get joined.

The file at this stage should start each paragraph with <p> and end it with </p> , but although the </p> should already be there at the end of each paragraph, at this stage the start will often have something like <p class=”p3″> instead. (All the double quotes here are supposed to be straight 🙂 .)

Sometimes it will be <p class=”p1″> or <p class=”p2″> instead, but all examples of each can be converted to <p> in one go.

Check that both those two bits of tidying up are completed, by searching to check no examples of <span , </span , or <p class=”p , are left at the end.  Later on, <p class=”p type stuff will be added at the start, when you copy and substitute the tiny details of the title pages from the materials Sealwyf has kindly and very usefully made available, or my book materials in posting 1.  Sealwyf’s files are in the section ” Presentation files ” on her page .

If somehow you’ve got inter-paragraph <br> commands, you may as well chop all those out too since they will only get ignored.

For making changes to the text file, I got into the following routine, all of which was usually done with the file opened in Bean, even while the extension was being changed:

In Finder first change its extension from html to txt;

Go to the Bean window, “select all” and hit the delete key; paste in the amended full text from your editor; save;

In Finder change its extension from txt back to html;

This entry was posted in Kindle Calibre Seashore tips and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s