Introduction
Perhaps you enjoy using the Palm (
nee Peanut) Reader for
reading books...but you might be wondering, how does it stand up for writers? As it turns out, pretty well. In this column, I will talk about how to translate a book into the Palm Markup Language (PML), and also run down the licenses Palm Digital Media offers for publishing books in this format.
I recently had the idea to translate a short e-book, which I had in the form of a PDF, into something more suitable for reading on my Clie. Thanks to my Linux system's command-line tools, rendering it into text format was relatively simple.
There are a number of ways that PDM offers to convert a document. Perhaps the easiest are their Word template with a macro that converts Word document codes to PML codes, and their Palm eBook Studio software which combines a WYSIWYG editor with the ability to import a variety of formats. However, I'm too cheap to buy the Studio, and it only comes for Windows and Macintosh anyway. Since I was using Linux, the Word template was similarly out of reach. However, Palm Digital Media does offer more options for cheap people and alternative OS users alike.
One of these options, for Windows and Macintosh, is the Dropbook program. Dropbook allows a user to drag and drop (hence, Dropbook) a file onto it for immediate conversion. The other option is a Java program called Makebook, which is somewhat older than Dropbook and no longer being updated. Because it is Java, Makebook is suitable for any OS with a Java Virtual Machine—including Linux. Makebook was what I would use for most of my conversion process. However, in order to use Makebook or Dropbook, I would first have to convert the text file into Palm Markup Language.
Marking Up for Palm
Palm Markup Language is a system of marking text with codes that specify text style and placement—a lot like HTML, or the old WordPerfect 5.1 word processor, only simpler. A block of text that is to be formatted is marked at the start and at the end—so a word that is to be
italicized would have the
\i italic marker placed before and after it:
\iitalicized\i. There are special codes that mark chapter and subsection headers, so that a table of contents can be generated automatically when the book is converted.
I will use search-and-replace a great deal through the course of converting the document. For instance, if I know that certain phrases are always italicized when they appear (i.e. the title of a book or a movie), I can automatically replace every instance of that phrase with an italic-marked version. Also, certain special characters should be replaced with markup codes: three periods in a row becomes a \a133 ellipse; two hyphens ("--") becomes a \a151 dash ("—"). Finally, I fix lines that end with a dash or a word split by a hyphen (usually by searching for "-^J" in emacs).
(Note: The Palm Markup Language provides several other options, such as inserting illustrations, or HTML-style anchors and links. However, these advanced options are beyond the scope of this column; follow the links to the PML markup listings to find more information.)
The final step in marking up the file is to be sure that it is unwrapped—in other words, that the text has no line breaks except at the end of each paragraph. PML has no <p> paragraph break indicator but inserts breaks where the original document has them; thus, if each line ends with a break, the paragraphs might look jagged when viewed on a PDA's smaller screen.
In emacs, this is simple enough; I set the right margin to 60,000 characters, make sure there is at least one blank line between each paragraph, mark the entire document, and do a Meta-X fill-region. For those who find emacs too complicated, there is at least one shareware text editor for Windows, UltraEdit, with an automatic unwrapping function; I also have some perl scripts that will do the same thing.
A note about hyphenation: Palm Markup Language includes a code to insert a soft hyphen into a word (though only in Dropbook; it was added after further Makebook development was abandoned). A soft hyphen is a hyphen between syllables that only shows up when the word is split across lines. I briefly experimented with soft hyphenation, and soon discovered it was not worth the time and effort. It is really not useful in most circumstances, because the multitude of different font sizes (and screen window sizes, if using the Windows or Macintosh Palmbook viewer) means that any word could end up at the end of a line. Thus, in order to be inclusive, a text would need a soft hyphen inserted between every syllable of every word. Not only would this take too much time to be practical, it would also add a great deal of excess space to the file's size.
Making the Book
After the text has been fully marked up and prepared, all that remains is to run Makebook or Dropbook on it. In many cases, this is as simple as running a command then picking options from a GUI; the instructions found
on this page are clear enough that I really see no need to reproduce them. For Linux, I found it easiest to run Makebook using the command line option.
After I had experimented with Makebook for a while, Lee Fyock of PDM offered to send me the beta of a Linux version of Dropbook. I eagerly accepted. Unlike its Windows and Macintosh brethren, Linux Dropbook had no GUI and simply ran from the command-line. However, it worked remarkably well, and produced a slightly smaller ebook than Java Makebook did.
Whether you use Makebook or Dropbook, it will probably take some trial and error and fiddling with markup tags before you are perfectly satisfied with the results.
Palm Reader Licenses
Now that you've created a Palm Reader ebook, you may be wondering what the conditions are on selling it or giving it away. In fact, Palm Digital Media offers several licenses for Palmbook content.
Free Giveaway
This is the default license, stating that any Palmbook that you have created, to which you own the rights, may be given away for free, without restriction. If you're just fiddling around with it as a hobby, and not wanting to make any money off of the books you make, this is the license for you.
Palm Reader Starter Pak
For authors with up to two ebooks that they would like to sell, this license costs $250 and allows the sale of two Palm ebooks with no royalties on the first 2,500 copies of each ebook sold. These books will not be encrypted (though may be password-protected), and can be sold through your own website only.
Palm Reader Commerce Pak
The Commerce Pak allows selling an unlimited number of Palm ebooks through your's own or authorized PDM resale sites (such as
Lightning Source). This license costs $129.95, plus a 15% royalty on Palm ebooks sold through your own site.
Palm Retail Encryption Server Software
Not so much a
license per se as a software package for those who would like to sell encrypted ebooks from their own site and "have extensive knowledge of integrating COM objects or Unix shell commands," PDM offers its encryption server software for use on commercial Windows or Unix websites. No details are given as to price, though inquiries are invited.
More information on these licenses can be obtained by emailing licensing-studio@palmdigitalmedia.com.