CFOG's PIP, October 1986, Volume 4 No. 12, Whole No. 48, page 6
's Wonderful, 's Marvelous, 's Magic!
by Benjamin H. Cohen
As many of you are aware we've been using StarJet, a 'post- processor' for WordStar files published by Control-C Software of Portland, Oregon, to print the justified proportionally spaced text that you have been seeing in PIP since the February issue. I think it's a fine product and have recommended it to a number of other Hewlett Packard LaserJet users. It's easy to Iearn and use, though it would have been nice if the manual told you that to get justified text you simply justify the text with WordStar or NewWord. But StarJet has a couple of limitations.
First, StarJet doesn't do 'true' proportional spacing. StarJet sticks to the WordStar "WYSIWYG" concept -- "what you see is what you get". It's not the same as the WYSIWIG you get today with 'desktop publishing' software on the Macintosh or MS-DOS system where you can mix fonts and graphics and see just what it will look like on the printed page, it's the WYSIWIG that means the text on a line will in fact print on that line. When it comes to proportional spacing THAT is a real problem, since the number of characters that should be on a line varies, especially when you mix a lot of upper case letters on a line. Sometimes StarJet would run the text on a line together in order to squeeze all the upper case letters into the defined margins, and sometimes it couldn't get them all in so it would violate the margin. As a result, I resorted to putting program and file names in bold lower case with an initial capital in most instances. And when I wrote headlines for articles I had to estimate the number of Helvetica Bold characters that would fit on a line or my headline could be wider than the column.
With true proportional spacing the software counts the number of 'units' that each character needs until it fills up a line and can't get the next word on the line, closes out that line, justifies it (if that's what you've told it to do), and starts the next line with the next word, regardless of what the text looks like on the screen. LOTS OF TEXT IN ALL CAPITALS DOESN'T FAZE TRUE PROPORTIONAL SPACING. It simply adjusts.
There is a down side to this, too. What you see on the screen is not what you get on paper. I've often edited or written PIP articles that turned out to be 72 lines long when we get 69 on a page -- a little judicious editing will get them down to 69 lines so that they are one column long exactly. But with true proportional spacing you cannot tell how long a file will be when it prints! That means you have to print it once, then edit to adjust length if you want to, and print a second time to see if you got the desired effect! (On my old Wang word processor it was even worse -- the Wang did not automatically paginate, so you had to print once, at 45 cps, count lines, go back and find the places to insert the page breaks, and print again at 45 slow characters per second. This was only done for special documents.)
The second problem with StarJet (and with NewWord) is that the character width table that the LaserJet establishes is used. The character spacing for the letter "f" is simply wrong. Go to any other article than this one and look for a word with the letter "f" in it -- better yet, one with two! The spacing simply isn't correct.
Magic to the Rescue
The solution to these two problems is, quite simply, Magic. I don't mean old fashioned prestidigitation, I mean the MagicSeries of software from Computer EdiType Systems, 509 Cathedral Parkway 10A, New York, NY 10025 (212-222-8148). Magic comes in three versions -- MagicPrint, MagicBind, and MagicIndex. All three have the capabilities that are described in this article. MagicBind adds to the print formatting capabalities a group of merge-print and footnoting capabilities that put MicroPro's MailMerge to shame, and MagicIndex creates indices, too. Magic does all of the things described in this article for the Hewlett Packard LaserJet (unless otherwise noted), and does most of them for most daisy wheel printers, as well.
Magic for the LaserJet adds one feature that puts to shame even the best of today's desktop publishing software for the Macintosh and MS-DOS systems. The magic word is 'kerning', the ability to adjust the space between characters -- in this case in increments of 1/720th of an inch. Remember StarJet's problem with the letter "f" that I pointed above? Well, if you look at the letter "f" in quotation marks here you'll note that the character and the second quotation mark overlap. But if you look up above, you'll note that they didn't. That's because I told Magic to adjust the space between the "f" and the quotation mark -- just as I did here -- so that problem would be eliminated. When I print words like 'stiffen' and 'iffy' Magic prints them very nicely spaced, thank you.
How Magic Works
Magic follows WordStar and StarJet in using dot commands and embedded commands to adjust text. To allow you to work with 'normal' WordStar files, Magic recognizes dot commands with two leading dots, and ignores normal single dot WordStar commands. The only problem with this is that many of us are used to using two dots to indicate comment lines. Magic will treat those lines as Magic dot commands and attempt to parse them. Since Magic allows more than one dot command on a line, each character will be checked and an error message issued OR it will be interpreted as a command. For example, the "d" dot command resets all parameters to the default settings! It's best to check any WordStar file that you want to print with Magic for double dot comment lines before you print them.
Many of the embedded commands are the WordStar commands, if you're using the WordStar version of Magic. Embedded ^P commands for overstrike character (called "accenting" in Magic parlance), bold, halt for print wheel change (not on the LaserJet), double strike, non-break space, strike-out (called "overstrike" in Magic parlance), ribbon color change (not applicable to the LaserJet), sub- and super-script, and underscore are all the commands familiar. to generations of WordStar users. There's a 'standard version', for non-WordStar uses, not tested.
There are a few added embedded commands, kerning or pitch change most notable among them.
The dot commands differ from WordStar significantly. Some few of them perform the same functions as a WordStar dot command. But even then they may differ -- the "p" dot command sets page numbering, but in addition to telling Magic to start numbering with the indicated page number, the "p" dot command can indicate (P0) postpone numbering to the next page, (P0n) start numbering with number "n" on next page, (P-) turn off page numbering (e. g., for the title page of a chapter), or (P+) turn on page numbering. (As in WordStar, dot commands can be upper or lower case.)
An important dot command is the line length command, dot "l". This sets the width of the printed line in median character widths. Median character widths are set according to the current horizontal character spacing (set with dot "h"). As with the WordStar dot "cw" command, the character spacing is set in 120ths of an inch, so that 10 (the default) represents 10/120ths of an inch or 12 characters per inch. We've set the line length for PIP at 39.
The line length setting and true proportional spacing mean that the formatting of the file is irrelevant! I'm sitting here with my right margin set at 80. Nothing ever scrolls off my 104 column screen, and I get about a lot on the screen at one time. Yet when Magic prints, the margins are correct. And, I never have to reformat as I edit -- and unless the text gets moved off the screen -- seldom with the 104 column screen -- or I want to move to the end of the current paragraph, I generally don't. It looks funny to an old WordStar user, but it works. (Actually, I use VDE for almost all of my writing and editing these days. Magic sees hard carriage returns at the end of each line, so I still have to run HARDSOFT. COM to get rid of those. But I don't have to run each file through WordStar or NewWord to justify. (Hyphenation is another issue!)
You won't be seeing it much in PIP, but Magic does micro-centering. You all know how WordStar centers text. In any event, dot matrix and daisy wheel printers have horizontal motion increments of 1/120th of an inch, so that centering would be limited by that restriction in any event. Magic centers to the nearest 1/720th of an inch.
Bccause of the way we lay out PIP, we won't often take advantage of Magic's ability to print in columns, but you can specify the number of columns (up to four -- who needs more?) and the number of characters between columns. The current line length defines the width printed text.
Magic does horizontal and vertical lines and boxes, graphics, controls sheet feeders (for daisy wheel printers), prints odd and even pages in batches, lays out tables in neat columns, Magic does six levels of boldface:
These are controlled by a dot command, so you can't change the level of bolding within a line.
Getting Started with Magic
The first file that I saw when I got Magic was the "FORMAT" file provided by Computer EdiType Systems. It contains samples of just about everything that Magic can do. That by itself is quite intimidating to the rank beginner with Magic. Worse yet, and unknown to me at the time, the file is set up for the LaserJet's F cartridge and I have the B cartridge. Both have the type faces that you see here, but the F cartridge has some additional fonts and character sets (at additional price). When I attempted to print it there were some problems: fonts A through E on the F cartridge use the Roman 8 character set not available on the B cartridge which uses the USASCII character set. Debugging this to get it to print properly was not simple, and even after the Computcr EdiType folks told me what to do, I couldn't get it to print properly.
It took a while after that frustrating experience before I got up courage to attack Magic again. When I did, I skipped over the FORMAT file, did some reading in the manual, and set up my own files to print. Voila! It works.
If you don't have the F cartridge, I suggest you simply skip over the FORMAT file, read the manual, and try your own examples, building up from the simplest of files to the more complicated.
Changing Fonts with Magic
Magic files look a little funny because of the embedded commands to change fonts. You can designate two fonts with a dot command, a primary font and a secondary font You shift into the secondary font by putting in a tilde followed by a closed parenthesis [)]. You can optionally add between the tilde and the closed parenthesis a letter designating the secondary font you want to use, so that you can use bold and italics on the same line. You shift back to the primary font by putting in a tilde followed by an open parenthesis [(]. So every time you see Magic here in PIP, on the screen I see a tilde, the letter d, a close parenthesis, another tilde, the word "Magic", a tilde, an open parenthesis, and yet another tilde!
Actually, this is not as much of a problem as it seems at first. Use special function keys or a key redefinition program such as found in the public domain QK21.LBR or the commercial SmartKey or XtraKey to generate the required strings instead of repetitively hitting the necessary three key combinations. My definitions include one to shift to secondary font with a letter "d" for bold, one with a letter "c" for italics, and one to shift back to primary font. By always defining which secondary font I want, I never have to worry about which secondary font is currently in effect
You'll be seeing more Magic text printed in PIP in the future.