Robert Bernecky Snake Island Research Inc. 18 Fifth Street, Ward's Island Toronto, Ontario M5J 2B9 Canada TEL: (416) 368-6944 FAX: (416) 360-4694 APL Character set for TeX Postscript Printers. The enclosed floppy contains the following files, which are intended to assist in the production of Postscript printer output using TeX and LaTeX. apl.ps JKT APL Postscript font. apl.tfm JKT APL TeX font metrics(character sizes for Tex). apltest.apl Quick test of APL font in different sizes for TeX. apltest.ps Result of running QAPL2,TeX, DVIPS on apltest.apl If you copy apltest.ps+etx.ps prn, where prn is a Postscript printer to which you have downloaded apl.ps, it should print sample apl stuff at 10,12,20 points. dvips.fnt font directory for arbortxt DVIPS, modified to include apl. dvips.opt option file for arbortxt DVIPS. Included just for luck. etx.ps Postscript End of Text marker. Fortran8.apl Sample RBE document in LaTeX format. Fortran8.tex Sample RBE document after being massaged by QAPL2. lfonts.tex Lfonts.tex from LaTex, modified to use largely postscript (instead of Computer Modern) fonts. I did not change the definitions inside macros yet, so this one will need some more work. On the other hand, it seems to work OK for my stuff thus far. qapl2.exe IPSA (?) utility, converts x.apl file to x.tex file, changing APL characters to TeX macros. For example, â becomes \qiota, à becomes \qalpha. qdefs.tex TeX macros for apl symbols. srf1.bat Invokes ED, the pcwrite editor. srf2.bat Invokes vanilla tex. This always fails on my system (using TeK Kit shell) with insufficient storage, so I use srf2s. srf2s.bat Bat file to invoke TeX, after kicking out shell. srf2a.bat Bat file to invoke LaTeX, after kicking out shell. srf4.bat Bat file to convert .apl file to .tex file. (invokes qapl2). srf7.bat Downloads dvips prolog file, and APL fonts to postscript printer. Used only at startup time. srf9.bat Bat file to print (using dvips) a TeX document. ed.exe(and friends) pcwrite, and its help files, etc. A shareware editor modified to support APL characters, sort of. ega14.com APL Character set for EGA. The following is a rough description of what each piece, and how they are supposed to fit together. The assumption is that you are using the TeX/LaTeX system provided by USA-BOOKS: (800) USA-BOOKS (Outside the USA, call (516) 239-4194). This consists of various bits of shareware, including an editor(pc-write), TeX/LaTeX, HP Laserjet(no postscript driver)driver, and previewer that doesn't support anything except the 16 "standard" TeX fonts (listed in Appendix F of the TeXBook), and a VGA previewer that does support other fonts, but which doesn't appear to work properly. It also contains a shell utility that, once you learn how it works, does make the work of TeXing much easier. It costs $38.50 US. Very good support over the phone. When I bought the Postscript cartridge for my Laserjet III, I also picked up the Arbortext DVIPS driver for the PS cartridge. This was a few hundred dollars, unfortunately. There are supposed to be public domain drivers available, but I have not been able to find one. At the time, I had a problem scaling fonts, and a very tight publication deadline, so I blew the money on Arbortext. Someone with leisure might be able to do better. So, here's what you get on this disk. Note that it will NOT work unless you order a TeX/LaTeX kit, and suitable driver for your printer. apl.ps JKT APL Postscript font. This is Joey Tuttle's font for APL, based on union keyboard representation(Miniscule alphabet is first, Majascule is second, no underbarred characters). I don't particularly like the miniscule alphabet, particularly because the alpha and omega look like 'a' and 'w'. I recommend someone replace them with Times-Roman or something like that. This postscript font must be loaded into your printer along with the device driver's prolog macros at printer startup time. See SRF7.BAT. apl.tfm JKT APL TeX font metrics(character sizes for Tex). This font metric file tells TeX how big each character is. TeX uses it when formatting paragraphs and lines. Note that TeX never actually sees the characters themselves, only the boxes which surround them. apltest.apl Quick test of APL font in different sizes for TeX. If you run QAPL2 apltest.apl apltest.tex, you should see that the apl symbols have been replaced by \q... macro calls. These correspond to the macro definitions in qdefs.tex. The file resulting from this should be suitable for input to TeX. apltest.ps Result of running QAPL2,TeX, DVIPS on apltest.apl If you have properly loaded the postscript prolog and APL.PS font to your postscript printer, this should print 4 lines of APL. If you copy apltest.ps+etx.ps prn, where prn is a Postscript printer to which you have downloaded apl.ps, it should print sample apl stuff at 10,12,20 points. dvips.fnt font directory for Arbortxt DVIPS, modified to include apl. This is dependent on use of Arbortext DVIPS. If you use a different device driver, this may differ. The main purpose of this file is to map the font names in TeX (psmtimr, psmtimi) to the Postscript file names(Times Roman, Times Italic), and to tell the device driver which fonts reside in the printer, and which ones need to be downloaded. I permanently download APL. I also try to use resident fonts whenever possible, rather than using the Computer Modern fonts supplied with TeX. dvips.opt option file for Arbortxt DVIPS. Included just for luck. It took me several tries to get this one right, which is why I included it. etx.ps Postscript End of Text marker. My Postscript printer would screw up jobs if I did not include one of these at the end of each print job. Check out SRF9.BAT to see how I catenate it to the print jobs. Fortran8.apl Sample RBE document in LaTeX format. This is a paper which is in draft form for publication. It prints properly on my Laserjet III with LaTeX, and might be a good test to see if you have things installed properly. For starters, delete the majority of the body of the text (after the abstract), so you don't use a lot of paper if it fails (25 pages or so). This uses the ACM "article" style, which handles two-up printing, headings, subheadings, abstract and title format, etc. I use it for everythng I do now. Fortran8.tex Sample RBE document after being massaged by QAPL2. This is the same document, with the APL replaced by \qdefs macros. lfonts.tex Lfonts.tex from LaTex, modified to use largely postscript (instead of Computer Modern) fonts. I did not change the definitions inside macros yet, so this one will need some more work. On the other hand, it seems to work OK for my stuff thus far. That is, the Fortran8.apl paper aboev. qapl2.exe IPSA utility, converts x.apl file to x.tex file, This replaces APL characters with TeX macros. For example, â becomes \qiota, à becomes \qalpha. qdefs.tex TeX macros for apl symbols. This file must be \input at the front of each document which uses APL characters, to provide the macro definitions for the APL characters. If you omit this, TeX will complain about the undefined macro \qiota, or whatever it is. srf1.bat Invokes ED, the pcwrite editor. This is a swell editor, for those of us who only need one. srf2.bat Invokes vanilla tex. This always fails on my system (using TeK Kit shell) with insufficient storage, so I use srf2s. srf2s.bat Bat file to invoke TeX, after kicking out shell. srf2a.bat Bat file to invoke LaTeX, after kicking out shell. srf4.bat Bat file to convert .apl file to .tex file. (invokes qapl2). srf7.bat Downloads dvips prolog file, and APL fonts to postscript printer. Used only at startup time. srf9.bat Bat file to print (using dvips) a TeX document. ed.exe(and friends) pcwrite, and its help files, etc. A shareware editor modified to support APL characters, sort of. ega14.com This gives you SAPL Union Keyboard APL Characters for use with pcwrite, aka ed. VARIOUS WARNINGS: 1. The APL right arrow is mapped into an end of file marker. If you use naked dos COPY command to copy files containing right arrows, they will mysteriously truncate at the first right arrow. Use something like: copy qdefs.tex /b d: /b and then verify that source and sink are the SAME. 2. The version of ED distributed with the TeX-Kit has a modification to not break words at an explicit hyphen. This is sometimes a problem with TeX, because the word will, if broken, appear as foo- bar rather than as foo-bar. However, I did not include that version of TeX, rather, a version which supports APL. These are probably not mutually exclusive, but I had this publication deadline, and... HOW IT WORKS: 1. You write a xxx.apl file, using ED. If using the shell, use PF1. The files included with this version of ED allow you to type some, but not all, APL characters using ALT or CTRL keys. In particular, TeX insists that certain characters (I remember tilde as being one of them) are not APL, in spite of being embedded in apl font declarations. I ended up using a mix of APL and qdefs.tex names. For example: {\apl b (\qtilde cî' ')/c} The way the macros are currently defined, you can only have one APL font active at a time. This is not usually a problem, but if you wish to (for example) use different sized APL fonts in the same document, you have to redefine the font on the fly. See file apltest.apl to see how we do this. 2. Convert the APL characters to \q... escape sequences using QAPL2. This program takes source file and sink file names, typically something like qapl2 xxxx.apl xxxx.tex PF4 will do this in the shell. 3. Use TeX (Shift PF2) or LaTeX (Alt PF2) to create xxxx.dvi, a device- independent file which can then be fed to any previewer or device driver. 4. Convert the xxxx.dvi file to a postscript file xxxx.ps, by using PF9. I dump a lot of these files onto my E: drive, which is a ramdrive, for speed, and because they then evaporate when I power off my system. I do NOT put my original .tex or .apl files on ramdrives!! PF9 also copies the file to the printer. If you used PF7 when you powered up the printer, to download the DVIPS prolog file, and the APL postscript font, you should have beautiful output appearing on the printer. 5. TeX is VERY bad at telling you where it was when it screwed up. With TeX itself, things are not so bad, but with LaTeX, you are always in the bowels of some macro or another, and your original text is invisible. I get out of this in the following baroque manner: use "e" to invoke the editor from TeX. It tells you (Then, not before, of course - yucko) that TeX gave up at line x, and positions you in the .tex(!) file at line x. PF1/PF2 to get OUT of this editor ( You are editing the .tex file, NOT the .apl source file!), and go back and fix the .apl file at line x. I usually forget this at least once, and have to go back and fix again when the failure recurs after the next major revision. Shades of patching object decks... NOTES ON LATEX: 1. I have made most of the changes required to convert lfonts.tex from use of Computer Modern fonts to Postscript Resident fonts. I have not completed this, so some math stuff, and stuff like \scriptfont, \scriptscriptfont, and \textfont, may not be using it yet. Arbortext publishes a Customer Support Note "Using Postscript Fonts with LaTeX", which helped some, but it would really be easier if they would merely ship a properly-modified version of lfonts. It took me several days of frustrating mistakes to get mine working at all. 2. Sometimes, I gain insight by looking at the generated Postscript file xxxx.PS, when I am having font troubles. That has helped me to determine if I am using Computer Modern or Postscript fonts. 3. Once you have lfonts.tex correct, you have to make a backup copy of lplain.fmt (The LaTeX macro file), and regenerate it using INITEX or whatever method your TeX system uses. This is because lplain includes lfonts.tex as part of it. Merely copying a new lfonts.tex is not sufficient. BOOKS: 1. Postscript Language Reference Manual. Addison-Wesley, isbn 0-201-10174-2. New edition coming out this month, with more stuff on color, etc. 2. The TeXbook. Addison-Wesley, isbn 0-201-13448-9. 3. LaTeX User's Guide and Reference Manual. Addison-Wesley, isbn 0-201-15790-x. 4. LaTeX for Engineers and Scientists. McGraw-Hill, isbn 0-07-008845-4. If you think you are brain damaged, cannot comprehend the contents of the TeXbook, and are sure that there is no sensible organization or sense to the LaTeX books, relax: Nobody else can understand them either. Even things as simple as printing a dollar sign or backslash are less than obvious. However, get it right once, and everything is swell after that. Best of luck, and may you go forth and create beautiful publications. Bob