How To Make NewtonBooks, Part Four - Dot Commands and Picture Tips January 1, 1994 Copyright (c) 1994 Tony Lindsey, (xxltony@aol.com). The articles in this series may be copied freely, but may not be sold unless prior permission is obtained. PREREQUISITES FOR THIS ARTICLE I expect that you have downloaded the previous articles in the How2MakeNewtonBooks series. If not, please refer to the README.4TH file enclosed with this document to find out where they can be found. Specifically, I would like you to have the AGRANGE.DOC file handy. It's the file I will use as reference during this article, and it's contained in the How2MakeNewtonBooks #1 collection. AGRANGE.DOC is a fully-formatted, easily-compiled MS Word file that contains a very few simple dot commands, which I have used to set up a basic NewtonBook. My subject today is the explanation of these dot commands. I will also give a few tips on the best way to present pictures on the Newton MessagePad's black-and-white, tiny screen. --------- ABOUT DOT COMMANDS Dot commands have been around on older computer systems for at least thirteen years. I was using them in Wordstar 1.0 on an IBM PC with single-sided floppies and 64k of RAM. They still work fine, at least until something better comes up (Aldus BookMaker, anyone?) A dot command has to be used in a rigidly accurate way. The first character on a line has to be a period, referred to as a dot. These commands are interpreted by BookMaker, and don' show up anywhere in the final book's text. From what I've been able to tell, there are scads of dot commands that BookMaker software can understand. I've looked at the manual once, and my mind recoiled at the techie jargon. I've never been one for reading technical manuals. Here's how I use dot commands: I take some raw text from some faraway electronic bulletin board, clean it up using the tools and techniques I described in article #3, and leave it open in my word processor. I then open an older book I did before (such as AGRANGE.DOC), copy the top part and bottom parts to my new text file, change the appropriate dot command settings in the new document, and then save it. I'm done. All I have to do now is compile it using BookMaker, which I will be covering in article #5. The rest of this article assumes that you would like to do the same thing. I give you full permission to modify the techniques that I use here. I'm just a rank beginner, but a FAST worker. I also recommend that you download my "Nude Beaches of California" NewtonBook on America Online. It uses a slightly different technique for displaying a cover page illustration, and it includes the actual, fully-formatted, uncompiled document for study purposes and copying of the dot commands. ANALYSIS OF AGRANGE.DOC'S DOT COMMANDS, IN ORDER SHOWN -------- .title The Adventure of the Abbey Grange The above command one of the essential, required ones. I always use it as my first dot command. in a document. Just as a warning, you should be aware of two things about this command. 1. The result of using this dot command is that the words after .title show up on the top line of every single page of your book in the 9-point Geneva Bold font. There is a way to prevent it from showing up at the top of every page. I will be covering it later on in the .layout command. If your .title is too long, as was "The Strange Case of Dr. Jekyll and Mr. Hyde", then the last word or so will be crammed on top of your book's regular text. In other words, the text in the second line of every page had the word "Hyde smack dab on top of its center. I fixed it by substituting "&" for the word "and". 2. This has to do with the last example... I "fixed" the problem by changing the .title line to .title The Strange Case of Dr. Jekyll & Mr. Hyde which shortened the tile enough to fit in one line on a tiny MessagePad screen. I then deleted the old Jekyll version on my Newton and installed the fixed, recompiled book. The problem was still there! To fix it, I just removed the Newton's battery cover, pressed the Reset switch, and then tapped on the new Jekyll book. The problem was gone, and I don't know what caused it. Just be warned that debugging a book can get wierd. -------- .shorttitle Grange This is a good dot command to use, once per book. Whatever you use for the shorttitle shows up on the Newton's Extras drawer when you tap Extras. I've been asked what is the longest shorttitle you can use. I personally try to keep it to a maximum of 10 characters. If you allow it to get longer, as in my 11-character "NudeBeaches" shorttitle, then half of the last "s" gets cut off by the title of the book to its right in the Extras drawer. --------- .isbn 191193144619 According to my Webster's Dictionary, ISBN stands for International Standard Book Number. If you grab any book off of a shelf, you'll find its ISBN somewhere in the first few pages. This is used to distinguish that book from all others. A magazine gets an ISSN. If a traditional publisher of paper-based books gets a unique, assigned ISBN, they are handled by RR Bowker, who publish "Books In Print". It would cost you $150 for 100 numbers. These numbers can only contain characters from 0 through 9. The address is: RR Bowker 1180 Americas Avenue [possibly Avenue of the Americas?] New York, NY 10036 (212) 916-1600 Those of us in the new generation of digital book publishers can make up our own, utterly unique ISBN in a flash. Under your Apple menu, choose your Alarm Clock desk accessory. Under the Edit menu, choose Copy. Close the Alarm Clock, and click right after the .isbn line. Choose Paste. You should see something like .isbn .4:56:28 PM 1/1/94 Now that we've pasted the time and date, let's remove any spaces and slashes, until it looks like this: .isbn 45628PM1194 Each ISBN should have a maximum of 15 characters. --------- .layout title 12 notitle .layout main 12 I think of the layout command as a way of defining a "master page." I could have used the word "giraffe" instead of "title" or "main." I'm just telling BookMaker that I will be referring back to my predefined, prenamed layouts later on, so it should store them away for now. There are a maximum of 12 invisible columns to be used on the Newton's screen, using BookMaker's way of thinking. The .layout command says to use the full 12 columns - the whole screen. The word "notitle" is a little confusingly used so soon after the word title, but I got these two dot commands from one of the original programmers as a tip. If I had known then what I know now, I would have used the command .layout TitlePage 12 Notitle. That way, any time I specified that I was using the page design or layout called "TitlePage", then there would be no long name of the book on the top line of any pages that used this layout. That's why I used the modifier word "Notitle." Personally, I just re-use the exact same commands in every book, and I don't notice any difference. My books are simple. My title page is where I display the book's main, attractively laid-out title, displayed in the large, bold New York font that I designated by highlighting the title text and pulling down the Font menu. In other words, dot commands have no control over the font, size or style. The word processor is the tool I use for that. --------- .story centered layout=title The .story command allows us to designate text's location on a line. In this case, every line of text will be centered until told otherwise with another .story command. The .story command is also used in another way, to fix a nasty bug in the current version of BookMaker. I will discuss this later. ---------- .story layout=title This command means that we want any subsequent text to revert to plain old left-justified format, ending the centering command. --------- .picture Centered layout=title This has turned out to be one of my favorite ways to make a bland NewtonBook a little snappier. There are plenty of NewtonBooks out there that don't contain a single image, but I'm still emotionally attached to older, paper-based books, which usually have some form of cover art. PICTURE TIPS These tips are for anyone who wants to convert grayscale or color images to look their best on the Newton's dinky screen. The Newton's screen is officially 240 by 340 pixels, but any image that takes up that much space doesn't seem to work well. The Newton wants to slap a tiny scrolling palette in the lower left corner for any images larger than 232 by 304 pixels. That's the size I used for the "Nude Beaches in California" cover art. Of course, you CAN use a larger size, but you'll have to scroll around to see all of its parts. By the way: the Sherlock Holmes cover art image is 103 by 86 pixels. Color or grayscale images obviously won't look very good on the Newton's black-and-white screen, so I like to convert them to an attractive, dithered pattern. I use DeskPaint (which can be ordered from many mail-order houses like MacWareHouse) because it has the best-looking results from its dithering algorithm. Here is how I get optimum-quality, maximum-size images on a Newton's screen: I open DeskPaint, which provides me with a blank page. I choose "Page Layout" under the File menu. This provides me with a large dialog box with various choices. In the upper right, I change the "Measure" option from "Inches" to "Points". I change the Width to 232, and the Height to 304. Before clicking on "OK" to close the dialog box, I make sure that the Printer/DPI setting is set to 72 DPI. (NOT 80 DPI, which is the Newton screen's official rating - BookMaker and NTK automatically perform the DPI conversion). After all of these steps, I should have a tiny white rectangle in the exact right size and dots-per-inch to take up an entire Newton MessagePad screen. I then paste the color or grayscale image onto this white rectangle and arrange its location on the rectangle. When I'm ready to convert the image to dithered black-and- white, I choose Page Layout again under the File menu. I change the Colors setting to B&W Diffusion and then click on "OK". After an instant, I'll see that the image has been converted. I then choose "Select All" under the Edit menu, copy the image, and paste it into my book's document created on my word processor. --------- .subject 1 startspage According to what I have been told, the ".subject 1" and ".chapter" commands are completely interchangeable. Whatever line immediately follows the .subject command becomes a chapter heading when you tap the Overview dot on your Newton's screen. Here is how I use the .subject command: Load the GRANGE.PKG file (included with article #1 of this series) onto your Newton, open the book, and then tap on the Overview button in between the two arrows at the bottom of the Newton's screen. You'll see two things listed: The Adventure of the Abbey Grange, and Publisher's Notes Notice how much space is being taken up by the longer line. That's the limit of length available to you for the .subject command. The Adventure of the Abbey Grange doesn't happen to have any chapters, but here is how you would use the .subject command on a book with variously-named chapters: Chapter 1 - Peter Loses His Shadow Chapter 2 - Wendy Goes for a Gun Chapter 3 - Tinkerbell bites the Dust Each one of these lines would be immediately preceded by a .subject 1 startspage line, and would be followed by the remaining text of its own individual chapter. The next question is, what would a .subject 2 startspage command do? The purpose of the .subject 2 startspage command is to create indented subchapters under the main chapter headings. Example: (using something like the Jungle Book as an example) Book 1: Rikki-Tikki-Tavi Chapter 1 - A Sunny Day in the Garden Chapter 2 - The Snake Attacks Chapter 3 - Rikki Takes a Nap Book 2: The White Seal Chapter 1 - Opening Poem Chapter 2 - The Seal as a Pup Chapter 3 - Happy Ending You get the idea. Normally, you would only see the main categories when you tap the Overview dot, but if you tap on one of the main categories, it unfolds to show the subcategories associated with it. So, the above lines starting with the word "Book" should be immediately preceded by the .subject 1 dot command, and the lines starting with the word "Chapter" would be preceded by the ".subject 2 startspage" dot command. ---------- BUG FIX The current version of BookMaker (1.07) crashes if there is too much text between dot commands. It'll get to a certain point and then lock up solid. There's an easy fix. Since the .story command doesn't do any harm, I like to sprinkle them in the midst of paragraphs every few pages. For example BookMaker had trouble compiling the Jekyll & Hyde book, (due to the long, long chapters), so I sprinkled a few ".story" commands throughout the text, like this: "Why, you and me, sir," was the undaunted reply. .story "That's very well said," returned the lawyer; "and whatever comes of it, I shall make it my business to see you are no loser." Here's how I did it: I opened the document in MS Word, typed a return and ".story" a few pages down in the first chapter, highlighted the blank line and the ".story" line, and copied them. I then hit the Page Down key on my extended keyboard three times, and when I saw a blank line, I pasted the text in the blank line between paragraphs. Page down three times, paste, over and over until I'm at the end of the file. This works just dandy. It seems to allow BookMaker to allocate memory more efficiently or something. It certainly has no effect except to cancel any centering commands. A NOTE ABOUT THE PUBLISHER'S PAGE - Here are the reasons why I've included the Publisher's Page for all of my books: I make NO claims for the books I've sent out, except I don't want some skunks copying them and selling them for bags and bags of money. I want to have them stay as free as the breeze for as many people as possible... That's the only reason why my sherlox have any form of copyright notice. That way anyone who gets it is clear about what their limits are. Of course, a user group can sell diskettes containing the sherlox to raise money for their group. ------- The final step in creating a NewtonBook is to compile the book using BookMaker and Newton ToolKit. You will find the instructions for accomplishing this in my How2MakeNewtonBooks #5 article, which can be found on America Online, Key Word PDA. -------- A final thought: If you find these few dot commands inadequate, then bravo! I salute you. You have high standards for creating beautiful books. My sincere hope is that you will get your hands on the new, improved and detailed BookMaker manual coming out soon from the programmers who created BookMaker. I would love to see folks speed way past me in designing books of sophistication and art. My primitive books are merely the first baby step. My many hours of experimentation and creation of these articles have had one focus... To make the process of BookMaking as painless as possible for beginners. The tools will improve, and more techniques will be passed around on America Online's Palmtop Forum (key word PDA). Stop by and let us all know what projects you're working on!