When problem solving is reduced to hacking, there's usually a problem in documentation somewhere. Bruce Ormsby Adam Software Corner, EP@P (December 1988)

COMMUNICATIONS OF THE USERS GROUP EDITORBARBARA BEETON

VOLUME10, NUMBER1 . APRIL1989 PROVIDENCE RHODEISLAND U.S.A. TUGboat, Volume 10 (1989), No. 1

TUGboat TUGboat Editorial Committee During 1989, the communications of the w Users Barbara Beeton, Editor Group will be published in four issues. One issue Ron Whitney, Production Assistant will consist primarily of the Proceedings of the Helmut Jiirgensen, Associate Editor for Software Annual Meeting. Laurie Mann, Associate Editor on Training Issues TUGboat is distributed as a benefit of mem- Georgia K.M. Tobin, Associate Editor, Font Forum bership to all members. Don Hosek, Associate Editor for Output Devices Submissions to TUGboat are for the most part Jackie Damrau, Associate Editor for .VTjjX reproduced with minimal editing, and any questions Alan Hoenig and Mitch Pfeffer, Associate Editors regarding content or accuracy should be directed for Typesetting on Personal Computers to the authors, with an information copy to the See page 5' for addresses. Editor. Other TUG Publications Submitting Items for Publication TUG publishes the series wniques, in which have The deadline for submitting items for Vol. 10, appeared user manuals for macro packages and 2, No. is May 1, 1989; the issue will be mailed in m-related software, as well as the Proceedings July. (Deadlines for future issues are listed in the of the 1987 and 1988 Annual Meetings. Other Calendar, page 117.) publications on wnical subjects also appear from Manuscripts should be submitted to a member time to time. of the TUGboat Editorial Committee. Articles of TUG is interested in considering additional general interest, those not covered by any of the manuscripts for publication. These might include editorial departments listed, and all items submitted manuals, instructional materials, documentation, or on magnetic media or as camera-ready copy should works on any other topic that might be useful to be addressed to the Editor, in care of the TUG the w community in general. Provision can be office. made for including macro packages or software in Contributions in electronic form are encour- computer-readable form. If you have any such aged, via electronic mail, on magnetic tape or items or know of any that you would like considered diskette, or transferred directly to the American for publication, contact Karen Butler at the TUG Mathematical Society's computer; contributions in office. the form of camera copy are also accepted. For instructions, write or call Karen Butler at the TUG Trademarks office. Many trademarked names appear in the pages of An address has been set up on the AMS com- TUGboat. If there is any question about whether puter for receipt of contributions sent via electronic a name is or is not a trademark, prudence dictates mail: TUGboatQMath. AMS . corn on the Internet. that it should be treated as if it is. The following TUGboat Advertising and Mailing Lists list of trademarks which appear in this issue may not be complete. For information about advertising rates, publication 4IMS-w is a trademark of the American Mathe- schedules or the purchase of TUG mailing lists, write matical Society. or call Karen Butler at the TUG office. APS p5 is a trademark of Autologic, Inc. is a trademark of Addison-Wesley Inc. PC w is a registered trademark of Personal w, Inc. Postscript is a trademark of Adobe Systems, Inc. TEX is a trademark of the American Mathematical Society. UNIXis a trademark of AT&T Bell Laboratories. TUGboat, Volume 10 (1989), No. 1

S. Bart Childs David Fuchs Dept of Computer Science 1775 Newel1 Texas A & M University Palo Alto, CA 94303 College Station, TX 77843-3112 415-323-9436 409-845-5470 Richard Furuta bartQcssun.tamu.edu Note: Unless otherwise specified, Department of Computer Science network addresses (shown in Bitnet: Bart0TAMLSR University of Maryland typewriter font) are on the Internet. Adrian Clark College Park, MD 20742 TEX Users Group Office Department of Electronic Systems 301-454-1461 P. 0. Box 9506 Engineering furutaQmimsy.urnd.edu Providence, RI 02940-9506 Essex University Regina Girouard or Wivenhoe Park American Mathematical Society Colchester, Essex C04 3SQ, U.K. 653 North Main Street P. 0. Box 6248 Janet: alienQuk.ac.essex.ese Providence, RI 02904 Providence, RI 02940 Janet: alienQuk.ac.kcl.ph.ipg 401-751-7760 401-272-9500 ~224 TUGQMath.AMS.com Malcolm Clark RMGQMath.AMS.com Peter Abbott Imperial College Computer Centre Raymond E. Goucher Computing Service Exhibition Road TEX Users Group Aston University London SW7 2BP, England P. 0. Box 9506 Janet: texlineQuk ac ic cc vaxa Aston Triangle . . . . Providence, RI 02940-9506 Birmingham B4 7ET, England John M. Crawford 401-751-7760 21 359 5492 Computing Services Center REGQMath.AMS.com pabbott0nss.cs.ucl.ac.uk College of Business Janet: abbottpQuk.ac. aston Dean Guenther Ohio State University Computing Service Center Stephan v. Bechtolsheim Columbus, OH 43210 Washington State University 2119 Old Oak Drive 614-292-1741 Pullman, WA 99164-1220 Lafayette, IN 47906 Crawford-JQOhio-State W 509-335-0411 Bitnet: TS013500HSTVMA 317-463-0162 Bitnet: GuentherQWSWMl svbQcssun.tamu.edu Jackie Damrau Michael A. Harrison Lawrence A. Beck Mission Research Corporation Computer Science Division Grumman Data Systems 1720 Randolph Road SE University of California, Berkeley R D, MS D12-237 Albuquerque, NM 87106-4245 & Berkeley, CA 94720 Woodbury, NY 11797 505-768-7647 415-642-1469 516-682-8478 HarrisonQBerkeley.edu Bitnet: damrauQbootes Barbara Beeton Doug Henderson American Mathematical Society Michael DeCorte Division of Library Automation Box 6248 P. 0. Box 652 P. 0. Office of the President Providence, RI 02940 Potsdam, NY 13676 University of California 401-272-9500 315-268-2292 300 Lakeside Drive, Floor 8 bnbQMath AMS com, mrdQsun.soe.Clarkson.edu . . Oakland, CA 94612-3550 BeetonQScore.Stanford.Edu Allen R. Dyer 415-987-0561 Don Berryman 13320 Tridelphia Road Bitnet: dlatexQucbcmsa (see Bart Childs) Ellicott City, MD 21043 Alan Hoenig 301-243-0008 or 243-7283 Marius Broeren 17 Bay Avenue OcB Nederland B.V. Shawn Farrell Huntington, NY 11743 Division Office Automation Computing Centre 516-385-0736 P. 0. Box 101 McGill University Don Hosek 5900 MA Venlo, The Netherlands 805 Sherbrooke St W 3916 Elmwood +31.77.76466 x135 Montreal H3A 2K6, Qukbec, Canada Stickney, IL 60402 514-398-3676 Martin Bryan Bitnet: U33297QUICVM Bitnet: CCSFQMCGILLA 29 Oldbury Orchard Patrick D. Ion Churchdown Jim Fox Mathematical Reviews Glos. GL3 2PU, United Kingdom Academic Computing Center HG-45 416 Fourth Street +44 452 714029 University of Washington P. 0. Box 8604 3737 Brooklyn Ave NE Lance Carnes Ann Arbor, MI 48107 Seattle, WA 98105 Personal 'IJEX 313-996-5273 206-543-4320 12 Madrona Avenue ionQMath.AMS.com foxQuwavm.acs.washington.edu Mill Valley, CA 94941 Bitnet: f ox7632Quwacdc 415-388-8853 TUGboat, Volume 10 (1989), No. 1

Helmut Jiirgensen Michael Modest Rainer Schopf Deparment of Computer Science College of Engineering Institut fiir Physik University of Western Ontario 208 Mechanical Engineering Johannes Gutenberg Universitat London N6A 5B7, Ontario, Canada Pennsylvania State University D-6500 Mainz 519-661-3560 University Park, PA 16802 Federal Republic of Germany Bitnet: helmut@uwovax 814-863-0976 Bitnet: SCHOEPFQDMZNAT51 uucp: helmut@julian Dezsii Nagy Larry Sharlow David Kellerman Geological Survey of Canada 10 Toltec #3 Northlake Software 1 Observatory Crescent Flagstaff, AZ 86001 812 SW Washington Ottawa KIA OY3, Ontario, Canada 602-774-1630 Portland, OR 97205 613-995-5449 503-228-3383 Alan Stolleis uucp: imagen!negami!davek James Nearing (see Bart Childs) Department of Physics Yoichi Tanaka Richard Kinch University of Miami Kinch Computer Co. Box 248046 Toppan Printing Co., Ltd. 501 South Meadow St. (Route 13) Coral Gables, FL 33124 Electronic Publishing Division Ithaca, NY 14850 305-284-2323 5-1, 1-chome Taito, Taitc~ku 607-273-0222 Tokyo 110 Japan (03) 835-5495 Jan van Knippenberg David Ness (see Marius Broeren) TV Guide Christina Thiele Canadian Journal of Linguistics Donald E. Knuth Radnor, PA 19088 215-293-8860 Carleton University Department of Computer Science Ottawa K1S 5B6, Ontario Canada Stanford University David Osborne Bitnet: WSSCATBCarleton Stanford, CA 94305 Cripps Computing Centre [email protected] University of Nottingham Klaus Thull Nottingham NG7 2RD, UK StephanstraDe 25 Kim Kubik D-1 Berlin 41 $44 602 484848 x2064 Syva Company Federal Republic of Germany P. O. Box 10058 dao%[email protected] Janet: [email protected] .nott .clan 8383536 Palo Alto, CA 94303 [email protected] 415-493-2200 Mitch Pfeffer Georgia K.M. Tobin C. G. van der Laan Suite 90 148 Harbor View South The Metafoundry Rekencentrum RUG OCLC Inc., MC 485 Landleven 1 Lawrence, NY 11559 516-239-4110 6565 Frantz Road 9700 AV Groningen, The Netherlands Dublin, OH 43017 +31/50 633374 or +31/50 633440 Arnold Pizer 614-764-6087 Bit net: cglQhgrrug5 Department of Mathematics Samuel B. Whidden DECnet: rugr86 : :cgl University of Rochester American Mathematical Society Pierre A. MacKay Rochester, NY 14627 716-275-4428 P. 0. Box 6248 Northwest Computer Support Group Providence, RI 02940 University of Washington Craig Platt 401-272-9500 Mail Stop DW-10 Department of Math & Astronomy [email protected] Seattle, WA 98195 Machray Hall 206-543-6259; 545-2386 University of Manitoba Ron Whitney MacKayBJune.CS.Washington.edu Winnipeg R3T 2N2, Manitoba, Canada l&X Users Group P. 0. Box 9506 Robert W. MCGaffey 204-474-9832 CSnet: plattQuofm.cc. cdn Providence, RI 02940-9506 Martin Marietta Energy Systems, Inc. [email protected] Building 9104-2 Bit net: plattQuofmcc P. 0. Box Y Arturo Puente Dorninik Wujastyk Oak Ridge, TN 37831 P. 0. Box 88521 Wellcome Institute for the History of Medicine 615-574-0618 Caracas 1080, Venezuela McGaffey%ORN.MFEnetQnmfecc.arpa 9086523 183 Euston Road London NW1 2BP, England Rank Mittelbach David F. Rogers (01) 387-4477 Fachbereich Mathematik 817 Holly Drive E. Rt. 10 [email protected] Universitat Mainz Annapolis, Maryland 21401 Staudinger Weg 9 Joost Zalrnstra D-6500 Mainz Vrije Universiteit Federal Republic of Germany Sriram Sankar Amsterdam, The Netherlands Bitnet: SCHOEPFQDMZNATSI Department of Computer Science mcvax!nat.vu.nl!jjazQuunet.uucp Stanford University Stanford, California 94305 Herrnann Zapf 415-723-4962 Seitersweg 35 [email protected] D-6100 Darmstadt Federal Republic of Germany TUGboat, Volume 10 (1989), No. 1

From the President General Delivery Bart Childs I am looking forward to the celebration of 10 years Donald E. Knuth Scholarship of TUG at Stanford. The call for papers has already appeared; I hope you can and will participate. Larry Sharlow was honored at the 1988 Annual Below is an announcement for a "dingbat" com- Meeting, McGill University, Montrbal, as the 1988 petition. I have had a lot of positive response from Scholarship Winner. He has volunteered to serve on the preliminary versions. I hope the competition the 1989 selection committee. will be a good step in expanding our METAFONT We are pleased to announce the Fourth Annual horizons, which I feel have been neglected. "Donald E. Knuth Scholarship" competition. This year two Scholarships will be awarded. The awards consist of an all-expense-paid trip to TUG'S 1989 Annual Meeting and the Short Course offered im- mediately following the meeting. The competition is open to all 1989 TUG members holding support positions that are secretarial, clerical or editorial in nature. Announcing To enter the competition, applicants should A TUG Dingbat Competition submit to the Sch~larshipCommittee by May 12, 1989, the input file and final T@ output of a TUG announces a METAFONT competition for the project that displays originality, knowledge of TEX, creation of the best dingbat characters. Each entry and good mnique. The project may make use of a will consist of one specific character (such as a macro package, either a public one such as I4W or logo) or a dingbat family, the METAFONT source, one that has been developed locally; such a macro annotation of the source for pedagogical use, and samples of the use of the character(s). These package should be identified clearly. Such features as sophisticated use of math mode, of macros that characters can be in the spirit of the Zapf dingbats in Postscript, symbols, icons, logos, or of some require more than "filling in the blanks", or creation and use of new macros will be taken as illustrations other useful or entertaining nature. of the applicant's knowledge. Along with the TEX A dingbat family could be: files, each applicant should submit a letter stating a character in different orientations (such as a his/her job title, with a brief description of duties hand or flag), and responsibilities, and affirming that he/she will a character in different presentations (such as be able to attend the Annual Meeting and Short outline, solid, black on white, white on black, Course at Stanford University, Stanford, California, gray, .! August 21-25, 1989. . . Selection of the scholarship recipient will be a set of characters for doing border designs (TUGboat, Vol. 5, no. 2), based on the TEX sample. Judging will take place May 13-June 12, and the winner will be notified a set of characters for a particular use (TUG by mail after June 12. could use an anchor, a dinghy, a printing press, All applications should be submitted to the .. .), or Scholarship Committee at the following address: any reasonably useful, entertaining, or interest- Larry Sharlow ing character. 10 Toltec #3 TUG is holding this competition to encourage the Flagstaff, AZ 86001 use of complete TEX systems and to complement the initial system that was,created by Don Knuth and given to us all. It is hoped that this competition will contribute to excellence in fonts, graphics, and documents in general. 6 TUGboat, Volume 10 (1989), No. 1

Prizes explicit permission for unlimited redistribution lStPrize: $250 plus autographed volumes of the sources and characters on the same basis A through E of Computers & as 'l&X and METAFONT. This will include Typesetting. acknowledgement of the creator and TUG in 2"d Prize: $100 plus two autographed volumes of the sources in all redistributions. choice. 6. The artist/author's submission carries implied 31~Prize: $50 plus one autographed volume of agreement to abide by the terms of this an- choice. nouncement. It is expected that the judging Five Honorable Mentions: autographed volume of will be done by ballot of the members attending choice. TUG 89 but this is subject to change at the Conditions for Submission discretion of the Finance Committee of TUG. 1. The artistlauthor shall be the creator of the METAFONT sources and attest to the best of his/her knowledge that public distribution of these sources will not infringe on any known property rights. TUG will assist in efforts to determine that no property rights exist in any Editorial Comments submission. 2. Each submission should be a dingbat family or a Barbara Beeton single character. Each individual may make as Once again it's time to get organized and put all of many submissions as desired, but each should the good things I've seen before anyone else into a be on a different theme. The METAFONT nice neat package. The news from all over the world source shall be submitted electronically or on is that 'l&X continues to be both a challenge and a standard diskette, PC or Mac format. Other a useful production tool, and users are organizing formats can be approved on an ad hoc basis. regional interest groups as well as conferences of The METAFONT source must be compatible wider scope. See the calendar and the reports with plain. mf ; any additional METAFONT following it for details. macros that are necessary must be furnished and become a part of the submission. news 3. Each submission shall be accompanied by a As has already been announced, will text, in TEX, to explain its meaning, give be giving the keynote address at the tenth annual examples of its use, and show the character TUG meeting at Stanford, 21-23 August 1989, on in at least three sizes. These sizes should the subject of "The errors of w". His paper on be appropriate for use in textual documents this subject will soon be published in Software- and screen display. A range of lOpt to 72pt Practice and Experience. And occasional errors is considered appropriate. This text will be continue to be found (actually, I suspect the process the primary object studied to determine the owes more to careful excavation than to "luck" in awarding of prizes. most cases); the current versions are 4. Each character or family shall include a discus- 2.97 sion of one to five pages on considerations of PLAIN.TeX 2.94 design and METAFONT implementation. This METAFONT 1.7 discussion is for the purpose of pedagogy for PLAIN .MF 1.7 other METAFONT users. The discussion should Some changes have also been made to the CM fonts, be appropriate for inclusion as a part of a in the files possible companion to Volumes C and E, The CMBASE .MF METRFONTbook and Type- BIGOP. MF faces. Additional pages may be added for useful ROMANL .MF METAFONT macros. This source will also be SYM .MF considered as part of the basis for awarding of SYMBOL.MF prizes. These changes definitely affect all cmsy* and cmex* 5. TUG shall have the right to publish and fonts; if you have the capability, you should regen- use all submissions. Submissions shall carry erate these. Other fonts are also affected randomly TUGboat, Volume 10 (1989), No. 1 7 in various magnifications; the list is too long to The file -CHRONO- .DIR (there is one in every reproduce here, and it may not be the same for dif- subdirectory at Score) contains a chronological ferent resolutions or settings of blacker. You could list of the directory contents. -READ- .TUG and regenerate everything if you have the capability and TUGFIL. CHG describe the files in the directory and patience, but unless you are a distributor, a service identify any updates that have been made. center, or are actively shipping .dvi files to other These files are available from Score via anony- sites, you shouldn't have any problems if you wait mous FTP on the Internet. Copies have also been for someone else to to the job. installed in the archives at Clarkson and Aston, and The changes to TEX, METAFONT and the CM we are looking into ways to make them available fonts are posted in the errata list supplement bound from the TUG office for those who have no network into this issue. access. All changes have been communicated to all the implementors and distributors on my mailing list. More honors for Knuth If you are creating a new implementation of TpX On 7 October 1988, as part of the celebration and distributing it to other users, you should be accompanying the dedication of the new Center for receiving this information. Send me your name and Information Technology, Brown University awarded address (preferably an electronic address accessible Donald Knuth an honorary Doctor of Science de- via the Internet), and a short description of the gree, in accordance with the following citation. implementation you're working on. Donald Ervin Knuth Doctor of Science TUG boat selections on-line Computer science pioneer, mathematical typogra- The directory has been in existence pher, developer of the art of programming, concrete at Score.Stanford.edu for some time now, and slowly, mathematician, musician, and author, you are very slowly, items that have appeared in TUGboat renowned in many areas for your uncompromisingly are being installed for general use. The TUGboat high standards and your seminal contributions. In header files are there, of course - TUGBOT . STY for your you have caught the essence of computer use with Plain QjX and LTUGBOT. STY for I4QjX science. In your books you have made profound (as an article sub-style). Several sample articles and influential contributions to your fields. In your are present, along with a "driver" file that reads mathematical typography you have provided the in the (plain) headers and then the article files: glue for the expression of ideas, great and small. TUGBOT . TeX (the driver file), TBOHYF . TeX (the most Through your music you have elevated spirits. recent edition of the hyphenation exception list) Through your writings you have expressed artistic, and TBOCYR.TeX (the article from TUGboat 6#3 surreal, and transcendental connections. You have that introduced the cyrillic and AMS extra symbol been an inspiration to generations of colleagues and fonts). students. We honor you today as a distinguished Other items now available at Score include scholar and scientist who epitomizes the academic the .mf sources for Knuth's Punk fonts (TUG- life at its best. boat 9#2); 13 files named PUNK* .MF Propter scientiam egregiam et famam universalem .mf sources and the article and macros for et in rebus computandis et in musica litterisque, APL fonts (TUGboat 8#3); files APL*.TeX, auctoritate mihi commissa te ad gradum in Scientia CMAPLIO .*, and TBOAPL . TeX Doctoris admitto, omniaque jura atque privilegia tree diagrams by David Eppstein (TUGboat ad hunc gradum pertinentia tibi concedo. In huius 6# 1); files TREEDEF .TeX and TBOTREE .TeX testimonium hoc diploma tibi gravitate summa do. macros for form letters, MERGE. STY, by October seventh Howard R Swearer Graeme McKinstry (TUGboat 8#1, revised) 1988 Praeses hyphenation patterns for German (GERMAN- UNIVERSITAS BRUNENSIS HYPH .TeX), Icelandic (ICEHYPH . TeX) and Por- Providentize in Rhodiensis Insulze Republica tuguese (PORTHYPH . T~X); if anyone knows of other available patterns, please let me know. complete TUGboat tables of contents, files TB- CONT . DEF, TBvvyy .CNT for volume vv published in year yy and two driver files to produce the contents for volumes 1-5 (TBCVOS .TeX) and 6-10 (TBCVIO . TeX) TUGboat, Volume 10 (1989), No. 1

A TEX Encounter in Japan page 10; however, this is reproduced from a pho- tocopy of (unknown) laser printer output, so the Barbara Beeton quality has suffered. Mr. Tanaka informed me that On January 27, following a meeting in Tokyo of the l)$ software was provided by the ASCII Corp. ISO/IEC JTCl/SCl8/WG8 (whew!), the interna- (a long-time member of TUG). tional Working Group whose interest is in standard- Earlier in the day, I'd had a chance to speak ization of office and publishing systems, and from with Geoff Leach, a member of ASCII's publishing which the SGML standard was issued, I attended division staff. He informed me that the Japanese- a presentation devoted to introducing the family of language edition of The mbook will probably WG8 standards to members of the Japanese manu- appear early next summer; I'm looking forward facturing and business community. Two standards eagerly to seeing a copy. There seems to be were discussed in some detail: SGML (IS0 8879- a devoted, and growing, group of TEX users in 1986, Standard Generalized Markup Language) and Japan- there have been presentations on Japanese SPDL (Standard Page Description Language, still at the last two TUG meetings - and a tailored a working paper). Two others, DSSSL (Document edition of The pbook can only make it more Style, Semantics and Specification Language) and accessible. Stay tuned. Font Information Interchange (DIS 9541, an official draft, and the reason for my presence in Tokyo), were mentioned, but not described in detail. The rationale for SGML is similar to that for IP'-a document has a logical structure that is separate from its presentation, and formally indi- l&X Would Find It Difficult.. . cating this structure by markup enhances the value of the document content by making it transmittable From Donald Knuth: and processable. (A couple of talks on SGML were When preparing Concrete Mathematics I ran on the program at the August '88 TUG meeting in across [this] example of an unusual displayed for- Montrkal, and can be found in the Proceedings.) In mula in a paper by Joseph Bertrand (Journal de Tokyo, the focus was on how these standards could 1'~coleRoyale Polytechnique 18 (1845)). It's [an support the publication needs, both paper and elec- example] that Postscript will do with relative ease, tronic, of large organizations (one specific example while EX and METAFONT must work harder. We was the Department of Energy of the U.S. Govern- could pose it as a problem to get the nicest output; ment), and some demonstrations of SGML-based the French typesetting of 1845 leaves something to products - an editor and a markup aid - using an be desired. Curiously, Bertrand says he chose the example text in Japanese describing the tools and notation pour plus de simplicite'! prepared particularly for the Tokyo audience. All very interesting, but what does it have to Dksignons, pour plus tle si~r~j)licitci,par do with 'l&X? It turns out that the paper copy of the SGML talk, by Martin Bryan of SOBEMAP in Belgium, and Yoichi Tanaka of Toppan Printing Company of Tokyo, was prepared using m,more specifically JIPW, as the formatter. This is a natural pairing of the two systems-SGML for structural markup, and T@ for formatting. For the demonstration, l)$ was running on a workstation, and changes to the text could be processed immedi- ately; an impressive display, as always. The authors kindly provided me with the original typeset out- Editor's note: Are there any takers? put of the talk; the first page appears on page 9. To prepare this copy, was run on a FACOM (Fujitsu) computer, and the output sent to a Hell Digiset phototypesetter at 900 dpi. The beginning of the input used to prepare this copy appears on TUGboat, Volume 10 (1989), No. 1

SGML/W t3-&WJ('/zf..L

Martin Bryan SOBEMAP/ tP?F-- LhEEPErl (%)

1989% 1 El 25 B

FJ'FqlL%Qb:f L\TDTP 2dTI-~2 f~ 9. + qlLEl*D DTP Zq??~bT 2dfT5,2hTL\ a07- FY~+~YV~~E~Z&@@~Z~TA~&

&;5:, 4FX$3232p~-9~@@T3Z2bL2-3 I:< %!JEjDz?b:7'L,T~~30 3Y!?r-92 HL\TEPR~~%~~Li Z 2 12. .tk%H& < dl2>%Tf~ bhTL.T, E*T% 1970 qO&&,tC 9. %H R, ~~~rle4i2wxCTS 2 27 L~~MWh fzo %~T1L%HZSO~~a'100%753 2 9@@?hTL\3. 2T5T, T&2>032f2-9Y-9Thz5 StB'EPE2fB i Z?&FR%bL. %G"i % 25 < nBDl'J EB2tZ;;X-cR9, st$$Lb:'f~zEME2fgL~~.

3. 7- F~'D+ Y VDT*- 9j~~#$ul'J2?j~.ii~d~~ L\bh?-L\6T 2 Th3. I%%%&%DER1t:71fT -if&-+?, 5 ~,~:ZDBU%J:~L9 331k,ba ~IzFT~~~Y~x.CD-ROM. fhYDk5 72.. 25t%tL$.r'-rPb:k ~~E%Z.--dd~g,~-;, 73 TL.6, T DI:&~~S~R%~LEP~IIIZ~~T~L~L <.8 < D77"J 9-2 s '/bZGMT3 6&gdT

'Standard Generalized Markup Language 2Desk Top Publishing 3Computer Typesetting System 4Document Composition Facility TUGboat, Volume 10 (1989), No. 1

16 The File TUGboat, Volume 10 (1989), No. 1

environment has support for automatic production Software of indexes for books [8], support for bibliographic material (31, spelling checkers, and other document- related utilities. Cf. [5]. News from the VOR~Project Our current system uses workstations with bit- map displays running under the UNIX operating sys- Michael A. Harrison* tem and the X window system [12]. Some subsys- Computer Science Division tems also support SUNVIEW.In order to provide University of California, Berkeley device independent high quality graphics, we use Introduction Postscript [1,2] and have written a Postscript in- terpreter. We are developing methods to interpo- This is a report on the current state of the Vim late Postscript into our displays. Future research project as it relates to the community. The plans include supporting composite objects, sym- project has been running for over three years. Our bolic mathematics, hypertext documents, audio, live research funding has been extended, but we will be video, etc. A key element will be access to a persis- evolving in non w-compatible ways. We expect tent object base which is important for many appli- to publish traditional research papers on the novel cations. aspects of our work. Cf. [7] for a summary of a The VO~prototype is running and did pass number of issues underlying this work. Design issues the traditional Trip test [lo], as well as the more are discussed in [6]. demanding Trip* test required of incremental doc- This brief summary will tell you what software ument processors [9]. Because the w processor is we will have available for use by the research com- based on Pat Monardo's C-?'E)i. the system is fast. munity; it can be licensed commercially as well. By Some timing data are reported in [9]. The most the time you read this report, all of the systems dis- challenging part of VOR~is the reverse mapping cussed should be available. mechanism. To handle some of the semantic diffi- The original goal of the VOW project was culties, functions in VLisp are used to implement to create an integrated document preparation en- reverse mapping. Only a few are implemented in vironment capable of producing high quality tech- the current prototype. nical documents which involve mathematics, text, The VO~prototype will be available on the and graphics. In VO~,both source and target distribution sometime in January 1989. As the sys- representations of a document are maintained and tem currently stands, it will require a great deal of presented. The source representation refers to a m work to make into an industrial-strength system. It document in its original unformatted form; the tar- served our purposes admirably because we found out get representation presents its formatted result. The what we did right (and wrong) and this will influ- user can edit both representations using a text ed- ence the design of its successor. itor and what is called a proof editor, respectively. We have produced another system called Our editor is an Emacs-like editor written in our INCTEX, derived from Vim, which we think own VLisp (VomLisp). Changes made to one will be useful immediately to the community. representation propagate to the other version au- INCTEX is an incremental w It is very tomatically. It is easy to support source modifica- fast and is more efficient in its use of memory than tions that cause the target representation to change. Vm.It supports quiescence checking, conver- but a major challenge was the transformation from gence testing, etc. (cf. [9] for definitions). It creates a target version back to the source version. The a DVI file and checkpoints some state information for original design ideas are described in [6]. The sys- each page on the first run. On subsequent runs. only tem reformats a document and redisplays it on the those parts of the document which have changed screen incrementally. Only the part of the docu- are reprocessed. When running I4?'E)i incremen- ment or the subregion of the screen that is affected tally, no unnecessary passes are used. INW,un- by recent changes is reprocessed. The document like V-, is editor independent and is designed *Sponsored by the Defense Advanced Research to avoid parts of the operating system which would Projects Agency (DoD), monitored by Space and hamper porting. Naval Warfare Systems Command, under Contract INCTEX has not passed the Trip' test as of this No. N00039-88-C-0292. Additional funding came writing, but works well enough to process many re- from the California MICRO program (Grant 88-083 search papers and a 200-page dissertation. IIGTEX in conjunction with IBM). 'Any flavor of T@ you want, not just plain m. TUGboat, Volume 10 (1989), No. 1 should be a very valuable extension to the family of Table 1: Font Equivalents '@X processors. Berkeley Fonts Old Favorites

Graphics ag-book Avant Garde-Book PostScript was chosen as the language for speci- ag-bookobl AvantGarde-Bookoblique fying graphics [2,1]. We have a PostScript inter- ag-demi AvantGarde-Demi preter which runs under X10(R2), and under SUN- ag-demiobl AvantGarde-DemiOblique VIEW.This interpreter is available for distribution. b-demi Bookman-Demi The system involves a base interpreter and separate b-demiita Bookman-DemiItalic programs for interface to various window systems. b-lig Bookman-Light Some of the algorithms used are original and will b-ligita Bookman-LightItalic be published. While the interpreter is still only a h-bol Helvetica-Bold prototype, it has been used in some commercial im- h-bolobl Helvetica-Boldoblique plementations, and can be extended and optimized. h-med Helvetica Perhaps some Berkeley MS students can be induced h-obl Helvetica-Oblique to do the remaining tasks (like porting to Xll(R3)), ncs-bol NewCenturySchlbk-Bold but we have neither the resources nor the mission to ncs-bolita NewCenturySchlbk-BoldItalic develop commercial-level software. Several vendors ncs-ita NewCenturySchlbk-Italic have more robust PostScript systems, but we will ncs-rom NewCenturySchlbk-Roman distribute our source code and encourage you to im- pbol -Bold prove on the interpreter. pbolita Palatino-BoldItalic pbolobl Palatino-Boldoblique Fonts pita Palatino-Italic As part of the PostScript interpreter project, we p-obl Palatino-Oblique needed outline fonts. It was possible to write a Post- prom Palatino-Roman Script program which calculates the coordinates of t-bol Times-Bold the points on the outline curves for any font which t-bolita Times-BoldItalic is native to or may be downloaded into a PostScript t-bolobl Times-Boldoblique printer. From this data, one can automatically con- t-ita Times-Italic struct outline fonts using well known spline tech- t-itaun Times-ItalicUnslanted niques. Thus, we have available 35 outline fonts t-mathita Times-MathItalic which are on the distribution, together with the sup t-obl Times-Oblique porting software. These fonts use our own outlines t-rom Times-Roman but are congruent to some well known fonts. Ta- zc-medita ZapfChancery-MediumItalic ble 1 lists equivalents for the more interesting out- zd ZapfDingbats line fonts. Having outline fonts is important, not only for the use of the interpreter. Of course, you can do illustrations like Figure 1. The A's in Figure 1 are Screen Previewers from our t-rom font. DVItool is a previewer for DVI files which runs on We can generate a full set of pk fonts for Table 1 the SUN workstation. This system is very robust, for use with our previewers. We have an awk script handles arbitrary DVI files, and provides a great which converts our outlines into the . cf format used many features. It is a full tool in the sense of the by the TYPO editor [13]. This editor, written by SUN window system and can be adjusted to any size Jakob Gonczarowski and marketed by Typograph- the user finds appropriate. It is possible to keep a ics, Inc., is very useful. Among other features, it small window on the screen for previewing at the converts between various descriptions and font for- same time a source window is present. This is ex- mats. Thus we can automatically convert from our tremely valuable in debugging. Changing the view outlines into Metafont files and hence into your fa- you have of a page is instantaneous. All magnifica- vorite format. tions are supported. Forward and reverse searching Other Systems for strings in the DVI file is implemented as well as the ability to select a character and display its font There are many other subsystems available and a The previewer may be customized. brief outline of some of them is given below. TUGboat, Volume 10 (1989), No. 1

tries [3]. Functions exist for copying and duplicat- ing fields from previous entries, etc. One particu- larly useful option is preparing a draft bibliography which includes numerical references, symbolic refer- ences and a formatted version of the entries. An- other of the options allows previewing on the SUN or printing on any of your local printers. This sys- tem interfaces nicely with the DVI display programs mentioned above. It takes many pages of single- spaced text to explain all the options. Cf. [4.3,8]. There is also support for dealing with indices and for online-reference inspection. [ll] Licensing Since we are a research project, we publish our work in scholarly publications and distribute our research software at a nominal charge. We have established site licenses of various kinds to simplify acquisition of the software. We do ask that researchers who have found bugs or make significant extensions let us know about them. In the past, commercial licenses have been ne- gotiated separately, but this has proven to be too costly for us in terms of time. To simplify matters, we will now license the entire distribution for a fixed fee without royalties We are adding the new software to the distribu- tion at this time and hope that it will be complete by the end of January 1989. Credits Figure 1: Some advantages of outline fonts. The following people have written or made major contributions to the software being distributed: Pe- hong Chen, John Coker, Michael A. Harrison, Paul DVI2x is a previewer for DVI files which runs N. Hilfinger, Dan Hydar, Jeffrey W. McCarrell, Ikuo under the XI0 window system. It has a number of Minakata, Pat Monardo, and Steven Procter. the same features as DVItool such as customizable SUNVIEWis a registered trademark of Sun Mi- key bindings. There are user definable functions, crosystems Inc. The X Window System is a reg- rulers, and side-by-side display of two pages. This istered trademark of M.I.T. Helvetica, Times, and program is quite fast. Palatino are registered trademarks of the Allied Cor- DVIZXII is a previewer for DVI files which runs poration. Avant Garde, Bookrnan, Dingbats, and under the Xll(R3) window system. It is similar Zapf Chancery are registered trademarks of the In- to DVI2x but is more than just a simple adaptation. ternational corporation. The graphics have been improved and the scroll bars are draggable. This version is now faster than texx. References Adobe Systems, Inc. PostScript Language Environments Manual. Addison-Wesley Publishing Company, We distribute a large LISP library for use with Reading, Massachusetts, 1985. ISBN 0-201- emacs. We work with the gnuemacs version. This 10174-2. is intended for use with T#, I4Wand BmW. In Adobe Systems, Inc. Postscript Language addition to the most elaborate mode known [4], Manual: Tutorial and Cookbook. Addison- the user is assisted in creating .bib files, and given Wesley Publishing Company, Reading, Mas- forms-based assistance in filling in bibliographic en- sachusetts, 1985. ISBN 0-201-10179-3. TUGboat, Volume 10 (1989), No. 1

[3] Pehong Chen. Gnu emacs BIB?)C-mode. Tech- An Enhanced =-Editor Interface for VMS nical Report 871317, Computer Science Divi- sion, University of California, Berkeley, Cali- Adrian F. Clark fornia, 1986. Essex University [4] Pehong Chen. Gnu emacs m-mode. Techni- The author described various enhancements to the cal Report 871316, Computer Science Division, Stanford distribution of ?)C under VAX/VMS in a University of California, Berkeley, California, couple of previous articles. The most significant of 1986. these was to allow an editor to be invoked (by typing [5] Pehong Chen, J. Coker, Michael A. Harrison, 'e' or 'E') when ?)C spotted an error in its input file. J. McCarrell, and S. Procter. An Improved The editor which was interfaced to TEX at that time User Environment for ?)C. In J. DesarmCnien, was TPU. Since then, a number of requests have been editor, Q$ifor Scientific Documentation, Proc. made for interfaces to other editors, usually EDT. 2nd European Conf. Strasbourg, France. June The author is pleased to announce that this has now 19-21, 1986. Lecture Notes in Computer Sci- been done, in a way which is fully compatible with ence, No. 236, pp. 32-44 (1986). the previous editor interface. This note discusses the [6] Pehong Chen, John L. Coker, Michael A. Harri- interfaces to the editors usually encountered under son, Jeffrey W. McCarrell, and Steven J. Proc- VMS and shows how other editors can also be used. ter. The Vimdocument preparation envi- VMS is supplied with a number of editors: EDT ronment. In J. DesarmCnien, editor, T)$t for and, latterly, TPU are the most widely used, but Scientific Documentation, Proc. 2nd European Real Programmers and people who have used other Conf. Strasbourg, France. June 19-21, 1986. DEC systems sometimes prefer TECO; those of us Lecture Notes in Computer Science, No. 236, who remember the bad old days under VMS 1 will pp. 45-54 (1986). c probably be familiar with SOS (which, although un- [7] Pehong Chen and Michael A. Harrison. Mul- supported, can still be acquired through DECUS). tiple representation document development. There are also layered products which provide edi- IEEE Computer. 21(1):15-31, January 1987. tors, such as LSE (language-sensitive editor) and a UNIX-compatible ed in DECshell. And, of course, [8] Pehong Chen and Michael A. Harrison. Index there are third party and public-domain products - preparation and processing. Software, Prac- for example, Gnu Emacs and STE, the Software Tools tice and Experience, 18(9):897-915, September editor. 1988. The basic strategy for invoking an editor from [9] Pehong Chen, Michael A. Harrison. and Ikuo ?)C is (in VMS jargon) to spawn a sub-process Minakata. Incremental document processing. which executes a DCL command to edit the erro- In Proceedings of the ACM Conference on Doc- neous 'TEX input file. When the corrections have ument Processing, New York, December 1988. been made, the editor is exited, the sub-process Association for Computing Machinery. deleted and control returned to the T)$ session. [lo] Donald E. Knuth. A torture test for w. However, sub-process creation and deletion is rather Technical Report STAN-CS-84-1027, Com- slow under VMS, so invoking editors in this way can puter Science Department, Stanford University, give an unsatisfactory response on systems with a Stanford, California, November 1984. significant load. For this reason, both TPU and EDT [ll]Ethan V. Munson. Enhancements to Bibliog- are callable, i.e. they can be invoked as procedures raphy Management. Master's thesis, Computer from ?)C; this gives a much better response. Science Div., University of California at Berke- To decide which editor to use, w looks at the ley, 1988. logical name TEX$EDIT (by analogy with MAIL and [12] Robert W. Scheifler and Jim Gettys. The X other utilities). This should translate to the name window system. ACM Transactions on Graph- of the editor to be used (see below). If the logical ics, 5(2):79-109, April 1986. name is not defined, TPU is selected, for compatibil- [13] Typographics, Ltd., Jerusalem. TYPO Font ity with the previous version of the editor interface. Editing System, Reference Manual, 1988. Following selection of the editor, w translates the logical name TEX$EDIT-INIT, which should give the initialisation file for the appropriate editor. (For TPU, if TEX$EDIT-INIT does not exist, trans- lates TEX$TPU-INI, again for compatibility with the TUGboat, Volume 10 (1989), No. 1 15 previous version.) What happens next depends on The Virtual Memory Management of the chosen editor. PubliC TEX For TPU, a scratch file is created and the con- tents of any initialisation file copied to it. Com- Klaus Thull mands are added to position the cursor at the place Last summer in weter, I promised a public where spotted the error. The scratch file is then domain 'I)$for the PC. At that time I had solved used as the TPU initialisation file. After exiting the the compiler related (arithmetic and idiosyncratic) editor, this scratch file is deleted. problems and had passed the trip test. For a The process for EDT is similar: an initialisa- production version, capable of IP7&X, PICI'EX and tion file specified via TEX$EDIT-INIT is copied to a d~S-w.I still needed a Virtual Memory scheme scratch file which is used to initialise EDT. However. which was promised me at weter but never it is not possible to position the cursor exactly at arrived. This I did then on my own. following some the erroneous text automatically (EDT is somewhat advice from "The Art of Computer Programming." lacking in this respect), only to the right line. So the tested it thoroughly, and completed a production command sequence GOLD M is defined, which can be version last autumn. For a while now this "Public used to position the column correctly by hand. TJQ? is up and running, and has passed some few Since both TPU and EDT are callable, but only tests and productions. one can be used in a particular session, it is This TFJ does pass the trip test, I am proud obviously somewhat inefficient to have both per- to announce. On all accounts it is a fully developed manently linked (they are both quite large). For- specimen, capable of heavy work, and has proven tunately, both editors are implemented as sharable reasonably stable. It can be configured with images. This allows to determine which edi- full memory and font space since these two are tor to use via TEX$EDIT, then load the appropriate virtualized. The other table spaces must fit into sharable image using the run-time library routine real memory but even under Novel1 conditions which LIB$FIND-IMAGE-SYMBOL before invoking the editor. leave ca. 450-500kB this seems to be sufficient for With the possible exception of LSE, which is generous sizes. The setting I use now has grown out TPU-based but not available to the author, the other of some experimenting with large runs in narrow DEC editors are not callable, and must be invoked, conditions. Some of those large runs have been as would a non-DEC editor, by spawning a DCL done with the new PubliC TEX. command. Of the non-callable editors, only TECO As yet, this TFJ is still slow. Its speed is can position the cursor in its initialisation file. How- ca. one fourth of that of its big commercial brother. ever, input to TECO is split into pages (i.e., TECO On a lOMHz NCR AT-Compatible, it takes about makes a single pass through the file with a buffer 20 seconds for a plain page, and 30 for a I4w of finite capacity), so it is not wise to position the cursor automatically. Instead, a macro is defined in page. This 7&X does not need the co-processor any- q-register '1' to perform the positioning. more. Since TURBOPASCAL'Semulation knows only Any other editor is executed with a fixed se- a 6-byte real datatype, some hand-coded conversion quence of command line arguments, separated by is used for float and unj-loat. spaces: the file to be edited; the erroneous line; is accompanied by the complete mware the erroneous column; and the initialisation file (if and the complete GF- and PK-ware. MFT and META- any). This allows a DCL procedure to be specified FONT are still missing but I am working at that. as TEX$EDIT, permitting editor-specific processing. I won't do anything about PXL-ware, yet I intend For example, the trivial procedure for use with SOS to do a PK~OCH/CH~OPKpair in order to have some would be: font editing facility. $ DEFINE/USER SYS$INPUT SYS$COMMAND: The entire sources are publicly available at $ sos 'PI' [email protected]. The change file and editor-specific code The Compiler: The compiler of my choice was for T@C 2.95 can be obtained by contacting Borland's TURBOPASCALwhen version 4 was an- the author at either alienQuk.ac.essex.ese or nounced. This was the version introducing large alienQuk . ac . kc1 . ph . ipg. Both these addresses memory model. multi-module compilation and 32- are on JANET, the U.K. academic network. The bit integers. change file also features a large (>64K) memory, For once, I experienced a p compiler which to enable the production of F'$IQ$ graphics and deserves the name (but then, I am a spoiled halftone images. TUGboat, Volume 10 (1989), No. 1 mainframe user). Where I do not have to wait many hh ighfkj b f h hours for a compilation. In fact, I have to wait 5 ii ffifil i minutes of which 4 are TANGLE time. Where I didn't ii ilhjf i ii dkld f h have to spend several weeks only to trace down ije glie h compiler bugs. Where 110, type conversion and kihf hl f i arithmetic behavior is handled somewhat sensibly. ilhkc hij i i Where code generated is decently small. W'ssize jilh giijg h is about 180k. Imagine my tears. iihg ilh c h ihgkjjji jf g i Of course, there are idiosyncrasies, and one ihkkffi ige e h (maybe-)bug. There was, of course, line-break's eii jlh i g i standard feature turning looseness of -2 into 65534 ihdilkdi fg h which is displayed by every 16bit compiler. There iifgklfigdif g f was one new casting bug in tangle which spoiled ii dikgicfkh 1 fhefhfighhhkhgfdch f try-break. Some more things like that. dheeb ej j cbcd Nevertheless, this compiler has passed its 'I'EX dgcihfhi ggb d test with all jets flaming, I think. A thousand bcbbhj idebegb b thanks to its makers. dbe ehf ijhjed fifiijhihghd d Virtual Memory w: mem and font-info are ekichijhhccigi iegjia the two tables virtualized. These two are the djie ehgd cihi ghih largest, and-alas-the ones accessed most, I sus- iiceikhcdcjeh cejf ijegkkh dejdi ekgf pect. I chose to devise a swapper governing one hh gkif cg h je real memory page pool to serve both tables. This dii jlhff fh i jgg scheme might be extended to include other tables iigkkifg jicifd hjg one day. Next on the list are INITEX'S hyphenation chgchjjffcehee degf generator tables since for INIW conditions do get chge jk jf f chhee ddf gf b e deekligi ijghia kg bd fi ej narrow. cdcbj jfcf gfbbbb hb ech For testing memory access, I had an early, ccbbhkf e ffbb gb d small, pre-VM version of TEX, sufficient for WEBS, output a memory access log for mem and font-znfo. Figure U: This is the memory access log over Then I took a couple of 10-20 page web logs as the last three pages of a 20 page .web (containing input data for statistics and simulation. the index, the section list, and the TOC) using Here are some results of investigating said data the original memory access scheme recorded in The as well as of experiments with the completed Virtual Wbook. Memory TFJ. Each line logs, for 10000 accesses, their distri- Basically, one printed page takes about 200000 bution over the 256-cell memory pages. Each letter memory accesses. This number of course grows denotes the log, of the number of accesses of that for m,and also for huge paragraphs. The memory page (a:l, b:2, c:4 accesses, etc.). maximum record is held by my own prime number This picture covers ,mern's single node area plotter with 6 million accesses, followed by a certain only. The right part covers the macro area and the QC&X page with 2 million accesses. About 3 left part the character node area. to 4 consecutive accesses are on the same 256-cell memory page, in the average. This fact is yet to locality of accesses; non-locally there are macro, be exploited to construct the 'very fast' memory font, and glue references. access. Investigating swap decision algorithms, the W's memory access behavior itself may be most important factor happened outside the swap- deemed "semi-local" which loosely means: of a row per: locality gets lost over the run of printed pages. of consecutive memory accesses. some portion of Free list gets scrambled, and after, say. five printed them access a locally limited area. Over the long pages locality is virtually non-existent. To restore run, the area may change, but then the new area locality, I constructed a free list sorter. Indeed. is another locality area. In the case of TFJ, the on the PC the sorting decreased the number of access pattern is clear: the paragraph, the formula, page faults by 10% under favorable conditions (100 the one macro under construction, each make for available memory pages) to 112 under narrow con- ditions (30 mem pages). Figures U and S, which TUGboat, Volume 10 (1989), No. 1 17

ljkkiaecajaflj fh h the number of swaps while the average number kl j i of consecutive accesses of the same memory page m k i never exceeds 4. A smaller size increases page kl j h translation table size which is now 3.3k (Memory m k i page size x page translation table size = const). lj k i rn j h When memory page size is 256 cells and mem- mk j i ory is 512k (which is likely under Novell) then jl k i INIW obtains 12 pages swappable memory, and dl jge ei VIRW about 120 pages. In that case, one average jm k i mj i I4W run takes about 100 memory page swaps per kl k i printed page. This is a tolerable low swap rate, feddem j dfdh i I think, and so I won't spend too much time in ijgc i dh e speeding up swapping. j j iji d 1. Public w's Memory handler. Here the h c jj dh two memory handling components are given in detail gjjj ijji d since they are the central part, I think, of the PC port. The solutions presented here may transcend jjjjjj d TURBOPASCAL,and may allow for porting the WEB- jaahgaijklkkj j ifhjia to-C stuff, which is on the tape now, to small k k h jh machines. Furthermore I would like to see others kk k i 3g hl k i jgf improve it. hkl j i kgg A few details are left off, like most of the hjldc a j i d hjg debugs, the procedure call cross referencing needed ikii f h f fgf for TURBOPASCAL'Sunit mechanism, and the ijkf h ' gf use-assembler switch, since they just clog up the ijkjjjj h gf klhf gajj kjkkkj idf ka text without adding clarity. jlc g b bbi format debug begin ilk f f - format gubed end I hjjj jkjjkjkkkj fhgf d - format stat z begin Figure S: This image records the memory accesses format tats r end during the same pages as in Fig. U to the same format fakebegin - begin memory area, using the same recording conventions, format falceend - end but this time a free list sort is employed at the end 2. For a change, TURBOallows clean memory of every ship-out . management due to an undoc~mentedfeature. This Note the locality visibly in effect now. Note also feature is not PASCALas defined but, at least, it is the increased number of accesses vs. the decreased cleaner than other constructs I saw used on 16bit number of accessed pages per Iine. machines. (0 ye nameless compilers, get you gone into oblivion, and speedily.) If, say, memp(x) is a function returning a pointer of some type, then TURBOaccepts memp(x)f +- something, and it does the right thing. This feature comes in handy are compiled from corresponding mem access logs, here. demonstrate the difference between the unsorted define mem(#) G memp(#)f and the sorted case. define font-info (#) E fmemp (#) f Also, when I installed the free list sorter on PCS Cadmus which now is a paging system, it (Types in the outer block 2) z seemed to me that throughput increased by 10% p-memory-word = f memory-word; while the sorter itself adds ca. 1% of CPU time. mem-pc-index = 0 . . max-mem-piece; I would like to see this measured under controlled mem-piece = array [mem-pc-index] of conditions (Size of the Working Set? Number of memory-word; page faults?). At PCS, I cannot do that. p-mem-index = p-mem-min . . p-mem-max; Memory page size of 256 cells (which is lk) is p-hem-index = 0 . . p-fmem-size; just the right compromise. A larger size increases 18 TUGboat, Volume 10 (1989),No. 1

mem-index = mem-min . . mem-max; follower: slot-p; { to simplify traversing) fmem-index = 0 . . font-mem-size; stamp: time-stamp; {or the RU-bit ) See also section 5. contents: mem-piece ; { the actual page ) 3. Here, of course, is the original reason for just end; that mem page size: these functions yield one-byte 6. These are the page translation tables for mem moves. Everything else would result in some kind and font-info. of shift. (Locals for virtual memory handling 6) E define mem-piece-size = 256 p-mem: array [p-mem-index]of page-rec; {size of a memory piece, must be 256 p-font-info: array [p-fmem-index]of page-rec; in order to use lo and hi ) slot-rover : slot-p ; define max-mem-piece = mem-piece-size - 1 new-slot: slot-p; { min-mem-piece = 0 ) slot-count: 0 . . max-slots; define mdiv (#) = I,hll(#) { number of slots allocated hitherto ) define mmod (#) = a(#) page-count: 0 . . 511; {number of external pages define fdiv (#) - I,hll(#) allocated so far ) define fmod (#) - m(#) clock: integer; stat swap-no: integer; tats 4. The swapper. w's mem and font-info See also sections 7 and 20 cannot be made smaller than, say, 70000 cells or 300kB memory if T@ is to be more than a toy. 7. Our external memory is on disk. We collect Yet, with the program proper being 180k and the all the operations at this place so you can devise other tables somewhere around 200k, this clearly something different if you so wish. exceeds a PC. So some form of memory pager must define write-ext-mem-end (#) = be provided. fakebegin write (mem-file,#) We let mem and font-info use same slot pool, end same swapper, and same external memory. Later, format write-ext-mem-end end when we build 64-bit w, INIm's hyphenation define write-ext-mem (#) - generator tables and/or eqtb may be included. One begin seek (mem-file , integer (#)); would do this by record variants on contents. write-ext -mem-end We let slot space and external memory grow define read-ext-mem-end (#) - with use. fakebegin read (mem-file , #) define max-slots = 300 end format read-ext-mem-en,d end 5. Central Intelligence Agency is the page trans- - define read-ext-mem (#) lating table. It contains entries for the page slot - begin seek (mem-file , integer (#)); allocated (or no-slot) and the external memory read-ext -mem-end index (or no-page). define open-ext-mem = set-ext-mem-name; define no-slot - nil assign (mem-file,name-of-file); define no-page = -1 rewrite (mem-file); (Types in the outer block 2) +- write-eat-mem (0)(new-slot T. contents); time-stamp = integer; define close-ext-mem = close (mem-file) page-p = fpage-rec; slot-p = rslot-rec; (Locals for virtual memory handling 6) +- page-rec = record mem-file: file of mem-piece; page translation table record { ) 8. It is convenient to pre-allocate one slot to a slot-ptr: slot-p; {pointer into slot allocated, convenient page, probably the mem-bot page which or no-slot ) is the first one to be accessed anyway. Actually, ext-nr : no-page 511; . . external memory must be opened here. { pointer into external memory ) end; define for-all-mem-pages-do r slot-rec = record for i t p-mem-min to p-mem-max do { inline memory page descriptor ) format for-all-mem-pages-do xclause page-ptr : page-p ; define for-all-fmem-pages-do E { pointer into page allocated ) for i t 0 to p-fmem-size do TUGboat, Volume 10 (1989), No. 1 19

format for-all-fmem-pages-do = xclause NRU might prove the faster, else LRU-contest is define first-page-no E p-mem-min still open. ( Get virtual memory started 8 ) = Objection to LRU may be the fear of the clock {initialize entire system) overflowing with huge or intricate jobs. The simple for-all-mem-pages-do WEB file I logged showed ca. 200000 accesses per with p-mem[i] do printed page, and, while I still wait for a chance to log a large table or a PIO~Xjob, let's assume begin ext-nr +- no-page; slot-ptr +- no-slot end; 1000000 accesses for a page at the worst, and for-all-fmem-pages-do you still have two thousand pages to go! Which with p-font-info [i] do leaves one to meditate on the magnitude of a 32-bit begin ext-nr + no-page; slot-ptr + no-slot integer. end: A variant not investigated yet is to step the clock at swap time only. {now allocate first slot ) As it turned out, a PIC'&X page does take new (new-slot); about two million accesses, and my own Third Root with new-slot T do of Unity Primes Generator took six million accesses begin follower + new-slot ; (and 12000 swaps). page-ptr +- addr (p-mem Brst-page-no]); define use-LRU stamp + 0; - end; define use-LRU-end define use-NRU Q{ slot-rover +- new-slot; slot-count +- 1; - define use-NRU-end zQ) { and connect it to first page, also aquire first format use-LR U begin page of external memory ) = format use-LRU-end end open-ext-mem; - format use-NR U zi begin with p-mem Brst-page-no] do format use-NRU-end end begin slot-ptr +- new-slot; ext-nr +- 0; - end; 11. These procedures describe the basic, non- page-count +- 1; swap access which must be fast. So I use with to stress that fact. Actually, this might be done clock + 0; in assembler, and page-ptr and slot-ptr kept in a stat swap-no +- 0; tats register for further reference. See also section 21. define not-in-memory (slot-ptr = no-slot) 9. We investigated five different swapping algo- - define access-it (#) rithms. Essentially, they are variants of the First In - begin {at this point, slot-ptr points First (FIFO), the Least Recently Used (LRU) Out to the in-memory page) and the Not Recently Used (NRU) algorithms. # + addr (contents[mmod (p)]); - The FIFO algorithm throws out the page which useLRU stamp + clock; has been in memory longest. useLRU-end - The LRU algorithm sets a time stamp per useDRU stamp t 1; use-NRU-end access and, in case of swapping, the slot with end lowest stamp is thrown out. The subcases (Include system and memory management concern resetting of timestamp at swap time. here 11) - The NRU algorithm sets a stamp per access - ( I need fetch-mem here 13 ) and, in case of swapping, looks for a null stamp function memp(p : pointer): p-memory-word; and clears a selection of stamp. The subcases begin use-LRU incr (clock); concern the nature of that selection. useLRU-end 10. Only two of the algorithms studied so far with p-mem [mdiv (p)] do turned out to be worthwhile, namely the LRU begin if not-in-memory then without clock reset, and the NRU following Knuth's fetch-mem (addr (p-mem [mdiv (p)])); modification. So these two we keep. The NRU with slot-ptr7 do access-it(memp); showed ca. 5% more page faults than the LRU but end; is a trifle faster in the non-page-fault access. So in end; case there are few page faults and/or a fast swapper, function fmemp (p : pointer): p-memory-word; TUGboat, Volume 10 (1989), No. 1

begin useLRU incr (clock); ext-nr + page-count; useLRU-end incr (page-count); with p-font-info [mdiv(p)]do end begin if not-in-memory then end fetch-memtaddr (p-font-info Vdiv (p)])); 13. This describes the outline of the swapping with slot-ptr do access-ittfmemp); T procedure. It is not required to be streamlined if end; swaps are minimized since slow anyway. Yet some end; indication is, again, given by the use of with. See also sections 17 and 18. (I need fetch-mem here 13) 12. We describe the basic operations for swapping. - procedure fetch-mem(p : page-p); Note the nesting of with clauses making for simpler var mzn-stamp: tzme-stamp; s, t: slot-p; expressions and (hopefully) faster programs. i: znteger; define secutor (#) ze #t.follower begin if more-slots then define more-slots - ((slot-count < begin (Fetch a new slot, let slot-rover point max-slots) A (mem-avail > 10000)) to it 14); define fakerepeat = with slot-rovert do an-zt (p); {syntactic sugar for WEAVE) end define fakeuntil E else begin {decide which page to throw out, format fakerepeat = repeat let slot-rover point to it ) format fakeuntzl untzl useLRU (Use the LRU 15); useLRU-end - use3RU (Use the NRU 16); use_NRU-end define rove-all-slots - { up ti1 now, nothing happened except begin s + slot-rover; repeat with st do slot-rover moving around ) fakeunt il with slot-rover? do fakeend begin out-zt; define rove-slots-begin { the old page, that is. We assume, as - in our TEX, that we cannot discern begin fakeend define rove-slots-end r between read and write accesses) fakebegin fakerepeat fakebegin end: zn-zt (p); { the new one ) s +- secutor(s); end; until s = slot-rover end; end end; format rove-all-slots = xclause This code is used in section 11 format rove-slots-began - begin 14. This allocates a new slot. format rove-slots-end r end ( Fetch a new slot, let slot-rover point to it 14 ) = define out-it - begin new (new-slot); with page-ptrt do with new-slotf do begin stat incr(swap-no);tats begin follower t secutor(s1ot-rover); write-ext-mem (ext-nr)(contents); slot-rover j. follower t new-slot ; slot-ptr +- no-slot { disconnect page end; from this slot ) incr (slot-count); end { now the new slot is officially present ) define hit(#) r slot-rover + secutor (slot-rover); with #t do end begin { argument is a page pointer, This code is used in section 13. slot is on slot-rover ) 15. Least recently used. slot-ptr +- slot-rover; page-ptr t #; { connect new page ) ( Use the LRU 15 ) r if ext-nr # no-page then begin min-stamp +- clock; t +- slot-rover; read-ext-mem ( ext-nr)(contents) rove-allslots else begin wrzte-ext-mem (page-count ) roveslots-begin if stamp < min-stamp then (contents); begin min-stamp + stamp; t +- s; end; TUGboat, Volume 10 (1989): No. 1 21

roveslots-end; list(s) at certain times such as to reflect physical slot-rover + t; neighbourhood again. end This amounts to a Sort. A full sort, however, This code is used in section 13. is out of question, it may take up to 16 sweeps 16. Not recently used. We realize Knuth's through the list. It is not necessary even, since there is no harm in a scramble inside a memory suggestion to switch off used-bits for those pages only that are touched during the search process. page. So we do one sweep with as many buckets as there are memory pages, then recombine. What Pages whose bits stay on then may be termed follows, then, is straightforward. (Really? I did "recently recently used." crash. Where, Dear Reader, I won't tell you. You define recently-used(#) =- (#T.stamp # 0) find out as an exercise.) define un-use-it (#) = #T.stamp + 0 The proper place for this to be inserted is right ( Use the NRU 16 ) - after the grand free-node-list at the end of ship-out. begin slot-rover + secutor(s1ot-rover); define mem-page (#) mdzv (#) while recently-used(s1ot-rover) do - (Include system and memory management begin un-use-it (slot-rover ); here 11 ) += slot-rover +- secutor(s1ot-rover); end; procedure reorganize-free-lists; end var p, q, r, s, t: pointer; thzs-tail: pointer; i, a-p: p-mem-index; This code is used in section 13. { indices of memory pages ) 17. At this place, external memory should be v-p-mzn. v-p-rnax, s-p-min, s-p-max: closed, deleted, freed or whatever. We output p-mem-index; { the single and variable statistics. free list maximum page indices found so (Include system and memory management far ) here 11 ) +G begin debug check-mem(fa1se); procedure close-mem; {we suppose memory to be OK at this begin close-ext-mem; point, I simply want the was-free bits set for stat wlog-cr; checking later ) wlog-ln ('took,', swap-no : 1, 'uswappingsuf or, ', gubed (Initialize free list reorganization 22); clock : 1, ~uaccessesuon');wlog(~uuuuu~, (Distribute variable size free list to the separate page-count : 1, -umemoryupagesuandu-, slots 23); slot-count : 1, -,slots. '); (Recombine variable size free list 24); tats (Distribute single word free list 25); end: (Recombine single word free list 26); debug check-mem (true); 18. Reorganizing the free lists. When we { Any non-trivial output here would mean consider the various nodes strung out sequentially as trouble, but, as it turned out, the program allocated from the free lists then W's access is kind crashed before reaching this point ) of local most of the time. It is clear: One paragraph gubed of text is under consideration in one period of end; time, one formula, one batch of finished lines. In a paging environment (and most of the machines 19. define mem-page-avail G m-p-avail are today), such locality is an advantage: Consider { avoiding identifier conflict ) the "Working Set", the collection of memory pages define mem-page-tail - m-p-tail accessed during a certain period of time. With good 20. (Locals for virtual memory handling 6) +Z locality, the Working Set needs be small only, and mem-page-avail, mem-page-tail: array page faults few. [p-mem-index] of pointer; For and other programs with similar 21. (Get virtual memory started 8) +- memory management, the free list tends to be for i +- p-mem-min to p-mem-max do scrambled and scattered during the first few pages begin { prepare the mem page buckets ) already so that any locality will be non-existent at mem-page-avail [i] +- null ; all. Thus the Working Set may grow about a third mem-page-tail [i] + null; again as large. The solution is to reorganize the free end; TUGboat, Volume 10 (1989), No. 1

22. (Initialize free list reorganization 22) - define insert-first-avail-per-page - p + get-node ('10000000000); begin mem-page-avail[a-p] +- avail; { re-merge them first thing right away } mem-page-tail [a-p] + avail;

v-p-min + mem-page (mem-end); link (avail) +- null; s-p-min +- mem-page (mem-end); end

v-p-max +- mem-page (mem-min); define insert-avail-per-page

s-p-max +- mem-page (mem-min); begin r +- mem-page-avail [a-p];

This code is used in section 18. mem-page-avail [a-p] +- avail; 23. It appears that rover is not supposed to be link(avai1) + r; empty ever. end define insert-first-var-per-page (Distribute single word free list 25) = - while avail # null do begin mem-page-avail [a-p] t p; begin q + link(avai1); dink (p) +- p; llink (p) t p; end a-p +- mem-page (avail); define insert-var-per-page if s-p-min > a-p then s-p-min +- a-p; - if s-p-max < a-p then s-p-max +- a-p; begin r + mem-page-avail [a-p]; if mem-page-avail[a-p] = null then s + llink (r);dink (s) +- p; insert-first-avail-per-page llink (p) + s; dink (p) t r; llink (r)+- p; else insert-avail-per-page; end avail +- q; end (Distribute variable size free list to the separate This code is used in section 18. slots 23 ) p +- rover; 26. This code works even if avail has been empty repeat q +- rlink(p); a-p +- mem-page(p); in the first place. if v-p-min > a-p then v-p-min + a-p; define append-this-avail-list r

if v-p-max < a-p then v-p-max +- a-p; begin r +- mem-page-avail [i]; if mem-page-avail [a-p] = null then link (this-tail) + r; insert-first-var-per-page this-tail +- mem-page-tail [i]; else insert-var-per-page; mem-page-avail[i] + null;

P +- q; mem-page-tail [i]+ null; until p = rover; end This code is used in section 18. (Recombine single word free list 26) r 24. We clean up carefully behind us. One of those avail + mem-page-avail [s-p-min]; buckets may be reused very soon. this-tail +- mem-page-tail[s-p-min]; define append-this-var-list mem-page-avail [s-p-min] +- null ; - mem-page-tail [s-p-min] +- null ; begin r + mem-page-avail [i]; s + llink(r); mem-page-avail[i] +- null; if s-p-max > s-p-min then for i + s-p-min 1 to s-p-max do t +- llink(rover); rlink(s) +- rover; + llink(rover) + s; rlink(t) +- r; if mem-page-avail[i] # null then append-this-avail-list ; llink (r)+- t; end This code is used in section 18. (Recombine variable size free list 24) - rover +- mem-page-avail [v-p-min]; mem-page-avail [v-p-min] + null; if v-p-max > v-p-min then

for i +- v-p-min + 1 to v-p-max do if mem-page-avail[i] # null then append-this-var-list ; This code is used in section 18. 25. This must be considered part of the inner loop since every single character freed after printing gets through here. TUGboat, Volume 10 (1989), No. 1 23

TurboMETAFONT: A New Port in C length of the arithmetic instructions in the gener- ated code. Thus, mixing of integral types in C can for UNIX and MS-DOS be optimally efficient for the machine's instruction Richard J. Kinch set. However, in C certain combinations of inte- We have recently released TurboMETAFONT, a new, gral types are dangerous, and the programmer is TRAP-certified implementation of METAFONT in the expected to be wary of them. For example, an C language. Like our Turbow software, Turbo- unsigned int in C is a variable which can only take METAFONT is portable to computers having C a non-negative integer value. Subtracting one C language compilers meeting ANSI or Kernighan unsigned int from another always yields an unsigned & Ritchie standards and sufficient memory. We int-expression result. If the result should have been certified the software for MS-DOS PC's and AT&T negative, the effect is tacit nonsense. The simi- UNIX System V in January. Certification for other lar case in Pascal, namely using the 0. .maxint targets is in progress. subrange type, works because Pascal first promotes Our earlier TUGboat article, "Turbow: A the subrange components of the difference to signed New Port in C for UNIX and MS-DOS" (TUGboat, integers before using them to compute expressions. vol. 9, no. 1, April 1988, pp. 48-52), described We did not want to translate the METAFONT how we created Turbom from the Knuth auto- Pascal code to C and completely impose the Pascal graph . web. The techniques and tools included integer promotion on the C code; we prefer to Paschal, our Pascal-to-C translator program; a retain the C efficiency. But there is no way for large Turbom change file; a few hand-written a translator to know from syntax or semantics C functions to connect to the operating system whether a given expression in Pascal will have environment; and utilities for splitting the large problems in C of the kind illustrated above. So amount of C code generated into smaller, separately- we had to make a painstaking manual examination compiled pieces. The earlier article describes these of each suspect expression (fortunately, these are items in detail, so we will not repeat the particulars now. not too prevalent in METAFONT), and analyze whether any possible run-time behavior required C To create TurboMETRFONT, we took the same type casting for correct results. The change file approach as for Turbo=, since the WEB programs implements C type casts where needed. for TJ$ and METAFONT are similar. A few items in METRFONT required some extra effort, but once MS-DOS PC's: The Final Frontier. the TurboMETAFONT change file was complete Getting a 23,000-line program like METAFONT or the same tools we perfected for the Turbow translation worked well for TurboMETAFONT. Q$ to run on a personal computer with limited memory is a big job. The portability traps of METAFONT Yields One Surprise. the IBM PC/Intel 8086 architecture and the MS- DOS operating system make the task still more One substantial translation issue did arise which imposing. We feel that Microsoft has done penance was absent from TurboT)&X but critical for Turbo- for inflicting MS-DOS upon the computer industry METRFONT. METAFONT uses integer arithmetic for (and producing a 32-year-old billionaire as a side all its calculations, while QX uses some integer effect) by producing their C compiler, which makes and some floating point. While the METRFONT MS-DOS look almost like UNIX to the programmer. syntax thus appears to be a subset of m's, in This compiler significantly simplifies the task of fact METAFONT makes a semantically broader use porting to the PC. of integer arithmetic in ways that never does. The earlier Turbom software contained two For example, METAFONT takes differences here features peculiar to the PC version: overlays and and there between integer variables (32 bits) and virtual memory simulation. At the time of the halfword variables and constants. Pascal prodi- earlier article we had not completed these features, giously promotes all subrange integral types to the and so we will describe them now since they are largest integral type when computing expressions. Thus, mixing of integral types in Pascal expressions complete, and also relate to TurboMETAFONT. Both Turbom and TurboMETAFONT require is not prone to error, but is often inefficient. C economizes with an elaborate set of promotional overlays for the INITEX and INIMF versions of the executable programs. These versions are slightly protocols which attempt to minimize the word larger than the production versions, since they contain initialization code otherwise absent. We 24 TUGboat, Volume 10 (1989), No. 1 implemented optimally overlayed code by a method Graphics Support. of run-time tracing. By adding a run-time trace fea- A desirable feature of METAFONT is the online ture to the Paschal translator, we obtain function- graphical output. This allows the user to view call histograms for the anticipated uses, namely, each character in a font, or even each stroke in running INITEX to obtain a Plain 'J&X or IPm a character, as METAFONT generates it. For the format file, or running INIMF to obtain a Plain font developer, this interactive mode is critical to METAFONT or Computer Modern METAFONT base effective debugging of character programs. For the file. By overlaying the largest modules which are rest of us, it is just fun to watch the artistry in called only once or never during these runs, we action. obtain executables with near the performance of a On the PC, TurboMETAFONT supports the non-overlayed version. most common graphics adapters: the Hercules We developed a virtual memory simulator, monochrome graphics adapter (HGA), the IBM released May 1987, for Turbow. The virtual color graphics adapter (CGA), and the CGA- memory feature allows a mainframe-sized TEX to compatible modes of the IBM extended graphics run on PC's, which have an architectural and adapter (EGA) and virtual graphics adapter (VGA). operating system limit of less than 600K bytes of We wrote the HGA driver code ourselves, but used usable program memory. By putting Turbo'J&X1s the CGA/EGA/VGA drivers in the Microsoft C largest array, mem, into simulated virtual memory compiler's graphics library. We provide a separate we free enough space for a large version to run in executable program for each graphics adapter type the available PC memory. This technique succeeds to minimize memory use and increase execution with large macro packages and complex documents speed. If there is sufficient demand we may incor- that cause other PC implementations of QXto fail. porate Tektronix 4010 graphics output as an option We do not now see the need to include the for applications on larger (non-PC) computers. virtual memory simulator in the TurboMETAFONT programs. Since the TurboMETAFONT programs Distributing the Product and Enlarging the are smaller than Turbow, TurboMETAFONT will TEX Community. run on any PC with 640K memory installed. We have drawn much encouragement from the Furthermore, the enterprise of generating fonts with market acceptance of Turbow, having shipped METAFONT does not seem to encourage the use of over 500 copies in the first six months of publication enormous macros or tables that accumulate from with only TUGboat advertising. We will continue character to character, the way some applications of our approach of one low price for a complete rn quickly gobble memory for index entries or bit package, now to include both Turbow and Turbo- map manipulation. We may still offer a virtualized METAFONT, with complete source code available. version of TurboMETAFONT in the future for PC The Turbom emphasis on the pure C lan- users, if commercial demand proves a need. guage and portability has served to significantly Portable Preloading. enlarge the number of m users. There is a large and growing body of potential TFJ users who share Another Turbow feature not needed by Turbo- a set of characteristics: They are programmers who METAFONT is the portable preloading. This method work with C, they own or use a PC, they know and in Turbom uses our utility program, FMT2INIT, admire Knuth's The Art of Computer Programming to convert Turbom format files into C variable series, they need a technical typesetting system, initializers, thus creating executable programs that they have heard about m, and they know the start quicker with formats preloaded. Having such shortcomings of other "desktop publishing" pro- a preloaded executable is desirable for Turbom. grams. Turbow, we have found, appeals to such because the TJ-$ user typically makes many short people as a good fit in all these ways to get them runs of the program, so that the program load time started as serious T@ users. We plan to broaden dominates. The typical use of METAFONT, however, our approach to appeal to these unw'ed masses, is for a lengthy run to generate an entire, existing, and perhaps they will soon be the new generation debugged font in a new magnification. Thus the of users. value of preloading a TurboMETAFONT executable is small, and we hzre not carried over this feature. TUGboat, Volume 10 (1989)' No. 1

The TEX PostScript Software Package dvitps allows the use of the usual pixel based fonts of All three pixel file types PXL, GF Stephan v. Bechtolsheim and PK are supported. Fonts may have up to Introduction 256 characters. Postscript fonts can be used in w! The This report describes the rn Software Package. program pfd2tfm converts AFM files into TFM files 7QXpS stands for m-Postscript. This package which then can be accessed by m. Ligature contains, among other things, a new DVI to Post- and kerning information from AFM files is used Script driver and the facility to use PostScript fonts by pfd2tfm. This program also generates PDR in TEX. files which are accessed by dvitps. The software's copyright is in the GNU spirit PostScript fonts can be tilted, stretched, and (Free Software Foundation, Cambridge, MA): it is modified in various other ways. free except for a nominal distribution charge for The encoding vector of the PostScript fonts those of you who order the software because of the used is under complete user control. In other lack of access to ftp. The software must be passed words, every character of a PostScript font can on according to the same terms, also if you port the be mapped to any character code offering full software to a new operating system, for instance. flexibility. Defaults are provided, making the See the end of this article for more information on encoding vector of PostScript fonts as close as how the software is distributed. possible to the encoding vectors of the usual In this short report I will describe the following m fonts. The encoding vector is among the programs: information stored in the previously mentioned 1. dvitps, the driver, which converts DVI files into PDR files. PostScript files1. Encoding vectors can be printed out using the 2. pfdZtfm, a program to generate TFM files for program printpdr. PostScript fonts which makes PostScript fonts It is dvitps and not the PostScript interpreter accessible in TEX. inside the printer which is "in charge of posi- 3. printpdr. an auxiliary program which will be tioning." dvitps generates only integer position discussed later. coordinates and movements. The term 'integer' Features of the Software Package here is used with respect to the resolution of the PostScript printer. As a consequence it was Here is a list of features of the rn Software possible to make dvitps follow the rules of dvi- Package. The main emphasis below will be on type, the model device driver, precisely. dvitps dvitps which is the central part of this software includes, for instance, a maxdrift control. package. ' 12. dvitps has an option to reset the virtual memory The software runs under UNIX (currently tested of the Postscript printer used every n pages. on VAXes and SUNS (BSD 4.x)); ports to other 13. dvitps has an option to show all attempts to flavors of UNIX should be straightforward. locate font files. The software is very easy to install. A central 14. dvitps has an option to generate "conforming file contains all local definitions and a small documents", i.e. PostScript files conforming C program is used to update all makefiles. to a standard defined by Adobe, Inc. This The software comes with a 150 page manual allows PostScript files generated by dvitps to which explains it thoroughly. The manual be included into other Postscript files. contains numerous examples intended to be a 15. Font emulation is provided. Font emulation testbed for the software. means that the spacing and positioning of Manual pages (done in troff . . . ) are included. characters within T@ refers to one TFM file The software was tested carefully at various but printing by dvitps is done by using a font locations before its release and should perform with a different TFM file. This can be used according to its specification. Continuous to print documents which were processed with support by the author is offered. TFM files for which no pixel files are available. This situation occurs when native fonts of phototypesetters are used and the producer of The driver is not called dvi2ps because there the phototypesetter does not make any pixel are already so many different PostScript drivers files available. called dvi2ps floating around. TUGboat, Volume 10 (1989), No. 1

4 1

@- ~fd2tfm METAFONT

Itpic

A data flow diagram explaining the connection between T&X and METAFONT. TUGboat, Volume 10 (1989), No. 1

16. PostScript fonts can be extended so that arbi- 4. The basic set of AFM files needed to produce trary PostScript procedures can be executed in the corresponding TFM and PDR files. place of certain character codes. 5. The sources of pltotf (needed by pfd2tfm) and 17. The inclusion of PostScript figures in 7&X of maketd, a program to compute dependencies documents is possible with macros of the psfig of C program sources. macro package. The software is made available in the following two 18. Figures generated with tpic can be included ways: into a document. 1. Use ftp to the machine csseq. tamu. edu and 19. X Window screen dumps (X11.3) can be in- retrieve the file dvitps. tar.Z from there. cluded into a rn document. 2. Send $80.00 ($110.00 outside the continental US, shipped air mail) to Stephan v. Bechtols- An Overview heim, 2119 Old Oak Drive, West Lafayette, IN The data flow diagram contains an overview of the 47906 and you will receive a SUN cartridge T)QQS Software Package. Observe that this figure plus a complete set of the documentation. contains as subdiagram the flow of information when generating fonts with METAFONT and processing a Acknowledgements document by rn using METAFONT based fonts. The software was developed by the author as part of The left side of the figure shows the programs a consulting contract with the Menil Foundation in added by 7JJKpS. The pfd2tfm program generates Houston, Texas. It was a combined decision by the TFM files from AFM files and PFD files. PFD files author of this software and the Menil Foundation to contain, for instance, encoding vector specifications. make this software available to the community The resulting TFM files are read in by rn to at large. produce a document with PostScript fonts. The My email address is svb@cssun. t amu . edu. Feel pfd2tfm program may read in TFM files itself for the free to contact me for further information. purpose of font emulation. The pfd2tfm program also produces PDR files which are read in by dvitps. These PDR files contain width information and encoding vector information which is needed by dvitps. Observe also that tpic can be used with our dvitps. tpic generates a TEX source code file which in turn generates \specials which are included into the DVI file. Finally with the help of the psfig macros, Post- Script based figures generated by some program X.. . PS can be included into a rn document. Such a program should but does not need to generate a bounding box comment in its Postscript output which is read in by the psfig macros to reserve the proper space in the TkX document. The rest of the PostScript file is discarded by W, and only read in by dvitps. PRO files mentioned in the figure are prologue files which contain certain standard PostScript def- initions read in by dvitps. Availability The software of the TEX@~package consists of the following parts: 1. Source code for the three basic programs dvitps, pfd2tfm and printpdr. 2. The I4m source of a 150 page document describing the software. 3. Manual pages. TUGboat, Volume 10 (1989), No. 1

u u Georgia ICM. Tobin

This short communication presents the code for a x8=8.75/16w; couple of dingbats that the author has found use- y8=1/4[y7, y6l; ful in memos and other correspondence. The code is x17=14.5/16~; quite straightforward, and can easily be put to use by y i7=9.25/l5 [-desc ,cap] ; the reader on any METAFONT implementation. De- % find a point at a certain height on spite the simplicity of the code, there are a couple of % the curve from 26 to 27 interesting things done which I will enlarge upon a path dummycurve; path dummyline; bit when we get to them. x.dummy=1/2 Cx8,x7] ; The first part of the code looks like this: y.dummy=yi7; dummyCurve:=z6~5-~2..~7..tension1.4..z8; % hands .mf dummyline : =z. dummy--217 ; mode-setup ; zl8=dmyCurve intersectionpoint dummyline; s ize=48pt#; x16=x17; font-size size; y16=y7; em#:=size; cap#:=7/10em#; desc#:=3/10em#; x9=7/16w; thinline#:=l/iOOern#; y9=y8; def ine-pixels(em,cap,desc) ; x10=6/16w; define-blacker-pixels(thin1ine); yi0=2/5 Cy23 ,y51; Here we assign values to the height, depth and % find another point on the width of the character box and define the single pen % curve from z6 to 27 size to be used. Since this is a very simple font, there is x.dummy2=x5; no call for overshoots or multiple pens; and the height y.dummy2=yl6; and depth of the character box is just expressed as a x.dummy3:=1/2[~8,~71; fraction of the width. y .dummy3=y. dummy2; dummyLine:=z.dummy3--z.dummy2; Now, we define the whole character in a macro: zl2=dummyCurve intersectionpoint dummyline; %Hand pointing right % define points for curled fingers def handpointing= x15=~14=~19=~22=1/3[xi8 ,xi71 ; % define points for thumb and cuff x13=x2o=x21=x12; x1=x3=1/2[0,1/15w] ; yi5=yi6; x2=~5=~4=~23=4/16w; y13=yl4=yl5-(yl7-y16); yl=y2=10/15[-desc,cap] ; y2O=y19=yI3-(y17-y16) ; y3=y4=2/l5 [-desc, cap] ; y21=y22=y20-(y17-y16); y5=6/7 Cy4,y21; y23=1/7Cy4,y21; % pick up pen and draw whole image x6=9.75/16w; pickup pencircle scaled thinline; y6=y2; draw zl--22--z4--z3--cycle; x7=11.25/16w; draw z5(l,i)..tension 1.5..z6 y7=4/5 Cy23,y51; Lz6z5-22 ...z7..tension 1.4..z8

This document originally printed at 300 dpi. TUGboat, Volume 10 (1989), No. 1

&z8down..tension3..z9 picture mirrorimage; &zg..tension 1.8..leftzlO; mirrorimage:=normalchar draw zi8--zl7right..zl6--~7; ref lectedabout ((0,O) ,(0 ,h)) draw z7--zl5right..zl4--zl31eft..zl2; shifted (w,O); draw z14right..z19--~201eft..zI3; currentpicture:=mirrorimage; draw zi9right..z22--~211eft..z20; scantokens extraendchar; draw z21(-1,-l)..tension1.5..~23; chardx:=w; enddef ; shipit; The interesting bits I referred to at the start of if display ing>0: showit ; f i this article are the lines in which z18 and 212 are endgroup; defined. zI8 is the point at which the top of the enddef ; pointing finger touches the top of the thumb; z12, enddef ; the point at which the top of the second finger touches This redefinition will, in essence, capture the image the underside of the thumb. Notice how METAFONT shown above, reflect it about the y-axis, and shift it to calculates the precise point of intersection easily, and the right by the character width. We can inuut that obviates the need for fudging by the user. file within another character definition, call pattern, Using this macro, we can write the code for a char- and then call our handpointing routine: acter depicting a hand pointing right in a few short beginchar("B" ,l6/i5em#, cap#,desc#) ; lines; these lines, in fact: input patt ernmirror; beginchar("AW ,16/15em#,cap#,desct) ; pattern; handpoint ing ; handpointing ; endchar ; endchar ; When we run this (and recall, size is set equal to Running the above (and recall, size is set equal to 48 points), we get: 48 point) we get:

It would be nice to have a dingbat of a hand iden- We can make use of another file providing another tical to the above except pointing left. We could definition of pattern, namely: describe such a character fairly easily by rewriting % patternlev the code with all horizontal coordinates shifted; for def pattern= example, the line: def endchar= ~1=~3=1/2CO, 1/15wl; tracingequations:=l; cullit ; would be rewritten: picture phaseona; phaseone=currentpicture; xi=x3=1/2Cw, 14/1Swl; currentpicture:=nullpicture; fill (0 ,-desc)--(a ,-desc)--(w ,cap)-- But, there is a much simpler solution. We can (0,cap)--cycle; write a file that redefines endchar in the same way cullit ; that I discussed in "The ABC's of Special Effects" picture phasetwo; ( TUGboat, Vol. 9, No. 1, April 1988, pp. 15-18): phasetwo=currentpicture-phaseone; % patternmirror currentpicture:=phasetwo; def pattern= scantokens extr~endchar; def endchar= chardx:=w; tracingequations :=I; shipit; cullit ; if displaying>O: showit; fi picture normalchar ; endgroup; normalchar :=currentpicture ; enddef ;

This document originally printed at 300 dpi. 30 TUGboat, Volume 10 (1989), No. 1 enddef ; reflectedabout ((O,O),(O,h)) shifted (w ,O) This redefinition captures the image drawn above ; currentpicture:=phasethree; and removes each pixel in it from an entirely black- scantokens extraendchar ; ened character box. As before, we input that file chardx:=w; within another character definition, call pattern and shipit then call the handpointing routine; thus: ; if displaying>O: showit ; f i beginchar("cU ,16/15em#,cap#,desc#) ; endgr oup ; input pattern-rev; enddef ; pattern ; enddef ; handpo int ing ; and which, accessed by this code: endchar ; and get: beginchar("D",l6/15em#,cap#,desc#); input pattern-revmirror; pattern; handpo int ing ; endchar ; gives us the reverse video mirror image of the original Finally, we can use another file that combines the character: features of the previous two patterns: % patt ernzevmirror .mf def pattern= def endchar= tracingequations :=I; The user can, of course, change the second line cullit ; of the code shown above to create the font at any picture phaseone; phaseone=currentpicture; size desired; you might wish to actually put that line currentpicture:=nullpicture; outside the rest of the code, and simply specify it at fill (0,-desc)--(w,-desc)--(w,cap)-- run time. (0,cap)--cycle; cullit ; To create the font, all you need is the code shown picture phasetwo; in this article and METAFONT. Start up METAFONT, phasetwo=currentpicture-phaseone; specify the device for which you are creating the picture phasethree; font by typing mode=lowres; (or mode= whatever phasethree:=phasetwo you wish) and then inputting hands. mf.

This document originally printed at 300 dpi. TUGboat, Volume 10 (1989), No. 1 3 1

Typesetting Concrete Mathematics testfont routine [5, Appendix HI; these tests put Donald E. Knuth the characters through their basic paces by type- Stanford University setting formulas such as /A+ ,B1+ C + ... + Z1, a2tb2+c2t..+z2, az+br+c2+...+p,and

During 1987 and 1988 I prepared a textbook entitled 3 + 5 + + + . . + 2. I noticed among other things Concrete Mathematics [I],written with co-authors that the Fraktur characters had all been placed too Ron Graham and Oren Patashnik. I tried my best high above the baseline, and that more blank space to make the book mathematically interesting, but was needed at the left and right of the characters in I also knew that it would be typographically in- subscript/superscript sizes. After fixing such prob- teresting-because it would be the first major use lems I also needed to set the italic corrections so of a new typeface by , commissioned that subscripts and superscripts would have proper by the American Mathematical Society. This type- offsets; and I needed to define suitable kerns with face, called AMS Euler, had been carefully digitized a \skewchar so that accents would appear visually and put into METAFONT form by Stanford's digital centered. AMS Euler contains more than 400 char- typography students [a]; but it had not yet been acters, and Hermann had made them beautiful; my "tuned up" for real applications. My new book job was to find the right adjustments to the spacing served as an ideal test case, because (1) it involved so that they would fit properly into mathematics. a great variety of mathematical formulas; (2) I was The next step was to design a set of l)$ highly motivated to make the book readable and macros so that AMS Euler could be used con- attractive; (3) my experiences with tuning up Com- veniently in math mode. This meant adding new puter Modern gave me insights into how to set the "families" to the conventions I had defined in pre- mysterious font parameters used by TEX in math vious formats. Plain 'I?@typesets mathematics mode; and (4) the book was in fact being dedicated with four basic font families (namely, \f am0 for to Leonhard Euler, the great mathematician after text, \fml for math italic, \fm2 for symbols, whom the typeface was named. and \fm3 for large delimiters), plus a few oth- The underlying philosophy of Zapf's Euler de- ers that are used less frequently (\fam4 for text sign was to capture the flavor of mathematics as italic, \f an5 for slanted text, \fam6 for boldface it might be written by a mathematician with ex- roman, and \fam7 for typewriter style). I added cellent handwriting. For example, one of the ear- \fm8 for AMS Euler Script and \fa9 for AMS marks of AMS Euler is its zero, 'O', which is Euler Fraktur; the AMS Euler Greek and Roman slightly pointed at the top because a handwrit- went into the old position of math italic, \fami. ten zero rarely closes together smoothly when the Hermann had designed new parentheses and brack- curve returns to its starting point. A handwrit- ets, which were bundled together with the Fraktur ten rather than mechanical style is appropriate for fonts; therefore my macro file changed plain W's mathematics because people generally create math conventions by defining, e.g., \mathcode' (="4928 with pen, pencil, or chalk. The Euler letters are and \delcodec (="928300. Similarly, Euler has upright, not italic, so that there is a general con- the symbol '6' as an alternative to 'I1,packaged sistency with mathematical symbols like plus signs with the Script alphabet; to make TEX recognize and parentheses, and so that built-up formulas fit this substitution I said \mathchardef \leq="3814 together comfortably. AMS Euler includes seven al- \let\le=\leq. phabets: Uppercase Roman (ABC through XYZ), With such additions to the plain TEX macros I lowercase Roman (abc through xyz), uppercase could type formulas like $\tan(x+y)$ as usual and Greek (ABr through WO),lowercase Greek (aby get not 'tanjzfy)' but 'tan(x+y)'. There was, how- through x+w), uppercase kaktur (UBC through ever, one significant difference between typing the X!J3), lowercase Fraktur (abc through ~q),and up- manuscripts for Concrete Mathematics and for The percase Script (ABCthrough X2Z). It also includes Art of Computer Programming, caused by the fact two sets of digits (0123456789 and 0123456789)~as that the Euler numerals 0123456789 are distinctly well as special characters like p, H,and some punc- different from the numerals 0123456789 in ordinary tuation marks. Details about its design are dis- text. In previous work, I used to "optimize" my cussed in another article [7]. typing by saying, e.g., To refine the digitized characters for mathemat- ical use, I began by correcting the way they ap- $x$ is either 1 or $-I$, peared in their "boxes," from W'Sviewpoint. For this purpose I used the \math tests of the standard TUGboat, Volume 10 (1989), No. 1 thereby omitting $'s around a mathematical con- the respective letter pairs Aa, Bb, Cc, Dd, and Ee stant unless I needed them to get a minus sign in- from the style of standard Computer Modern Ro- stead of a hyphen. After all, I reasoned, those extra man to an Egyptian style. I had made these cover $IS just make TEX work harder and the result looks designs just for fun, at the suggestion of Marshall the same; so why should I be logical? But in Con- Hendricks, but I had never had time to experiment crete Mathematics I needed to type with a complete text face in that style. Now I had a good reason to indulge that whim, and after a $x$ is either $I$ or $-I$, pleasant afternoon of experiments I found a combi- nation of parameters that looked reasonably attrac- to keep x from being 'either 1 or -1'. The early tive, at least when I examined samples produced by drafts of my manuscript had been prepared in the our laser printer. (I magnified the fonts and viewed old way; therefore I needed to spend several hours them from a distance, to overcome the effects of laboriously hunting down and correcting all in- 300dpi resolution.) Then I made more elaborate stances where the new convention was necessary. samples of text and printed them on Stanford's APS This experience proved to be worthwhile, because phototypesetter, to see if the new fonts would really it taught me that there is a useful and meaningful pass muster. Some characters needed to be adjusted distinction between text numerals and mathemati- (e.g., the 'w' was too dark), but I was happy with cal numerals. Text numerals are used in contexts the result and so was Roy. like '1776' and 'Chapter 5' and '41 ways', where I decided to call the resulting font Concrete the numbers are essentially part of the English Roman, because of its general solid appearance and language; mathematical numerals, by contrast, are because it was first used in the book Concrete Math- used in contexts like 'the greatest common divisor of ematics. (In case you haven't guessed, the text 12 and 18 is 6', where the numbers are part of the you are now reading is set in .) mathematics. (Authors of technical texts in lan- There also zs Concrete Italzc, a companzon face guages like Japanese, where Arabic numerals are that zs used for emphaszs zn the book. EVEN used in formulas but not in ordinary text, have al- STRONGER EMPHASIS IS OCCASIONALLY ACHIEVED ways been well aware of this distinction; now I had BY USING A CONCRETEROMAN CAPS AND SMALL a chance to learn it too.) CAPS FONT. Anybody who has the METAFONT As I was tooling up to begin using AMS Eu- sources for Computer Modern can make the Con- ler, my publishers were simultaneously showing the crete fonts rather easily by preparing parameter files preliminary manuscript of Concrete Mathematics to such as ccrl0 .mf,analogous to cmrl0 .mf; you just a book designer, Roy Howard Brown. I had sent need to change certain parameter values as shown Roy a copy of the first Euler report [8] so that he in the accompanying table. could see examples of the typeface we planned to Here are samples of Concrete Roman in the 9 pt, use for mathematics. Our original intention, based 8pt, 7pt, 6pt, and spt sizes: on Zapf's original plans when he began the design in 1980, was to use Computer Modern Roman for Mathematics books and journals do not look as the text and AMS Euler for the mathematics. But beautiful as they used to. It is not that their math- Roy noticed that AMS Euler was somewhat darker ematical content is unsatisfactory, rather that the old and well-developed traditions of typesetting in color than a traditional mathematical italic, so have become too expensive. Fortunately, it now ap- he decided that the text face should be correspond- pears that mathematics itself can be used to solve ingly heavier. He sent me several samples of type- this problem. faces with more suitable weights, so that I could A first step in the solution is to devise a method for prepare a special font compatible with AMS Euler. unambiguously specifying mathematical manuscripts in (One of my basic premises when I had developed the such a way that they can easily be manipulated by ma- Computer Modern meta-font was that it should be chines. Such languages, when properly designed, can readily adaptable to new situations like this.) When be learned quickly by authors and their typists, yet manuscripts in this form will lead directly to high qual- I saw Roy's samples, I decided to pursue something ity plates for the printer with little or no human inter- that I'd wanted an excuse to do for several years, vention. namely to find settings for the parameters of Com- A second step in the solution makes use of classical puter Modern that would produce an "Egyptian" mathematics to design the shapes of the letters and sym- bols themselves. It is possible to give a rigorous definition (square-serif) style. of the exact shape of the letter "a", for example, in such a The cover designs for Computers & Typeset- way that infinitely many styles (bold, extended, sans-serif, italic, etc.) are obtained from a single definit~onby chang- ting, Volumes A-El show a gradual transition of ing only a few parameters. When the same is done for the TUGboat, Volume 10 (1989), No. 1 33

other letters and symbols, we obtain a mathematical def- brary, so these new may help solve some of inition of type fonts, a definition that can be used on all the legibility problems we all know too well. But a machines both now and in the future. The main signifi- cance of this approach is that new symbols can readily be typeface that is too bold can also make a book tire- added in such a way that they are automatically consistent some to read. To avoid this problem, Roy decided with the old ones. to use a \baselineskip of 13 pt with lOpt type. Of course ~t is necessary that the mathematically-defined let- ters be beautiful according to traditional notions of =sthetics This gives an additional advantage for mathematical Given a sequence of points in the plane, what is the most pleas- ing curve that connects them? This question leads to interesting work, because it prevents formulas like a;' mathematics, and one solution based on a novel family of spline in the body of the text from interfering with each curves has produced excellent [SIC] fonts of type in the author's preliminary experiments other; the normal 12 pt baselineskip used in most We may conclude that a mathematical approach to the design of alphabets does not elmunate the artists who have been domg the mathematics books can get uncomfortably tight. Of job for so many years, on the contrary ~t gives them an exc~ting course, the increased space between lines also in- new medium to work with [2] creases the number of pages by about 8%; this seems Heavier weight makes the type more resilient a reasonable price to pay for increased readability. to xeroxing and easier to read in a poorly lighted li-

Table of parameter values for Concrete fonts, using the conventions found on pages 12-31 of [6]: name cmr10 ccr10 ccr9 ccr5 ccslc9 cctilO ccmilO cccsclO lower font- ident CMR CCR CCR CCR CCR CCR CCR CCSLC CCTI CCMI CCCSC serif-fit 0 1 1 1 1 1 1 0 1 1 1 cap-serif-fit 5 3 2.8 2.6 2.4 2.2 2 2 3 3 3 x-height 155 165 148.5 132 115.5 99 82.5 155 165 165 155 bar-height 87 92 78.3 69.6 60.9 52.2 43.5 85 92 92 87 tiny 8 11 10 9 8 7 6 9 11 11 11 fine 7 6 6 6 6 6 5 6 6 6 6 thin-join 7 17 17 15 13 12 11 13 17 17 17 hair 9 21 20 19 17 15 14 16 21 21 21 stem 25 25 24 22 20 18 16 22 24 25 25 curve 30 27 26 24 21.5 19 17 23 26 27 27 ess 27 25 24 22 20 17 12 25 24 25 25 flare 33 29 26 24 23 20 18 28 28 29 29 cap-hair 11 21 20 19 17 15 14 16 21 21 21 cap-stem 32 27 26 24 21.5 19 17 23 26 27 27 cap-curve 37 28 27 25 22.5 20 18 24 27 28 28 cap-ess 35 27 24 22 21.5 19 14 23 26 27 27 bracket 20 5 5 4 4 3 3 5 5 5 5 jut 28 30 27 24 21 19 17 15 30 30 30 cap-jut 37 32 29 26 23 20 18 16 32 32 32 vazr 8 21 20 19 17 15 14 15 21 21 21 notch-cut 10 516 314 213 7/12 112 5/12 314 516 516 516 bar, etc.* 11 21 20 19 17 15 14 15 21 21 21 cap-notch- cut 10 1 .9 .8 .7 .6 .5 .9 1 1 1 serif-drop 4 5 3.6 3.2 2.8 2.4 2 3.6 5 5 5 0 8 4 4 3 3 3 3 4 4 4 4 upex- o 8 3 3 3 3 3 2 3 3 3 3 other values from cm10 cmr9 cmr8 cmr7 cmr 6 cmr5 *The measurements for bar apply also to slab, cap-bar, and cap-band. All of the Concrete fonts have dish = 0,fudge = .95,superness = 8/11, superpull = 1/15, and beak-darkness = 11/30. Parameters not mentioned here are inherited from the corresponding cm fonts, except that cccsclO has lower.fudge = .93; cctilO has the u value 20 not 18.4,and the crisp value 11 not 8;ccmilO has the crisp value 0 not 8. 34 TUGboat, Volume 10 (1989), No. 1

Is the extra weight of Concrete Roman really and JpM'XI cos x2 dx. The new integral signs went into necessary for compatibility with AMS Euler? Here a new font called euexl0, which became \f am10 in is a small sample that uses ordinary cmrlO as the math mode; I told T'to get integral signs from text font, so that readers can judge this question for the new font by simply saying themselves: The set S is, by definition, all points that can be written as tkalak(i- 1lk, for an infinite sequence a1 , az, a3, . . . of zeros arid ones. Fig- in my macro file. Later I noticed that the infinity ure 1 shows that S can be decomposed into 256 sign 'm' of Computer Modern was too light to be a pieces congruent to AS: notice that if the dia- good match for the Euler alphabets, so I created a gram is rotated ~ount~erclockwiseby 135". we darker version 'co' and put it into euexlO with the obtain two adjacent sets congruent to (114)s. new integral signs. since (i-l)S=SU(S+l). [3] Hermann Zapf was helping to advise me during all this time. For example, he approved a draft of And now let's replay the same text again, using Chapter 1 that had been phototypeset in Concrete Concrete Roman and \baselineskip=l3pt: Roman and AMS Euler, while I was tuning things The set S is, by definition, all points that can up. Later, when he received a copy of the first print- be written as tkblak(i- 1 )k, for an infinite ing of the actual book, he saw Chapter 2 and the sequence al, az, a3, . . . of zeros and ones. Fig- other chapters for the first time; and this led him ure 1 shows that S can be decomposed into 256 to suggest several improvements that he could not pieces congruent to AS; notice that if the dia- have anticipated from Chapter 1. Chapter 2 is about summation, and I had used gram is rotated counterclockwise by 135", we the sign 1from Computer Modern's cmexlo font, obtain two adjacent sets congruent to (l/\/Z)S, together with its displaystyle counterpart since (i- 1)s=SU (S+ 1). [3] Equation numbers presented us with one of the most perplexing design questions. Should those numbers be typeset in Euler or cast in Concrete? After several experiments we hit on a solution that to typeset hundreds of formulas that involve sum- must be right, because it seems so obvious in retro- mation. Hermann pointed out that the capital spect: We decided to set equation numbers in an \Sigma of Euler looks quite different-it is 'L', "oldstyle" variant of Concrete Roman, using the without beaks -so he suggested changing my sum- digits '0123456789'. The result - e.g., '(3.14)'- mation signs to look more like the L of Euler. I did was surprisingly effective. this in the second priating of the book, using in After I had been using AMS Euler for sev- text formulas and eral months and was totally conditioned to "upright mathematics:' I began to work on a chapter of the book where integral signs appear frequently. It sud- denly struck me that the traditional integral sign is visually incompatible with AMS Euler, because it in displays. Hermann also asked me to make the slopes like an italic letter. Such a slope was now product symbols less narrow, more like Euler's 'n'; quite out of character with the rest of the formulas. so I changed them So I designed a new, upright integral sign to match the spirit of the new fonts. Then I could typeset from n and n to n and Moreover, he wanted the arrows to have longer and darker arrowheads: ' +', not 'i'. And he wanted curly braces to be lighter, so that and f Tm cos x2 dxI instead of TUGboat, Volume 10 (1989), No. 1 35

All of these new characters were easy to design, us- There's also a ref file, which contains the sym- ing the conventions of Computer Modern [6], so I bolic names of equations, tables, and exercises that added them to euexlO and used them in the second may be needed for cross references. (A ref file is printing. analogous to an aux file in Bw.)

Readers of Concrete Mathematics will imme- 0 Finally, a bnx file records the page numbers of diately notice one novel feature: There are "graf- each bibliographic reference, so that I can include fiti" printed in the margins. My co-authors and I such information as a sort of index to the bibliogra- asked students who were testing the preliminary phy. That index was done automatically. book drafts to write informal comments that might be printed with the text, thereby giving the book I wouldn't want to deal with so many auxiliary files a friendly-contemporary-lifelike flavor. We weren't if I were producing a simpler book or a system for sure how such "remarks from the peanut gallery" more general consumption. But for the one-shot should be typeset, but we knew that we did want purposes of Concrete Mathematics, this multiple- to include them; in fact, we collected almost 500 file approach was most convenient. marginal notes. Roy hit on the idea of putting them We decided to use a nonstandard numbering in the znner (gutter) margin, where they would not system for tables, based on the way superhighway have too much prominence. He also sent a sample of exits are numbered in some states: Table 244, for a suitably informal typeface, on example, refers to the table on page 244. (The idea This 9pt typeface wasn't original with us, but I don't remember who which I modeled "Concrete Ro- proved to work very man Slanted Condensed" type. nicely for marginal suggested it.) Macros to accommodate this conven- To typeset such graffiti, I graffiti, where-it tion, and to update the cross-references when the is typeset ragged page numbers change, were not difficult to devise. introduced a \n%2 macro into mv m format file, so that it was 'picas All of the macros I wrote for Concrete Mathe- with lOpt between matics appear in an 814-line file called gkpmac. tex, possible to type simply '\g Text baselines, of a graffito. \g' on whatever which (I'm sorry to admit) includes very little doc- line of text I wanted the marginal comment to be- umentation because it was intended only to do a gin. I did a bit of positioning by hand to ensure single job. Macro writers may like to look at this that no two comments would overlap; but my \g file as a source of ideas, so I've made it publicly macro did most of the work. For example, it au- accessible; for example, it is gkpmac . t ex tomatically decided whether to put graffiti into the at score. stanford. edu on the Arpanet. But peo- left margin or the right margin, based on an auxil- ple who attempt to use these macros should be iary 'grf' file that recorded the choice that would aware that I have not pretended to make them com- have been appropriate on the previous TEX run. plete or extremely general. For example, I imple- My macros for Concrete Mathematics cause mented a subset of B?]Ex's picture environment, Tj$ to produce not only the usual dvi file and log and used it to prepare all but one of the illustra- file corresponding to the input, but also the grf file tions in the book; but I didn't include everything just mentioned and four other auxiliary files: that LAW makes available. Moreover, I didn't need The ans file contains the text of any answers to boldface type in the mathematical formulas of Con- exercises that appeared in the material just typeset; crete Mathematics (except for the Q on page 143 such answers will be \input at an appropriate later of the second printing); so I didn't include macros time. (Page 422 of The wbook discusses a similar for accessing any of the bold fonts of AMS Euler idea. The only difference between Concrete Mathe- in math mode. In this respect, the book was not a matics and The wbook in this regard was that I perfect test, because almost half of the Euler charac- used one file per chapter in Concrete Mathematics, ters are boldface and therefore still untried. Macros while The wbook was typeset from one long file.) for bold mathematics would be easy to add, follow- ing the pattern already established in gkpmac; but The inx file contains raw material for prepar- I must leave such tasks to others, as I return to my ing the index. After everything but the index was long-delayed project of writing the remaining vol- ready, I put all the inx files together, sorted them, umes of The Art of Computer Programming. and edited the results by hand. (See pages 423- 425 of The wbook, where I describe similar index macros and explain why I don't believe in fully au- tomatic index preparation.) 36 TUGboat, Volume 10 (1989), No. 1

References to ship the character off to the Generic Format file (GF file). So, the endchar definition seemed like [I] Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics. Addison- a good spot to tell METAFONT to take whatever Wesley, 1989. character image had been created and convert it to an outline, since it is called once per character, [2] Donald E. Knuth, "Mathematical typography," right before it's shipped out, Bulletin of the American Mathematical Society Here is the macro definition I used to create (new series) 1 (1979), 337-372. outline fonts with: [3] Donald E. Knuth, Seminumerical Algorithms, second edition. Addison-Wesley, 1981. me~sage~~loadingthe font outline macros."; boolean outlining; [4] Donald E. Knuth, The wbook, Volume A of Computers & Typesetting. Addison-Wesley, 1984 % only outline when told to and 1986. outlining:=false;

[5] Donald E. Knuth, The METRFONT~OO~,Vol- def outline = ume C of Computers & Typesetting. Addison- if outlining: Wesley, 1986. cull currentpicture keeping (1,infinity); [6] Donald E. Knuth, Computer Modern Type- picture v; v:=currentpicture; faces, Volume E of Computers & Typesetting. cull currentpicture keeping (1,l) Addison-Wesley, 1986. withweight 3; [7] Donald E. Knuth and Hermann Zapf, "AMS addto currentpicture also v - v Euler - A new typeface for mathematics," Schol- shifted right -V shifted left - v arly Publishing, to appear. shifted up - v shifted down; [8] David R Siegel, The Euler Project at Stan- cull currentpicture keeping (1,4); ford. Computer Science Department, Stanford Uni- if (pixels-per-inch >= 600) : versity, 1985. addto currentpicture also currentpicture shifted left; addto currentpicture also currentpicture shifted up; f i showit; fi Outline fonts with METAFONT enddef ;

Doug Henderson extra-endchar:=extra-endchar & "outline"; Lately I've been feeling like no one else out there The first statement declares a boolean vari- is having any fun with METAFONT. I sure am. able named outlining. The next line initializes Recently, I came across a small gem in the rough outlining to be false, so we don't create outline in the METAFONTbook and decided to polish it up fonts by default. The definition of outline includes some. In chapter thirteen there is an interesting the line if outlining: which tests to see whether exercise (13.23, page 121) which calls for the user to the outlining feature is desired. If so, the macro replace a character by its "outline". Since it was an proceeds to punch out the pixels on the inside idea that appealed to me (double dangerous bend of our character (leaving more than one pixel for kind of fun) I set about applying the solution in the outline if using a high resolution printer or various places in the METAFONT source code to see phototypesetter) and show the results, and, if not, the affects. What I finally settled on was hooking it ends the if statement with the fistatement. The in as a definition extension of the endchar macro. I last statement is interesting since it shows a nifty reasoned that for each Computer Modern character way to tack on new features when creating your METAFONT produces in a font, there exists both a characters. Instead of redefining the definition of beginchar statement, with which you relate things the endchar macro with your special effects (in this like the height, width and depth, and an endchar case a character outline), just add to the defini- statement, which tells the program, among other tion of endchar with the extra-endchar statement. things, to create a grid box for proof characters and Some similar "hooks" exist for the beginchar and TUGboat, Volume 10 (1989), No. 1 37 mode-setup macros; they are extra-beginchar and METAFONT creates. Since what we are doing is extrasetup. modifying Computer Modern fonts, we should also This macro was intended to be used (by me change the name of our outlined fonts. Besides, anyway) as an extension of the plain and cm if you installed them in your font directories, you (Computer Modern) base files. This way I did not would overwrite the real cmssl7 CM fonts! need to input it each time I wanted to make an I believe the best way around this name colli- outline font. Since I place all of my local extensions sion is to create unique fonts by copying the original to either base file into a file named local .mf, that name, say cmssl7.mf1 and copying it to another is where my outline macro went. test file you can then work with. I put forth the To load it into the plain base file using the suggestion that outline fonts have the letter "on initialization version of METAFONT, INIMF, use the prepended such that an outline font created with following line: cmssl7 would thus become ocmss17. This way the inimf plain input local dump names and values of fonts which Knuth has per- fected will remain untouched and we can happily Similarly, for the Computer Modern base file use: play with the font "ocmssl7.mf" without fear of inimf plain input cmbase input local dump reprimand. Below is a sample of some of the type of information I would change at the beginning of Now that it is a part of your base files, you simply the file ocmssl7.mf. need to set the boolean switch outlining to true to make an outline font. Here is one way to make a % This is OCMSS17.MF in text format, 17 point sans serif font: % as of September 10, 1988. mf %cm \mode=varityper; % Computer Modern Sans Serif Outline 17.28 pt outlining:=true; input cmssl7 if unknown cmbase: input cmbase fi After making my first few outline fonts I was feeling quite pleased with them so I happily sent them off to Professor Knuth thinking I had some interesting results to share. Here is a small sample font-identifier:="0CMSSU; font-size 17.28pt#; of how the characters had turned out. Some were ffuaroony looking! % rule_thickness#:=.6pt#; % old value Notice the last two characters in the line rule-thickness#:=lpt#; % new value above have fairly thin strokes, so the result- % thickness of lines in math symbols ing outline characters appear mostly filled in. % notch_cut#:=32/36pt#; % old value Professor Knuth suggested that the values for notch-cut#:=17pt#; % new value rule-thickness be increased to match the other % maximum breadth above or below notches characters, so I experimented a bit and came up % cap-notch_cut#:=46/36pt#; % old value with rule-thickness=lpt for the font sample I cap-notch_cut#:=17pt#; % new value sent, cmssl7 (a 17pt sans serif font). Another pa- % max breadth above/below uppercase notches rameter which he suggested I change was notch-cut. Looking at the W reveals why. The notch-cut pa- % and of course the remaining fifty-eight rameter helps "black" fonts look correct at the % parameters in a parameter file meeting place between diagonal strokes by remov- ing pixels there. While I was at it, I also found that The title is changed to reflect our new name the capnotch-cut parameter, when set to a very and date of creation. The line outlining: =true; high value, made the outline fonts look less dark. is used here to show an alternative to placing it Knuth's suggestion of setting the notch-cut value on the command line, and the fontidentifier is also to 17pt# (relative infinity) helped out considerably. changed to have the outline present (OCMSS). The Here is our reworked W. other changes to the file are changing the values for notch-cut, capnotch-cut, and rule-thickness, Some were better looking! # = as they are. Another issue to be addressed is that of font This small amount of tuning I have found to naming conventions. The method supplied above be adequate for most of the outline fonts I have has the side-effect of creating METRFONT runs with created. Here are some samples to show how well the names "cmss17.600" for a GF file, "cmssl7.tfm (or not) particular types of Computer Modern fonts for a TFM file, and "cmssl7.log" for the log file look in outline form. 38 TUGboat, Volume 10 (1989), No. 1

Computer Modern Roman Outline Here is a sample of OCMBX12, OCMSL12, and 5pt the lazy brown fox jumped OCMIT12: THE LAZY BROWN FOX JUMPED

]Opt the lazy brown fox jumped THE LAZY BIROWN FOX JUMPED

B2pt the lazy brown fox jumped THE LAZY BROWN FOX JUMPED

The sans serif fonts, on the other hand, with nearly uniform thickness in hair, stem, and curve Computer Modern Sans Serif Outline are better subjects for outlines than the serifed fonts 8pt the lamy brown fox jumped and, I thought, came out rather nicely. Personally THE LAZY BROWN FOX JUMPED I thought that the CMSSDC (Computer Modern Sans Serif Demi-Bold Condensed) font came out looking the best of those that I tested. It looks like this:

12pt the lazy brown fox jumped THE LAZY BROWN FOX JUMPED

Computer Modern Typewriter Outline > Opt the lazy brown fox jumped, ThE LAZY BREW FOX JUMPED I hope others will do some experimenting with outline fonts and share their results with the rest of US. A few general observations that may be obvious but need to be said anyway are that the larger the font size, the better the "outline" due to the overall thickness of the digital pen strokes. This means that the five through ten point sizes are not really ideal We can see from these samples that fonts which for outline fonts for a 300dpi laser printer. I will have a large degree of variance in the stem, hair, be working on changing some parameters to make curve, and vair parameters, such as Computer better low-resolution fonts and report on the results Modern Roman fonts, do not make particularly in a future issue. For now, though. we can see for good-looking outline fonts; often the horizontal bars ourselves how they look with the resolution of the come out looking black (or nearly so). This is APS phototypesetter (722.909 pixels per inch) since also true for most variations of the Roman family, this article was typeset with them. including CM bold (CMBX), slant (CMSL), and italic (CMTI). TUGboat, Volume 10 (1989), No. 1

Font News Dominik Wujastyk Graphics Concrete Roman and Italic Computer Graphics and TEX - A Challenge The new book Concrete Mathematics by Ronald L. Graham, Donald E. Knuth and Oren Patashnik* David F. Rogers is naturally typeset using TEX, and also uses new Aerospace Engineering Department typefaces. The maths is set in AMS Euler, a United States Naval Academy typeface designed by Hermann Zapf for the AMS. Of late there has been considerable interest in the The text is set in special versions of Knuth's CM inclusion of graphics output within a docu- family roman and italic, with weights designed to ment. Programs such as gnum, Fig, blend with AMS Euler. This has been named w, and TransFig seek to provide a mechanism for the Concrete Roman and Italic. inclusion of graphics within a '&$ document. Each Zapf's design for AMS Euler is intended to sug- of these programs attempts to provide a nearly gest the look of mathematics as written on black- complete environment for the design and generation boards. This is how maths has chiefly been written of line art or halftones for inclusion in TEX. All by generations of maths teachers and researchers are worthwhile efforts. However, each suffers from a and is the medium in which most mathematics has serious problem - device dependence. For example. always been seen by most mathematicians. The face the PICQ~Xmacro package is too large to run on is distinctly calligraphic, as opposed to italic, and a microcomputer or in fact many workstations- in my view achieves the effect it seeks. But it faces it really requires a special large implementation the same difficulty as any striking and original new of QX; Fig and TransFig are graphics device type design: it initially distracts the reader from dependent (Sun workstations); gnum only gen- the underlying text. It would be interesting to hear erates IPW compatible output; et~.Yet one of from anyone who reads Concrete Mathematics right the strong attractions of is its device inde- through how the typefaces fare after protracted pendence. l&X itself runs on literally dozens of reading. different machines from Crays, through the latest The Concrete roman face appears to have Silicon Graphics, Ardent, and Stellar supermini- features in common with the CM typewriter font, computer engineeringlscientific workstations, to a although at the time of writing I have not seen the lowly PC XT running MS-DOS. parameter files. It is a face somewhat in the genre Systems such as Fig, Transfig and of Bigelow's Lucida or Carter's Bitstream Charter, m, gnumbasically require the user to recreate graph- though different from these, of course. ical output or to generate it ab znztzo. This is rather For an example of the Concrete and Euler inefficient. There are literally dozens of graphics fonts, see Knuth's article "Typesetting Concrete", programs that produce better graphical output, page 31 in this issue. more efficiently than any of these systems. Lucida An alternate technique for importing graphics into is to use the \special command. Unfortu- In December 1988 Chuck Bigelow informed me that: nately, this requires giving up device independence. Atari is soon (January 1989) bundling Lucida Further, not all dvi drivers support all \special text fonts with its Postscript clone upgrade commands. for its laser printer, the SLM 804. The Lucida fonts include the text character A Suggested Minimal Set of Graphics set. The Lucida math fonts will also be Macros available for Atari systems, but from the Graphics can be incorporated into TEX documents Imagen Corp., later in 1989. Also, QMS- most efficiently by importing the output of graphics Imagen are bundling Lucida fonts in the programs directly into the document in the same character set with a software Postscript form of Plain commands. The important clone "UltraScript PC" for IBM PCs and question is how to do this easily and efficiently. various printers. The Lucida TEX math fonts Fortunately, only passive graphics is contained in a will also be available from Imagen for that publishable document. Consequently, the functional system. requirements for graphics is quite limited (see Refs. 1 and 2). Specifically, these are the ability to move the * Reading, Mass.: Addison-Wesley, 1989. TUGboat, Volume 10 (1989), No. 1 writing instrument both invisibly and visibly about \linethickness#l (Line thickness) the writing surface to create thin lines and small #1 The thickness of a thin line. Default is lpt. dots (points), to 'plot' finite sized areas called pixels in various colors or monochrome and to generate \setrsl#l#2 (Set resolution) text at specified size, orientation and location. It #1 The number of pixels in the horizontal is convenient to be able to specify movements and direction within the viewport. locations in either absolute or relative coordinates. #2 The number of pixels in the vertical direc- Additionally, it is convenient to be able to initialize tion w the graphics system, to explicitly exit the graphics Set resolution applies only to the \setpxl system and to specify the size and location of the command given below. It should be called only writing surface. Finally, it is convenient to be able once within a picture. to specify the thickness of thin lines. A small suite of less than a dozen and a half ba#1#2 (Move absolute) Plain 'I&$macros can provide this functionality. #1 The distance to be moved invisibly in a hor- Only two of these functional requirements create izontal direction (x-direction) in absolute difficulties. Specifically, character generation at coordinates, i.e., from the origin set by the arbitrary orientations is bothersome. Initially, viewport command. character generation orientations should be limited #2 The distance to be moved invisibly in a to horizontal and a 90 degree rotation counter- vertical direction (y-direction) in absolute clockwise from the horizontal. The latter can be coordinates, i.e., from the origin set by the accomplished by using METRFONT to generate a viewport command. rotated font. The rotated font is positioned and displayed by stacking the character boxes vertically. Moves the cursor from the current cursor po- Additionally, the generation of halftone images is a sition to that specified by #I, #2 in absolute bit difficult (see below). coordinates. Currently color is not normally incorporated br#l#2 (Move relative) into 'l&X documents. However, with technological #1 The distance to be moved invisibly in a advances, this is not far off. Hence, it must be horizontal direction (x-direction) in relative considered. coordinates, i.e., from the current location The Macros of the cursor. The macros and their suggested calling arguments #2 The distance to be moved invisibly in a required to implement this functionality are briefly vertical direction (y-direction) in relative described below. Unless otherwise specified units coordinates, i.e., from the current location are any acceptable QXvalues. of the cursor. Moves the cursor from the current cursor po- \beginpicture (Begin picture) sition to that specified by #I, #2 in relative Sets any required initial parameters. Saves all coordinates. current parameters. \da#1#2 (Draw absolute) \endpicture (End picture) The distance to be moved visibly in a hor- Resets all parameters to the saved values. izontal direction (x-direction) in absolute coordinates, i.e., from the origin set by the \viewport#1#2 (Viewport) viewport command. #1 The horizontal size of the area for the The distance to be moved visibly in a graphics. vertical direction (y-direction) in absolute #2 The vertical size of the area for the graphics. coordinates, i.e., from the origin set by the Default size is \hsize by \vsize viewport command. The origin is in the lower left corner, positive Draws a line from the current cursor position to upward and to the right. that specified by #1, #2 in absolute coordinates. Viewport is the common computer graphics name for this function. \dr#l#2 (Draw relative) #1 The distance to be moved visibly in a horizontal direction (x-direction) in relative TUGboat, Volume 10 (1989), No. 1

coordinates, i.e., from the current location The red, green and blue components of the of the cursor. color are given as decimal numbers in the range #2 The distance to be moved visibly in a 0 to 1 with 0 representing no intensity of the vertical direction (y-direction) in relative component and 1 full intensity. coordinates, i.e., from the current location Black is indicated by r = 0, g = 0, b = 0. of the cursor. White is indicated by r = 1, g = 1, b = 1. Draws a line from the current cursor position to The default is black. that specified by #I, #2 in relative coordinates. \setpxl#1#2#3#4#5 (Set pixel) \pa#1#2 (Point absolute) #I The x-coordinate of the lower left corner of #I The distance to be moved visibly in a hor- the pixel. izontal direction (x-direction) in absolute #2 The y-coordinate of the lower left corner of coordinates, i.e., from the origin set by the the pixel. viewport command. #3 The red component of the color of the pixel. #2 The distance to be moved visibly in a vertical direction (y-direction) in absolute #4 The green component of the color of the coordinates, i.e., from the origin set by the pixel. viewport command. #5 The blue component of the color of the pixel. Moves from the current cursor to that specified by #I, #2 in absolute coordinates and A pixel is a finite area of the writing surface creates a dot at that point. extending to the right and upward from the location specified by the coordinate given in #I \pr#l#2 (Point relative) and #2. #I The distance to be moved visibly in a The red, green and blue components of the horizontal direction (x-direction) in relative color are given as decimal numbers in the range coordinates, i.e., from the current location 0 to 1 with 0 representing no intensity of the of the cursor. component and 1 full intensity. #2 The distance to be moved visibly in a For monochrome (gray scale) images the mono- vertical direction (y-direction) in relative chrome value is obtained by averaging the red, coordinates, i.e., from the current location green and blue components. of the cursor. \setgray#l#2 (Set gray levels) Moves from the current cursor position to that specified by #I, #2 in relative coordinates and #I The number of gray levels available. creates a dot at that point. #2 Parameter that determines the gray level representation scheme. \text#l (Text) p - patterning (see Ref. 3 and below) #I The text string to be plotted. d - dither (see Ref. 3) The current font is used. Default is crnrl0. Using patterning the maximum number of \tangle#l (Text angle) available gray levels depends on the resolution of the output device. #1 The angle ccw in degrees from the horizontal at which text is to be plotted. Initially only With dither the specified maximum number of 0 and 90 degrees are allowed. gray levels sets the size of the dither matrix. It must be a power of 2. \setrgb#l#2#3 (Set rgb) \setlut#1#2#3 (Set look-up table) #I The red component of the current drawing color. #I Number of red bits #2 The green component of the current drawing #2 Number of green bits color. #3 Number of blue bits 93 The blue component of the current drawing The number of shades or intensities of red, color. green, and blue are 2#l, 2#2, and 2#3 respec- tively. The number of colors is 2#1+#2+#3. 42 TUGboat, Volume 10 (1989), No. 1

Implementation Considerations of generating these intensity levels is to create a Since normal rn output is ultimately onto raster special graphics font using METAFONT. One word scan devices, e.g., laser printers and digital pho- of caution is in order: the number of 2 x 2 patterns totypesetters, the line drawing macros must im- depends on the available spatial resolution. For plement Bresenham's line drawing algorithm (or a example, for a 2 x 2 pattern grid, an image digitized DDA) (see Ref. 3). PICI'EX, in fact, does this using with 512 pixels across its width requires a minimum the period as the plotting character. Although using width on the page of a 300 dpi output device of the period as the plotting character achieves device 3.41 inches. This assumes that one physical output independence, if variable line thickness is required, device dot is used for each horizontal grid location. using only the period as the plotting character is Thus, only 5 intensity levels are available. Higher not sufficient. resolution output devices, e.g., phototypesetters, Several alternate techniques suggest them- yield more intensity levels. Minimum acceptable selves. Two are mentioned here. The first is to use output resolutions are 1000-1200 dpi. Conse- METAFONT to define graphic plotting characters, quently, 300 dpi laser printers would be useful for e.g., various sized dots, squares or diamonds from proofing only. One additional subtlety should be which various thickness lines can be constructed. mentioned. Unless the patterns are carefully se- The second is to directly define various size squares lected, moirk as well as other undesirable patterns using \hrule or \vrule (Ref. 4 page 64) to use in appear in the output. These can be minimized constructing the various thickness lines. In either by randomly rotating the patterns 90, 180 and case the 'symbols' should be overlapped to decrease 270 degrees. Unfortunately, unless a font rotation aliasing effects. macro becomes available, this feature requires four Inclusion of photographs or continuous tone different graphics fonts. images in requires dealing with pixels to dig- Dither introduces controlled randomness into itally represent these pictures. Hence the \setpxl the digitized image to produce the impression of macro above. Pixels have varying intensity. Printers multiple gray levels. Intensity resolution is increased use a photographic screen process called halftoning without loss of spatial resolution. The algorithm is to print continuous tone images. There are two conceptually quite simple: principal digital analogs of this process: patterning for each scanline in the image and dither (see Refs. 3, 5 or 6). Patterning gives for each pixel along the scanline up spatial resolution to achieve intensity resolution. determine the position in a dither matrix Dither introduces randomness into the digitized i = (x Mod n) + 1 image to give the impression of multiple intensity j = (y Mod n) + 1 (gray) levels without losing spatial resolution. Both, determine the pixel display value actually print only black 'dots' on 'white' paper. if image pixel intensity(x, y) < Both are easily extended to color. dither matrix(i,j) then In patterning, elements of a small grid are write black pixel either black or white. For example a 2 x 2 grid using else a single dot size yields 5 intensity levels as shown write white pixel here end if next pixel next scanline Details are given in Refs. 3 and 6. The number of apparent intensity levels depends on the dither The fifth intensity is, of course, no dots. matrix. Dither matrices are square. Their sizes Multiple dot sizes can be used. With multi- typically increase by factors of 2, e.g., 2 x 2, 4 x4 ple dot sizes, the number of intensity levels is and 8 x 8. The number of apparent intensity levels (width height of the grid)(the "umber of dot sizes +I) is the dither matrix size squared, e.g., an 8 x 8 From this it is easy to see that a 2 x 2 grid with 3 dif- dither matrix yields 64 apparent intensity levels. ferent dot sizes yields 256 different intensity (gray) The optimal 2 x 2 dither matrix is levels. However, not all these patterns necessarily yield unique intensity levels. Monochrome images are quite adequately represented by 256 intensity (gray) levels. Note also that 256 is precisely the number in a new font. Thus, one method TUGboat, Volume 10 (1989), No. 1

The 4x 4 dither matrix, which can be derived from Table 1: Standard Display File (.sdf) Codes the 2x2 matrix, is Code Operation parameterst 08210 Move Absolute X,Y

Point Absolute X,Y 15 7 13 5 Draw Absolute X,Y Additional intensity levels can be obtained using Move Relative multiple dot sizes. Tj$ has quite adequate facilities Ax, AY for implementing a dither algorithm. Point Relative Ax, AY Draw Relative Ax, AY Using the Macros Text Text string The set of TEX graphics macros described above Set color red, green, blue can certainly be used directly to create both line art and halftones. However, except for touch-up Set look-up table red bits, green bits, work, that is not their intended use. Their intended blue bits use is as the end product of a filter pipet that can Set pixel X, y, red, green, blue be processed by Tj$ in a device independent way. New frame Conceptually, the intended pipeline is Pause The output of your favorite graphics program Set resolution xresolution, yresolution is saved into a file. Print message Message string A program converts this format to a neutral file format here called the standard display file tx~are floating point numbers in NDC; i.e., in the range format (.sdf). 0 5 x, y 5 1.0. red, green, blue are floating point numbers in A program converts the .sdf format to a TEX the range 0 5 red, green, blue 5 1 with 0 E no intensity and 1 full intensity. Red bits, green bits, blue bits are powers file containing only the macro calls described of 2 (see Ref. 1 for a discussion of look-up tables). This table above. is taken from Ref. 1. TEX processes this file in the normal fashion producing a .dvi file. An output driver converts the .dvi file to some number, followed by the appropriate information device dependent form, e.g., Postscript, HP required by that operation. All coordinate values LaserJetf, phototypesetter, etc. are specified as floating point numbers in the range 0 5 x 5 1.0, 0 5 y 5 1.0. All items are separated Assuming that the output of your favorite graphics by commas. A simple standard display file for a program is already saved in a file, then the UNIX square is: pipe command line is 0, 0.05, 0.05 graf 2sdf < graphicsf ile : sdf 2tex > file. tex 2, 0.95, 0.05 2, 0.95, 0.95 Standard Display File Format 2, 0.05, 0.95 The concept of storing a picture in a data file 2, 0.05, 0.05 is part of current international standards efforts. Using the macros discussed above the corresponding The applicable graphics standard is that for the code is: Computer Graphics Metafile (CGM) (see Refs. 7 and 8). However, the CGM is somewhat more detailed and complex than required for the current application. A simple alternative, here called the standard display file, is given in Table 1.t The first line of the standard display file contains an identification string. Each subsequent line of the file begins with an operation code

fpipe is used here in the context of a UNIX or MS-DOS pipe. The format is simple enough that a picture can be $A similar concept has been in use at the author's home easily modified or, in fact, generated using a text institute for more than a decade. TUGboat, Volume 10 (1989), No. 1 editor. The format also allows easy extension to A Portable Graphics Inclusion include local or additional functionality. Bart Childs Conclusions Alan Stolleis The graphics macros presented above provide Don Berryman all the capability currently, and for the near future, One of the serious limitations of current usage required to include publication quality line art is the lack of a portable inclusion of graphics. within source files. They also include all the We propose a means of making this possible. It required capability to seriously begin experimenting will require a little discipline on the creation of with the direct inclusion of halftone images within drivers; the procedures outlined herein should make TEX source files. Including publication quality it straightforward to add this to existing drivers. halftone images within source files requires Graphics inclusion has been a part of the both further development of digital 'halftoning' drivers from the Computer Science Department at techniques and the general availability of higher Texas A&M since soon after the initial release of resolution output devices. the earliest QMS-QUIC drivers. In these cases The Challenge it required significant positioning by the user and therefore became dependent upon the particular The Challenge is for the macro gurus to implement printer the document was destined for. This the above TQX graphics macros and for the META- violated the intent of the dvi file, namely being FONT gurus to generate the required fonts. I'll be device independent. Our previous graphics inclusion happy to consult on the graphics aspects of the was much like the "Ph.D. with a screwdriver" development, to test the results and to implement concept. the filter program from .sdf format files to m. It is my (Bart Childs) opinion that in spite Aerospace Engineering Department of the beauty, power, and widespread use of Post- United States Naval Academy Script, it is not a suitable answer for output. Annapolis, MD 21402, USA There are two reasons for this opinion: E-mail: df rOusna .navy. mil rn A convenient manner for incorporating fonts References from METAFONT is not yet in the public domain. PostScript downloading of bitmaps is 1. Rogers, David F. and Adams, J. Allan, Math- inconvenient at best! ematical Elements for Computer Graphics, 2nd rn The size of Postscript files is inordinately large, Edition McGraw-Hill Book Co., New York, 1990, and use of the system in networks both clogs the Appendix A. (Available in August 1989.) network and makes the printing of documents 2. Rogers, David F. and Rogers, Stephen D., A happen at a fraction of the rated speed of the Raster Display Graphics Package for Education, printer, especially if you use Computer Modern IEEE Computer Graphics & Applications, Vol. 6, fonts. No. 4, April 1986, pp 51-58. 3. Rogers, David F., Procedural Elements for Com- These comments should not be taken to imply that the immense contribution of PostScript is puter Graphics, McGraw-Hill Book Co., New York, 1985. not appreciated. I think that Postscript is in severe need of a binary mode. Another question Knuth, Donald E., The Wbook, Addison-Wesley of relevance for de fncto standards is, will it be Publishing Co., Reading, MA, 1984. Knuth, Donald E., Digital Halftones by Dot good for three-dimensional graphics? Many other Diffusion, ACM TOG, Vol. 6, pp 245-273, 1987. questions need to be answered before we should Jarvis, J. F., Judice, C. N., and Ninke, W. H., A treat it as a standard. survey of techniques for the display of continuous We need only a few elements to enable portable tone pictures on bilevel displays, Comput. Graph. graphics inclusion. These elements are: Image Process., Vol. 5, pp 13-40, 1976. 1. A standard template for the allocation of the Computer Graphics Metafile for the Storage size of the graphical area in the document. and Transfer of Picture Description Information 2. A standard means of putting the size of the (CGM), IS0 8632-Parts 1 through 4: 1987; also, graphical area in the dvi file. ANSIIX3.122-1986. 3. A standard means of communicating the "name" Arnold, D.B., and Bono, P.R., CGM and CGI, of the file containing the graphics. Springer-Verlag, Heidelberg, 1988. TUGboat, Volume 10 (1989), No. 1 45

A typical line of TFJ to cause the inclusion of author has rewritten the original utility in CWEB a graphical element would be and made extensive changes. This output file \f iginput(name)Choriz)CfloatHcaption) contains text like: The four arguments are: % This file created by cgmsize Version 0.1 name - The name is reasonably straightforward. \hsize %(width) Notice that it does not have an extension. 3.000000in %(height File names could be the biggest problem in % Graphics file : name portability between dissimilar systems. % Date of creation: 01/06/89 horiz - This positioning command would have % Graphics designer : Anonymous one of three options: \left, \center, or \f igdraf ttrue \right. Text could flow around the graphics % vsize is estimated. as well but that should be handled outside Lines 1, 4, 5, 6, and 8 are commentary. We intended this consideration. We have borrowed this idea that the \f iginput macro would or would not place from Tom Reid's comments about positioning the word "DRAFT" in the margin based on the around figures. contents of the seventh line. If the cgm file does not float - This argument should be \tied or \float, exist, the utility will prompt for lines two through which tells TFJ to put the inclusion in a \vbox eight. The second line shows the default value if an or an \insert. answer is not given to the width prompt. caption - The caption should be optional. If In addition to creating a properly sized and present, it should include all required font placed \vbox for the inclusion of the graphics, the changes. \f iginput macro should furnish a \special to There is a graphics standard which has been communicate the name of the file containing the approved by ANSI and ISO. ANSI X3.124-85 and graphics. We use a line like: ANSI X3.124.1-85 is the Graphics Kernel System \specialCcopy(name3) (GKS). The GKS standard defines how graphics Notice that the filename does not include an interfaces function and how GKS data files should be extension; remember the goal is device inde- stored. The computer graphics interface, CGI, is a pendence! The actual graphics file name should program that provides user support for the creation have the appropriate extension furnished by the of graphics. The Graphics Kernel System Metafile, driver depending upon the intended printer. We GKSM, is simply an audit trail of the commands used suggest the following three character (or shorter) by the CGI to create a graphic image. Within the extensions: GKS standard, graphic images have associated cgm files. The acronym comes from "computer graphics ps Postscript. metafile" and is defined by ANSI X3.122-86 or IS0 qic QMS QUIC engines. standard 8632. The cgm is a device independent file lbp Vanilla Canon engines or nearly compatibles. that decribes a graphic image. The cgm is similar in j ep Hewlett Packard Laser Jet and compatibles. nature to the dvi files of The GKSM is different m. One additional burden must be placed on from the cgm in that the cgm is a definition and the \f iginput macro. Some printers will require translation of the final graphic image. The cgm will placement of the "cursor" at the top left corner not have all the steps used to produce the picture. of the box for the graphics, some will require it Most vendors deliver reasonable support for a to be at the bottom right; some will require the GKS environment or it is available from third party width of the graphics; etc. We propose that the vendors for common systems. Data General (DG) \vbox have a height as indicated by the siz file. provides support to its end user community in a To enable device independence, the contents of the variety of ways, one being with the Comprehensive \vbox should contain: Electronic Office - Drawing Board (CEO-DB). Pro- gramming support is also provided for ANSI F77, 1. An \hrule with the width of the box, height PL/l, and C languages. DG also provides extensive of lsp (scaled point), and zero depth. GKS support to output devices. These include 2. An \hrule with the height of the box, zero DG1s graphics peripherals, Postscript devices, the depth, and width of lsp. HP family of printers, and others. 3. A \vskip back to the top left corner of the Our third author created a utility which inputs box. name. cgm and creates a file name. siz. Our second 4. The above \special. TUGboat, Volume 10 (1989), No. 1

Drivers should be modified to notice rules that have lsp vertical and horizontal spans and to remem- Output Devices ber the nonzero dimensions in separate registers. This gives all drivers the necessary information to position themselves correctly and to copy the 'l&X Output Devices appropriate data file. We recommend passing the current position (the \vskip in item 3) at the top Don Hosek left because it agrees with the coordinate system of The device tables on the following pages list all dvi files in some sense. We also understand that the TEX device drivers currently known to TUG. many would prefer adding two arguments to the Some of the drivers indicated in the tables are con- \special's copy, the height and depth. If this is sidered proprietary. Most are not on the standard done, we strongly recommend it be done in points distribution tapes; those drivers which are on the only. This should be a decision by the standards distribution tapes are indicated in the listing of committee. sources below. To obtain information regarding The following is an outline of how we would an interface, if it is supposed to be included in create graphics and incorporate them in l$$ docu- a standard distribution, first try the appropriate ments: site coordinator or distributor; otherwise request Create a GKS file by use of utilities or applica- information directly from the sites listed. tions that use GKS. We use CEO-DB to create The codes used in the charts are interpreted a graphics image. below, with a person's name given for a site when Have GKS output a cgm file. In our case with that information could be obtained and verified. CEO-DB we would create a cgm file from the If a contact's name appears in the current TUG CEO environment. membership list, only a phone number or network Run cgmsize to create the appropriate file address is given. If the contact is not a current TUG needed by using \f iginput. member, the full address and its source are shown. Have a utility that creates the appropriate When information on the drivers is available, it is printer file. included below. We also have to run a utility that properly Screen previewers for multi-user computers are prepares the graphics output file for the desired listed in the section entitled "Screen Previewed. If printer. This utility will strip off characters at a source has been listed previously under source^^^, the beginning and end of the file, and reset the then a reference is made to that section for names printer for l$$. of contacts. Run m. Corrections, updates, and new information for After outlining this prototype system, we re- the list are welcome; send them to Don Hosek: alized that the format would be appropriate for Bitnet U33297@Uicvm, dvi inclusion as well. We might want to create Internet U33297QUicvm.Uic .Edu a figure or table using Ul$$, qCIfEX, T2D4, or (postal address, page 3). other macro package that uses lots of memory. A Sources dvisize utility could produce an appropriate size file. A dvimerge file could then be run when needed ACC Advanced Computer Communications, to produce a LLcomplete"dvi file. Diane Cast, 720 Santa Barbara Street, Santa Barbara, We are forwarding this to Robert MCGaffey and CA 93101, 805-963-9431 (DECUS, May '85) his group working on printer standards. We will be Adelaide Adelaide University, Australia pleased to furnish this and the appropriate sources The programs listed under Adelaide have been sub- to all interested parties. Please respond with com- mitted to the standard distributions for the appropriate ments to the first author and copy Mr. MCGaffey. computers. The Postscript driver permits inclusion of Postscript files in a file. The driver is described in TUGboat, Vol. 8, No. 1. AMS American Mathematical Society, Barbara Beeton, 401-272-9500 Internet: BNBQMath.AMS . corn Arbor ArborText, Inc., Bruce Baker, 313-996-3566, Arpanet: BwbQArbortext. Corn ArborText's software is proprietary and ranges in price from $150 to $3000. The drivers for Postscript TUGboat, Volume 10 (1989), No. 1 printers, the HP LaserJet Plus, the QMS Lasergrafix, of Germany, Dr. Wolfgang Appelt, and Imagen printers are part of their DVILASER uucp: unido ! gmdzi ! zi . gmd.dbp. de ! appelt series. The drivers all support graphics and include ~p ~~~l~tt-~~~k~~d,Stuart Beatty, 303-226-3800 other special features such as use of resident fonts or INFN INFNICNAF, Bologna, Italy. Maria Luisa landscape printing when supported by the individual Luvisetto, 51-498286, Bitnet: MiLtexQIcineca2 printers. The CNAF device drivers are on the VAX/VMS Printing on the Autologic APS-5 and p-5 photo- distribution tape. typesetters with DVIAPS includes support of Autologic standard library fonts and logo processing. Interg'ph Intergraph. Mike Cunningham, 205-772-2000 Aurion Aurion Tecnologia SA de CV, Armando Jinich, Arquimedes #3, 501, Polanco 11570, JDJW JDJ Wordware, John D. Johnson, Mkxico, D.F., 905-545-7315 415-965-3245, Arpanet: M. JohnQSierra.Stanf ord.Edu Bochum Ruhr Universitat Bochum, LaserPrint LaserPrint, P. 0. Box 35, D-6101 Norbert Schwarz, 49 234 700-4014 Frankisch Crumbach, Federal Republic Germany, +49 6164 4044 Caltech California Institute of Technology, The driver supports graphics inclusion in device Chuck Lane, Bitnet: CELQCITHEX dependent format. PK font files are used. This Canon Canon Tokyo, Masaaki Nagashima, program is proprietary. Contact LaserPrint for further (03)758-2111 informat ion. Carleton Carleton University, Neil Holtz, LLL Lawrence Livermore Laboratory 613-231-7145 LSU Louisiana State University, Neal Stoltzfus, CMU Carnegie-Mellon University, Howard Gayle, 504-388-1570 412-578-3042 Milan1 UniversitB. Degli Studi Milan, Italy, Columb. Columbia University, Frank da Cruz, Dario Lucarella, 02123.62.441 212-280-5126 Milan2 Universitk Degli Studi Milan, Italy, COS COS Information, Gilbert Gingras, Giovanni Canzii, 02123.52.93 514-738-2191 MIT Massachusetts Institute of Technology, DEC Digital Equipment Corporation, John Sauter, Chris Lindblad, MIT A1 Laboratory, 617-253-8828 603-881-2301 The drivers for Symbolics Lisp machines use the The LN03 driver is on the VAX/VMS distribution Symbolics Generic Hardcopy interface as a back end, so tape. it should work on any printer that has a driver written DECUS DECUS Program Library, Library for it. The printers listed in the table indicate drivers Order Processing, 219 Boston Post Road, BP02, the program has been tested on. Marlboro, MA 01752, 508-480-3418, 508-480-3659, The UNIX drivers for PostScript and QMS printers 508-480-3446, both support landscape printing and graphics inclusion The previewer and PostScript driver are combined via specials. in a single program, DVIOUT. The program uses GF, MPAE Max-Planck-Institut fiir Aeronomie, PK, and PXL files. It allows landscape printing, H. Kopka, (49) 556-41451, Bitnet: Mio40LQD606wd01 inclusion of MacDraw bitmaps, inclusion of Tektronix MPS Micro Publishing Systems, Incorporated, plot files, drawing of line, arc, point, and filled polygons #300-1120 Hamilton Street, Vancouver, B.C., through \special commands, and m-XeT support. Canada, V6B 2S2, 604-687-0354 Written in C and Macro-32. The program comes with The mprint laser printer drivers allow landscape a well-featured Postscript symbiont. There is a charge printing, collating, odd or even page selection, graphics of $35 for DECUS members, $40 for non-members to inclusion, and direct output to the printer. A translation obtain this program. It is distributed on a 600' 6250 bpi utility for HP soft fonts is included with the HP driver magnetic tape. and TFM files for PostScript fonts and a utility for ENS Ecole Normale Superieure, Chantal Durand, creating TFMs from AFM files are included with the Centre de Calcul, Ecole Normale Superieure, PostScript drivers. The drivers use GF, PK, and PXL 45 rue dlUlm, 75005 Paris, France files. GA Tech GA Technologies The drivers cost $189 each, $150 for educational GMDl Gesellschaft fur Mathematik und and governmental institutions. Datenverarbeitung, Federal Republic of Germany, MR Math Reviews, Dan Latterner, 313-996-5266 Ferdinand Hommes, Bitnet: GrztexQDbngmd21, NLS Northlake Software, David Kellerman, +49 228 8199621 503-228-3383 GMD2 Gesellschaft fur Mathematik The VAX/VMS Imagen driver supports graphics. und Datenverarbeitung, Federal Republic TUGboat, Volume 10 (1989), No. 1

Oc6 OcC Nederland B.V., Marius Broeren, but the IBM PC version. Source is available on request. Division Office Automation, P. 0. Box 101, Cost varies from 300-1848DM. 5900 MA Venlo, The Netherlands, +31.77.76466 x135 Stanford Stanford University OCLC OCLC, Thom Hickey, 6565 Frantz Road, The Imagen driver from Stanford is present on Dublin, OH 43017, 616-764-6075 most distributions as the file DVIIMP.WEB. It provides OSUl Ohio State University, John M. Crawford, limited graphics ability. 614-292-1741, Bitnet: Ts0135QOhstvma, Sun Sun, Inc. Internet: Crawf ord-jQOhio-state. Edu Sydney University of Sydney, Alec Dunn, 0SU2 Ohio State University, Ms. Marty Marlatt, (02) 692 2014, ACSnet: alecdQfacet . ee . su. oz Department of Computer and Information Science, Talaris Talaris, Sam Hassabo, 619-587-0787 2036 Neil Avenue, Columbus, OH 43210 All of the Talaris drivers support Textronix graph- The drivers are distributed on either ANSI or ics. Device-dependent special fonts are used for older TOPS-20 DUMPER tapes, with hardcopy documenta- printers and all previewers: newer printers use PK fonts. tion. There is a $125 service charge (payable to Ohio T A&M1 Texas A&M, Bart Childs, 409-845-5470, State University) to cover postage, handling, photo- CSnet: ChildsQTAMU copying, etc. Graphics is supported on the Data General drivers Philips Philips Kommunikations Industrie AG, for the Printronix, Toshiba, and Versatec on the Data TEKADE Fernmeldeanlagen, Attn. Dr. J. Lenzer, General MV. On the TI PC, graphics is supported Thurn-und-Taxis-Str., D-8500 Nurnberg, on the Printronix and Texas Instruments 855 printers. Federal Republic Germany, +49 911 5262019 There are also previewers available for both the Data PPC Princeton Plasma Physics Lab, Charles General and the TI. Karney, Arpanet: Karney%PPC. MFENETQNMFECC. ARPA T A&M2 Texas A&M, Ken Marsh, 409-845-4940, Versatec output from mspool is produced via the Bitnet: KMarshQTAMNIL NETPLOT program. mspool also produces output T A&M3 Texas A&M, Norman Naugle, for the FR80 camera. Color and graphics primitives are 409-845-3104 supported through specials. The QMS driver supports inclusion of QUIC graph- Procyon Procyon Informatics, Dublin, Ireland, ics commands via specials as well as landscape printing. John Roden, 353-1-791323 T A&M4 Texas A&M, Thomas Reid. 409-845-8459, PTI Personal m,Inc., Lance Carnes, Bitnet: X066TR@TAMVMI 415-388-8853 The mrox package includes a GF/PK/PXL to Graphics output is supported on Imagen, Post- Xerox font converter (PXLrox2), and utility to build Script, and QMS printers. TFM files from licensed Xerox fonts (Xetrix). The Rad Eye Radical Eye Software, Tom Rokicki. programs are all written in C. Fonts not present on the Box 2081, Stanford, CA 94309, 415-326-5312 Xerox printers can be printed as bitmaps on printers RTI Research Triangle Institute, Randy Buckland, with the graphics handling option (GHO). Arpanet: rcbQrti.rti. org At present the mroxpackage is being distributed The program is available in the comp . sources. misc on a twelve-month trial basis; the trial is free for archives on Arpanet and Usenet. U.S. educational and government institutions, $100 for foreign or commercial institutions. Licensing agreements Saar Universitat des Saarlandes, Saarbriicken, will be available when the trial offer expires. Federal Republic of Germany, Prof. Dr. Reinhard Wilhelm, uucp: [email protected] wsys msys, Joachim Schrod, Kranichweg 1, D-6074 Rodermark, Federal Republic Germany, SARA Stichting Acad Rechenzentrum Amsterdam, +49 6074 1617 Han Noot, Stichting Math Centrum, The LaserJet driver supports graphics inclusion in Tweede Boerhaavestraat 49, 1091 AL Amsterdam device dependent format. PK font files are used. This (see TUGboat, Vol. 5, No. 1) program is proprietary. Contact wsys for further Scan Scan Laser, England, John Escott, information. +l 638 0536 Tools Tools GmbH Bonn, Edgar FuB, Sci Ap Science Applications, San Diego, CA, Kessenicher StraBe 108, D-5300 Bonn 1, 619-458-2616 Federal Republic of Germany SEP Systemhaus fur Elektronisches Publizieren, The Tools implementation of and the drivers Robert Schoninger, Arndtstrasse 12, 5000 Koln, listed are described in TUGboat, Vol. 8, No. 1. Federal Republic of Germany TRC Finl'd Technical Research Centre of Finland, DVIP400 uses PXL files. Landscape printing is Tor Lillqvist, +358 0 4566132, Bitnet: tmlQfingate supported in all versions and graphics inclusion in all TUGboat, Volume 10 (1989), No. 1 49

UBC University of British Columbia, Afton Cayford, (in an interactive message, or as the first line of a 604-228-3045 mail message) to LISTSERVQDHDURZi. Files are obtained UCB University of California, Berkeley, with the command GET filename filetype. Graphics is Michael Harrison, Arpanet: vortexQberkeley. arpa supported only in the DVIALW (Postscript) driver. UCIrvl University of California, Irvine, U Washl University of Washington, David Benjamin Pierre MacKay, 206-543-6259, Arpanet: [email protected] UCIrv2 University of California, Irvine, The programs listed under U Washl are all on the Tim Morgan, Arpanet: MorganQUCI ARPA . standard UNIx distribution tape. U Del University of Delaware, Daniel Grim, U Wash2 University of Washington, Jim Fox, 302-451-1990, Arpanet: grimQhuey udel edu . . 206-543-4320, Bitnet: fox7632@uuacdc The distribution includes a program to convert font The QMS driver for the CDC Cyber was written files generated by METRFONT to Xerox font format. under NOS 2.2 and supports graphics. UIC University of Illinois at Chicago, Vander Vanderbilt University, H. Denson Burnum, Don Hosek, Bitnet: U332978Uicvm, Internet: 615-322-2357 U332978Uicvm.Uic.Edu -Wash St Washington State University, Dean University of Illinois, Dirk Grunwald, U I11 Guenther, 509-335-0411, Bitnet: Guenther@Wsuvml Arpanet: Grunwald8M . Cs .Uiuc .Edu The previewers are available via anonymous FTP Wash U Washington University, Stanley Sawyer, in the directory pub/iptex. tar. Z on a. cs .uiuc . edu. 314-889-6703 The IBM PC LN03 driver is a modified version of U Koln Univ of Koln, Federal Republic of Flavio Rose's DVI2LN3. Graphics support is provided Germany, Jochen Roderburg, 0221-1478-5372, through inclusion of LN03 plotfiles and line drawing Bitnet: A0045QDkOrrzkO s~ecials. All three PXL formats on the PC are U Mass University of Massachusetts, Amherst, supported. The program is available free of charge with Gary Wallace, 413-545-4296 the receipt of a blank disk and return mailer. U MD University of Maryland, Chris Torek, W'mann Weizmann Institute, Rehovot, 301-454-7690, Arpanet: chrisQmimsy .umd.edu Israel, Malka Cymbalista, 08-482443, The UNIX Imagen driver is on the UNIx distribution Bitnet: VumalkiQWeizmann tape. The drivers may be obtained via anonymous FTP Xerox Xerox, Margaret Nelligan, Xerox from a.cs .uiuc.edu in the directory pub/iptex. tar.Z Printing Systems Division, 880 Apollo Street, or from mimsy .umd.edu in the directory tex. El Segundo, CA 90245, 213-333-6058 U Mich University of Michigan, Kari Gluski, XOrbit XOrbit, P. 0. Box 1345, D-8172 Lenggries, 313-763-6069 Federal Republic Germany, +49 8042 8081 UN1.C Aarhus University, Regional Computer This driver supports graphics inclusion in device Center, Denmark dependent format. PK font files are used. This program URZ University of Heidelberg, Federal Republic of is proprietary. Contact XOrbit for further information. Germany, Joachim Lammarsch, Bitnet: Rz928Dhdurdzl Yale Yale University, Jerry Leichter, U Shef University of Sheffield, England, Arpanet: Leichter- j erry0Cs. Yale .Edu, Ewart North, (0742)-78555, ext. 4307 Bitnet: Leichter8Yalevms Utah University of Utah, Nelson H. F. Beebe, DVIDIS is available for anonymous FTP from 801-581-5254, Arpanet: BeebeQScience .Utah.edu Venus. Y cc .Yale. Edu. Log in as anonymous and do a CD All of the Beebe drivers are distributed together. [.DVIDIS]. That directory contains the three required They are available on IBM PC-DOS floppy disks files needed to run the previewer. The image must be (about 6), or 1600bpi 9-track tape in TOPS-10120 transferred using BINARY mode. BACKUPIDUMPER format, VAXIVMS BACKUP for- Screen Previewers - Multi User Systems mat, UNIX tar format, and ANSI D-format. Send tape or disks for a copy. The programs are available for anony- Data General MV mous FTP from SCIENCE.UTAH. EDU on the Internet; T A&M1 information is in the file PS : OOREADME. TXT. A VAXIVMS binary distribution is available for anony- DEC-20 mous FTP (password guest) from CTRSCI .UTAH.EDU. OSU2 ASCII Output 0OREADME.TXT in the login directory gives details. On Utah BBN Bitgraph terminal JANET, the programs may be obtained from the direc- HP9000/500 tory aston.kirk: : [public.texdvi2101. The drivers are available from Listserv on EARN to European Bit- Utah BBN Bitgraph terminal net users. Sending the command GET DRIVER FILELIST IBM MVS 50 TUGboat, Volume 10 (1989), No. 1

GMD GDDM supported devices: IBM 3179, 3192, Cadmus 9200 3193, and 3279 U Koln Milan1 Tektronix 4014 IBM PC .IBM VM/CMS Arbor, PTI EGA, MCGA, UGA, Hercules, Olivetti, UIC Terminals connected through 7171 Protocol Tecmar, Genius full page, ETAP Neftis, Toshiba 3100, converters: Tektronix compatible, VT-640 compatible, AT&T 6300 GDDM driven IBM 3179 and 3279 terminals, Uses GF, PK, and PXL files as well as tuned GDDM driven Tektronix 816 Postscript fonts (the base set available with Postscript DVIview may be obtained by sending $30 (to defray printers). Preview of integrated bit map graphics, font duplication costs), a blank tape, and a return mailer to substitution, magnification on the fly, two-up display of Don Hosek. The program is still in the developmental pages, and searching for character strings are supported. stages, and enhancements will be made in the future. Preview is available for $175. The program uses PK files. Aurion, PTI EGA, CGA, VGA, Hercules Graphics Wash St GDDM driven IBM 3179 and 3279 Card, Wyse WY/700, Genius VHR Full Page Display, terminals AT&T 6300 Uses PXL files at 120dpi. Allows viewing of Uses fonts from the laser printer driver in PK or the page in eight parts normal size or three parts PXL format to display text. Magnification may be set compressed. on entry. Maxview is available for $125. W7mann IBM 3279, 3179-G PTI Previewing is provided by DVI82, the Weizrnann Uses fonts in GF, PK, or PXL format. On the driver for the Versatec plotter. The program uses PXL fly magnification, on the fly inclusion of DVI files, font files. substitution, and 256 character fonts are supported. UNIX PTIVIEW is available for $149. Utah BBN Bitgraph T A&M3 EGA, CGA, Hercules The cdvi program is available for $175. U Wash1 DMD5620 IBM PC/RT Uses GF, PK, or PXL files at 118dpi. tpic output . is supported. The program consists of two parts: a U Ill X-11 Windows program running on the host computer and another .Integrated Solutions that is downloaded to the terminal. UCIrvl .VAX VMS Utah BBN Bitgraph Adelaide AED 512, ANSI-compatible, DEC ReGIS, .SUN DEC VT100, DEC VT220, Visual 500, 550 Arbor Uses PK or PXL files. Uses GF, PK, and PXL files. Preview is available DECUS Tektronix 4014 for $500. Uses PK, GF, or PXL files. UCB INFN DEC ReGIS UCIrv2 Uses PXL files. U I11 X-11 Windows, Sunview Window System Talaris Talaris 7600, 7800 Uses GF, PK, and PXL files. Utah BBN Bitgraph Vaxstation/Unix Screen Previewers - Microcomputers and U Ill X-11 Windows Workstations Uses GF, PK, and PXL files. Vaxstation/VMS Amiga Arbor GPX(U1S) Rad Eye Uses GF, PK, and PXL files. Uses PK files. Included with AmigaQX. Preview is available for $500. Apollo INFN GPX(U1S) Arbor Uses PXL files. Uses GF, PK, and PXL files. Preview is available Philips GPX(U1S) for $500. RTI GPX(U1S) U I11 X-11 Windows System Uses PK files at 78, 94 and 112dpi. Written in .Atari ST ADA. Source is included. W~YS Yale GPX(U1S) Tools Uses PK files at 300dpi. Low-Resolution Printers on Multi-User Systems - Laser Xerographic, Electro-Erosion Printers IBM IBM Prime Siemens Sym- UNlX VAX MVS VM/CMS BS2000 bolics VMS Lisp Agfa P400 Saar Saar SEP SEP

Canon Utah Utah

Utah DEC ProcyonN LS

Utah I 1 Golden Laser 100 1 Utah Utah Utah Utah

HP LaserJet Plus I Utah TA&M2 Arbor Arbor Utah ; Wash St Sherpa A I lmagen Arbor itanford Columb. Utah MIT Arbor Arbor U BC /ander Utah W'mann UMd NLS Utah Utah MPAE LaserPrin MPAE oce

I 1 I I Postscript printers Utah Arbor Arbor OSUl MIT Arbor Arbor Utah I Carleton DECUS ----r-rQMS Lasergrafix Arbor U Wash2 TA&M3 GA Tech

Talaris

Stanford Xerox Dover

I I I 1 Xerox Xerox 270011 Bochum Xerox I U Del ACC Xerox 9700 Arbor Arbor U Mich TI= T A&M4 Low-Resolution Printers on Multi-User Systems - Impact and Electrostatic Printers

CDC Cray Data DEC-10 DEC-20 HP9000 IBM IBM VM Prime UNlX VAX Cyber General 500 MVS VMS MV Apple Imagewriter Utah Utah Utah LSU Utah

DEC LA75, LPlOO 0SU2 Utah Utah Utah Utah

Epson FX/RX Utah Utah Utah Utah

Facit 4542 INFN

Florida Data

MPI Sprinter

Okidata

Printronix

Toshiba

Varian

Versatec U Koln PPC LOW-ResolutionPrinters on Microcomputers and Workstations - Laser Xerographic, Electro-Erosion Printers

Arniga Apollo Atari ST Agfa P400 -4------t-Canon Cordata LP300

f DEC LN03

Golden Laser 100

HP 2680

HP 2688A

Tools ----I--lmagen Kyocera ILaserPrin tArbor

I Arbor I Xerox 9700 +Scan TUGboat, Volume 10 (1989), No. 1 Typesetters JNlX VAX VMS

Allied Linotype CRTronic

Allied Linotype L100. L300P

Allied Linotype L202

Autologic APS-5. Arbor Interg'ph Micro-5

Compugraphic NLS 8400

Compugraphic NLS 8600

Compugraphic 8800

Harris 7500 SARA

Hell Digiset TUGboat, Volume 10 (1989), No. 1

Report from the DVI Driver High Quality Printing of 'l&X - DVI Standards Committee Output Files in the VAX/VMS Environment Don Hosek Marius Broeren & Jan van Knippenberg Oc6Nederland B.V. The newly-constituted TEX Users Group DVI driver standards committee has been working on the OcC-van der Grinten N.V. is the parent of an development of standards for device drivers since international group of companies, the OcC Group, the fall of 1988. This article is a first report on our which distributes, produces and develops a large status to the membership of w Users Group. range of copiers and copying supplies as well as office At the time of this writing, we are in the automation products, including word processors midst of discussion of \special standards for de- and laser printers, for both commercial and design vice drivers. By the 'I?@Users Group meeting engineering offices. this August, we should have a preliminary re- OcC-Nederland B.V. has developed the OcC port on this topic available for distribution to all 6750 laser printer. This printer is based on the interested parties. We welcome all input from well-known engine of the OcC 1900 copier family. members of the community; if you have any The laser printer has a resolution of 508 dpi (20 suggestions, comments, etc. regarding the issue of dots/mm). The printspeed is 23 pages per minute. \special handling, we would appreciate it if you The heavy duty engine prints a target load of up to could send these to Robert MCGaffey (internet: Mc- 200,000 pages per month. Paper input and paper Gaff ey%Orn.Mf enetQNmfecc.Arpa) for distribution output are as advanced as usual for the OcC copiers. to the members of the committee. The level of quality printing of the Oc6 6750 laser The members of the committee are: Robert printer is perfectly suited for printing the output MCGaffey, chair, Oak Ridge National Laboratory; of the high quality typesetting program m. For David P. Babcock, Hewlett-Packard; Elizabeth this reason Ock has developed software for connec- Barnhart, TV Guide; Stephan v. Bechtolsheim, ting the OcC 6750 laser printer to a wide range Integrated Computer Software Inc.; Nelson Beebe, of VAX/VMS computers. On these VAX/VMS University of Utah; Jackie Damrau, University computers TEX runs as an application and the TEX- of New Mexico; Donald Goldhammer, University DVI files are converted to the ECMA/ODA protocol of Chicago; Don Hosek, University of Illinois at of the OcC 6750 laser printer. The combination of Chicago; David Ness, TV Guide; Thomas J. Reid, the high quality typesetting program TEX, the Texas A&M University; David Rodgers, Arbortext, VAX/VMS computer and the OcC 6750 laser printer Inc.; Brian Skidmore, Addison-Wesley Publishing is responsible for a high level of quality printing. Co.; Glenn Vanderburg, Texas A&M University; and Ralph Youngen, American Mathematical Soci- The OcC 6750 laser printer ety. In this part we will describe the printing process. Editor's note: Earlier TUGboat articles dealing The information of the VAXJVMS computer is re- with the subject of DVI driver standards include the ceived via an IEEE 488 interface. This information following: has the ECMAIODA format and is processed in Robert MCGaffey, The ideal T@ driver, 8#2, 161- the Raster Image Electronics. Here the informa- 163. tion is converted into pixels, a processable form for Thomas J. Reid, DVI driver considerations for the Laser Scan Module. The electrophotographic high-volume printing systems, 8#3, 287-291. process consists of six steps: Glenn L. Vanderburg and Thomas J. Reid, 1. charging \special issues, 8#3, 291-300. 2. exposure Shane Dunne, Why w should NOT output Post- 3. developing Script -yet, 9#1, 37-39; addendum, 9#2, 4. transferring 178. 5. fusing 6. cleaning 1. Charging. The 370-inch continuous photo- conductor is a polyester belt coated with a thin layer of zinc-oxide. Zinc-oxide has the following characteristics: in the dark it is not electrically conductive. It is an insulator. But when you expose TUGboat, Volume 10 (1989), No. 1 zinc-oxide to the light it becomes a conductor. The ODA photoconductor is charged from the corona unit. As stated the OcC 6750 laser printer uses the 2. Exposure. The charged parts of the photo- ECMA/ ODA protocol. conductor move in the direction of the exposure What is ODA? area where the Laser Scan Module will expose the ODA, Office Document Architecture, is an photoconductor. The laser discharges the non-black international standard which offers a solution for part of the image (write white engine). The black integrating office systems. ODA is an interchange part of the image is still charged and is called a standard for multi-media documents which has been latent image. produced in order to allow documents (text andilor 3. Developing. This image has to be made graphics) to be interchanged between computer visible. The process is called developing. The systems anywhere in the world. ODA documents latent image is passed along a rotating metal tube can contain information represented in the form to which toner has been applied. We use a dry of character text, raster graphics and geometric monocomponent toner. The toner particles on the graphics. ODA enables communicating systems to tube are attracted by the electrical charge of the interchange documents across networks with the latent image. Now we have a visible black image on integrity of the content, format and layout. It is the photoconductor. possible to reproduce, reprocess, store or print the document in the form intended by the originator. 4.15. Transferring and fusing. The next task To assist in the integration of computer systems, is to bring the image to the paper. This is achieved ODA employs the following established standards: in two transfer steps. In the first transfer step a the character content of ODA is compatible soft belt is pressed up against the photoconductor with IS0 6937, and thus with Telex and and picks up the image. The rubber belt is heated Teletex. and at a temperature of 105 degrees Celsius, the 0 the geometric graphics content is compatible melted toner is fused on the warmed paper (second with IS0 8632, and thus with the GKS/CGM transfer step). The paper has been fed from one of family of graphics standards. the two paper trays. the raster graphics content is compatible with 6. Cleaning. The final step of the process is to CCITT Recommendations T4 and T6 and thus discharge the photoconductor and then brush off with group 3 and group 4 facsimile. the toner residue. The photoconductor is now ready At Cebit 1988 at Hannover ODA was used to for recharging. demonstrate mixed media document interchange. The size of the toner particles, the spot size Complex pages of text, image and graphics were of the laser and the described process are of great originated by one company, displayed and edited importance for the final print quality. The benefits by a second company and printed by the Oc6 6750 of this process are a high image resolution, uniform laser printer with communications via X.400 mail density, consistent quality from first to last print, and X.25 lines. no developer to be mixed, no direct contact between photoconductor and paper, no paper jams. Interfacing to VAX/VMS computers As mentioned in the introduction the paper With the standard IEEE 488 interface of the Oce handling is as advanced as usual for Oce copiers. 6750 laser printer it is very easy to connect the This includes the following: printer to a wide range of VAX/VMS computers. In Input. The printer has two input trays (1600 the VAXIVMS computer range we find three types + 600 A4 sheets) available. The large capacity of busses: and the fact that the paper compartment is 1. Q-bus outside of the printer give you the possibility 2. Unibus of non-stop printing. 3. BI-bus Output. The sorter with 20 selectable bins of 100 sheets each takes care of the collation Connecting the OcC 6750 to a VAX with respectively and storage of a large capacity of 2,000 sheets. one of these busses can be done with standard You can use the ergonomic designed sorter in a from Digital Equipment Corporation available IEEE personal, set or sortwise printing mode. boards and drivers. Besides the hardware and the driver you need host resident software for the communication with the printer and the conversion 58 TUGboat, Volume 10 (1989), No. 1 of w-DVI files to ECMAJODA. The software OcC 6750 laser printer is responsible for producing developed by OcC contains: high quality documents. 1. the printer protocol 2. the symbiont If you wish to receive an original set of printouts 3. the conversion programs or additional information, please contact: 4. the font management tools Oc6-Nederland B.V. Marius Broeren 1. The printer protocol The Low Level and Office Automation the High Level Printer Protocol (LLPP and HLPP) P.O. Box 101 take care of the cooperation between symbiont and 5900 MA VENLO the IEEE 488 device driver. The printer protocol is The Netherlands used for informing the host about the printer status tel. (0)77 - 592222 and setting the printer in a certain status. The font downloading procedures are also implemented in the printer protocol. Other typical tasks of the printer protocol are:

0 sendinglreceiving packets tolfrom the OcC 6750 0 initialize the printer at start time 0 converting messages to packets (two way) Query 0 font management 2. Symbiont The standard symbiont of the VAX was not applicable to control the conversion pro- Editor's note: When answering a query, please grams and the communication between the user send a copy of your answer to the TUGboat editor and the printer (two input trays, 20 output bins, as well as to the author of the query. Answers setwise, sortwise or personal printing, handle mes- will be published in the next issue following their sages coming from the printer etc.). OcC developed receipt. a symbiont specially for the 6750. The symbiont controls all the conversion programs and interacts Output driver for Xerox 4045 on IBM 3090 with the job controller. Typical aspects of the At Intevep, the Venezuela government research symbiont are: facility for the petroleum industry, we work with 0 errorhandling several kinds of computers. We have an IBM 3090- 0 starting and controlling the HLPP and conver- 200, two VAX 11/780, one Data General MV4000, sion programs and 71 Sun Workstations. communicates with the job controller We are running TEX on almost all these ma- interpretes the DCL extensions and options chines, but especially on the IBM, for almost three including burst/flag,,'trailer pages years now. 3. Conversion programs The conversion pro- The output from the IBM 3090 is done on an grams re-sort under the "umbrella7' of the symbiont IBM 3820, an IBM 4250, and several QMS 800 laser and take care of several conversions to ECMAJODA, printers. the input standard of the 6750 laser printer. There Last year we bought 50 Xerox 4045 laser are converters for: printers for our needs of distributed printing. All LN03 Plus to ECMAIODA our people are asking for a 7&X driver for the 4045, Lineprinter to ECMAJODA for proofing their work. We obtained a driver for m-DVI to ECMA,/ODA a Xerox 4045 connected to the IBM by means of a serial interface, but all our printers have a coax 4. Font management tools With an easy to use interface to the IBM. font-tool it is possible to use Metafont to generate We hope to find someone who has or wants to PXL-fonts. These are transformed to the OcC develop this driver for our environment. The use of format and can be downloaded to the printer. T@ in our installation will increase if we can find this driver. Arturo Puente The combination of the high quality typesetting Intevep program TEX, the VAX/VMS computers and the P. 0. Box 88521 Caracas 1080. Venezuela TUGboat, Volume 10 (1989), No. I

Sebastian Rahtz Southampton University Site Reports Philip Taylor Royal Holloway and Bedford New College (RHBNC) plus myself. Each brings different talents to the UKWand the Aston Archive group, and it is hoped that the first phase will have Peter Abbott been completed as you are reading this (it is impos- Aston University, UK sible writing on 4th January 1989 to assume that no changes will have taken place in our plans). Towards the end of 1988 it became obvious that the Each member of the group has been allocated demands on UKTjjX and the Aston archive were still one or more of the subdirectories of PUBLIC. A increasing, threatening a major flood. As a result tree structure will be created using pointers so that of interest from several parties at Nottingham (the there is only one 'real' copy of a file (for exam- first UKTUG meeting), the idea of a group effort to ple latex.tex) but when looking for the files re- maintain the archive germinated. quired for any particular implementation then all The number of contributions continues to grow files needed will be included. and unfortunately there is an element of duplica- Directory and filenames will all be standard- tion and 'duff' material in the archive. Some con- ised on 8 characters (max) with 3 suffix charac- tributions have passed through many gateways and ters. This will satisfy most systems including MS gateway table translations, or even encoding and DOS. There will be a standard file in each direc- unencoding routines. As yet there is no consistent tory called OOreadme. txt which explains the pur- format, and items are stored in a variety of forms pose and contents of that directory, and, where ap- including SHAR, ARC etc. propriate, OOf iles . txt and/or OOmap . txt files will Magnetic tapes arrive regularly at Aston. and also be provided. The OOf iles . txt file provides de- numerous requests have been received for material tails on each individual file, while OOmap . txt can be on floppy discs. Currently I support three major used to generate a filename mapping 'script' on sys- tape distributions: tems which do not enforce VMS's file-naming rules

0 a copy of the Washington tape, (e.g., mixed case filenames under UNIX). We shall provide 'kit' files which detail all files 0 a VMS backup of the archive at 6250bpi (2 reels), needed for a particular installation e.g. vms . kit or cms .kit or msdos .kit. It may be necessary to pro- a VMS backup of our working set of vide subkits especially for unix. kit. These kits WIIPIW with PSPRINT at 3.0 (either will also be used to create the magnetic media dis- 1600bpi or 6250bpi). tributed from Aston on demand. I have also recently been asked if I can supply We agreed at the meeting (please note, however, material on cartridge tapes (for SUNS). In addition, that it is still subject to change) to start with the Adrian Clark of the University of Essex has for some following toplevel structure for the archive: time been supplying magnetic tapes for VMS sites. At the Nottingham meeting we identified one tex, metaf ont , latex (subdir for slitex) , major 'hole' in these facilities. Commercial users (in amstex, digests (texhax uktex texmag) , the main) are unable to take UKWor access the bibtex, utils, fonts etc, drivers, docs, archive unless a local JANET site is willing to host langs, tools (for use by the 'group' not them. I am currently looking at ways to provide the general public) a Bulletin Board Service which will list (amongst We shall announce these revised arrangements other information) details of providers and 'wants'. in UKW, but will ensure that mail and NIFTP At the same time, mailboxes will probably be made access to the present structure is unaffected whilst available. work progresses, and we may even provide a short The idea of group maintenance of the archive overlap period. resulted in a meeting being held in London in De- Longer term plans include the distribution of cember 1988 at which the following - agreed - kits on relevant media and the BBS described above. were persuaded - succumbed: Aston University has a policy of 'customer care' Adrian Clark University of Essex and I am working on providing the help file for Malcolm Clark Imperial College the mail server in as many languages as necessary. Charles Curran Oxford University Most Europeans speak excellent English, but I con- David Osborne University of Nottingham sider a user-friendly interface as a major asset. I 60 TUGboat, Volume 10 (1989), No. 1

already have translators for Danish, Italian, Span- sneak it back in through a change file); you can no ish, Swedish and other languages. longer exit with a -D key-in. My thanks are due to the many providers of ma- Chris Torek looked over my version of a Bourne terial, in particular Michael DeCorte from Clarkson, shell script for running w, IPW, and Sliw, Jon Radel (DECUS tapes) and many others too nu- and sent a vastly improved version which runs as merous to name. I must however mention the other follows: members of the group who give so freely of their time and expertise. Without them the archive could case "$0" in fossilise and maybe even die. */texltex) me=tex; fmt=plain;; */latexllatex) me=latex; fmt=lplain;; */slitexlslitex) me=slitex; fmt=splain;; *) echo "don't know how to be $0" \ 1>&2; exit 1;;

-- esac Data General site report # verify I or 2 arguments Bart Childs case $# in The distribution continues to be stable. We have im- 112) ;; proved the robustness of the previewer for alphanu- *) echo "usage: $me foo[.tex [my[.fmt]l" \ meric terminals and are in the process of adding l>&2; exit 1;; Stephan von Bechtolsheim's Postscript driver. esac I hope the note on "Portable Graphics Inclu- sion" that appears elsewhere is seriously considered virtex "&"${2-$fmt) ${1+"$1") by all. I feel that it does offer a reasonable plan for There are no major changes in web2c which portable inclusion of graphics and merging of dvi will probably be at about version 2.26 by the time files. this report is printed. As each new variety of Unix operating system works up to a successful compi- lation, small improvements emerge which make the system yet more general. The list of successful ma- chines is by now too large to maintain accurately. In December, I had the opportunity of trying out a compilation on a NeXT system. As might be Unixm Site Report expected from what is essentially a BSD4.3 kernel, Pierre A. MacKay compilation was a complete success, using a recent version of the GNU gcc compiler. The loader had T&$ and METAFONT came into the New Year in trouble with the -s option but that is a known updated versions. T&$ is now supplied as version bug and will soon be fixed. We intend to provide 2.95 and METAFONT as version 1.7. There is copies of the distribution on 256Kbyte laser disks also a new version (2.9) of tangle. None of in the very near future. Any help with previewers these changes need worry you very much, since the and METAFONT display routines will be very much basic functionality of the programs is more or less appreciated. unaltered. The change to tangle allows a reference There is even more interesting news about to numeric macros before they are defined, which fonts. Several years ago, through the courtesy is a bit more permissive than the old version, and of the American Mathematical Society, it became the other changes have to do with the behavior possible to offer compiled versions of the Euler of the programs when they terminate abnormally. fonts (fraktur, script, etc.) which were developed by The changes to TkX and METAFONT had already Hermann Zapf, with the support of the AMS. These been made in versions 2.94 and 1.6 respectively, but compilations were of mixed quality, because some certain features of those versions interacted badly defects still remained in the METRFONT programs, with some operating systems. One useful Unix and some styles would not compile at all in the feature is gone from the new version (unless we smaller design-sizes. Donald Knuth has reviewed the entire set, and remapped them into a slightly TUGboat, Volume 10 (1989), No. 1 different arrangement. There is now a full range print engines, and in RicohFourZeroEightZero in lOpt, 7pt, and 5pt sizes available as a regular mode for generic write-black print-engines. Notice part of the distribution, made up at true size, and the change in the naming convention for the Ricoh magsteps 0, 0.5, and 1. These compiled fonts are engine. We are going to need quite a few new made available by the AMS for non-profit scholarly mode-defs as new varieties of print-engine become use. A site which wishes to use them in other available, and the suggestion that was made a while ways, or which needs, for some reason, to produce back (I forget where) that the names be reasonably different compilations, should get in touch with the consistent, with all numeric digits spelled out, seems AMS and arrange to acquire the eu* .mf files under a very good one. LN03 fonts, for example (if that license. really is a print-engine), might be addressed with a A completely new font family is the "concrete mode-def named LNZeroThree. fonts" which are discussed elsewhere in this issue. There are no major additions to the babel The cc* .mf files for these are part of the distribu- foreign language directory, but some important new tion, but are not intended to serve merely as another sets of hyphenation patterns are in the works for canonical font family. They are offered as a lesson Dutch and Russian. Work is also well advanced on in how to use METAFONT to its full effectiveness, the creation of a Cyrillic font in new METAFONT by creating one-off fonts that may be especially coding, which will be made available both in the appropriate only for a specific publication. It is old AMS mapping, and in a new mapping more this capacity that distinguishes a font-design tool compatible with the Russian hyphenation system. such as METAFONT from a system for font expres- The various systems of support software col- sion, such as Postscript. We welcome other similar lected under TeXcontrib continue to grow. There experiments, which we will make part of a special is a new version of TiB, a bibliographic preprocessor directory known simply as metaf onts. which is ultimately based on the Unix refer biblio- In addition to the "concrete" fonts, the meta- graphic system. Wolfgang Appelt's knit and twist fonts directory will include the Pandora family, (see TUGboat 7:1, pp 20-21) is included, under designed by Neenie Billawalla. We have eagerly his collective name for it, "patchwork" . Joachim awaited the release of this new set of fonts, which Schrod's wide-ranging adaptation of WEB appears as was developed independently from, and on some- literate-macros. There is always room for more. what different principles from Computer Modern. All the DVI interpreter software has now been This is an original creation, and shows what a moved to a directory named DVIware. The old, professional designer can do with METAFONT. As familiar ctex (Chris Torek's collection of DVI inter- with any genuinely new font design it has taken preter programs), is now to be found as umd-dvi. several years of work to bring it to its present This renaming was undertaken to avoid confusion shape. I would urge those who make use of this font with the ctex directory used by web2c. Several to include in their publications some acknowledge- interpreters besides the ones under umd-dvi now ment of Neenie Billawalla's generosity in making it use the system of distributed directories for font available for free non-profit and educational use. access that first appeared with those programs. The An anomaly in the chardx values of some file SUBDIRmakef ile will copy all the fonts supplied characters in Computer Modern was discovered with the distribution into such an arrangement. during 1988, and the relevant Computer Modern Recent correspondence with R. M. Damerell METRFONT files have been corrected. A complete leads me to hope also that by the time this recompilation of all the plain. tex, If onts . tex, report is printed there will be a working version sf onts. tex, and some others was done in De- of crudetype which will be particularly useful as cember, 1988, and reflects all the improvements a prcviewer for proof correction on old-fashioned described in cm85 .bug. These fonts are stil! offered alphanumeric terminals. in 118dpi, 200-240dpi, and two 300dpi resolutions. I should like to hear from readers whether the 200- 240dpi versions are still really useful. I have not seen an advertisement for a 240dpi laser printer in some time, and I do not have any sense of how many sites still use the 200dpi Versatec for output. The 300dpi fonts come in CanonCX mode for generic write-black TUGboat, Volume 10 (1989), No. 1

-- VAX/VMS Site Report David Kellerman Typesetting Nort hlake Software on Personal Computers We have been shipping a new distribution of for VAX/VMS since September. It contains all The Land of the Free and the Near F'ree the changes and bug fixes that had accumulated in the Stanford distribution at that time, and Alan Hoenig corrections and improvements to our VAX/VMS- I've received a surprising number of requests- specific modifications. The I4m macros gained from as far away as Cameroon-for information many bug fixes since our previous release, and we about low cost implementations of m. It's now cleaned up loose ends in the arrangement of SLI'I&X. possible to put together several such systems. For The font sets are considerably enlarged, and there this article, a "TEX system" includes in addition to is also a new conversion program called XXtoXX. m, a text editor (to create the input into QX), It converts between any combination of GF, PK, a previewer (to preview on the screen the output and PXL formats, can process all RMS record of before you send it to your printer), and a formats as input or output, and makes quick work driver (the program which you need to translate of converting large numbers of font files. from the language TEX uses to the language your Much work went into making the new distri- printer understands), and (for the first time!) META- bution easier to install and use. Martin Havlicek FONT. Because this column has talked too much did most of the work of dividing it into pieces, then about the IBM-compatible family of computers, we organizing each as a VMSINSTAL kit. Beginning will begin with a non-IBM system. But IBMers users can install two or three kits for a basic system, should read on-among other things, we describe and reliably end up with working software; later, below an impressive integrated TFJ environment if need arises, they can install additional kits. We for PCompatibles at a bargain price. organized and rewrote the VMS-specific documen- Before we begin, please note that you cannot tation, too, and the result is both an improvement make indiscriminate copies of the software unless for the naive user and a source of more useful it is very clearly marked as being in the public reference material (it looks better, too). domain. Low cost is not synonymous with public Of course we ran out of space on the tape domain! What follows is a summary of low-cost again. And it is probably just as well, because software components; please assume they are not the space limitation keeps us focused on providing public domain unless specifically so noted. a reliable core QX system. For the broad range of publicly available m-related packages, we still TEX on the Amiga find it better to forward inquiries to their actual The Amiga microcomputers, models 500 and 2000, developers. They are better at providing up-to-date are powerful home computers, with built-in high- versions, and they do a better job of answering resolution graphics, a large memory capacity, and questions about their own software. the ability to multitask. If all things were equal, it Which leaves me to look forward to updating would probably be the computer of choice for most to 2.96, and wondering what version comes microcomputer users. Unfortunately, things are not after 2.99. at all equal -vastly more software is available for IBM and compatibles and for Macintoshes. Nevertheless, a fine implementation of for the Amiga is available from Radical Eye Software (Box 2081, Stanford, CA 94309; (415) 32-AMIGA). The TEX part of this system consists of and a previewer and costs $200. If you provide a blank Amiga floppy and a SASE, you can get the mg editor free, which is their local version of a micrognuemacs- type editor. Printer drivers are $100 apiece, and support the HP LaserJet series, Postscript, QMS KISS and Smartwriter, HP DeskJet, Epson LQ series, NEC Pinwriter series, Epson MX and FX TUGboat, Volume 10 (1989), No. 1 series, and Imagewriter I1 printers. (Some of the dot Street, Ithaca, NY 14850; (607) 273-0222). Turbo- matrix drivers are capable of 360 dpi resolution!) is described extensively in TUGboat, 9, 1, A version of METAFONT with interactive screen 48-52, April, 1988. Turbow weighs in at $100, support is only $75. The software includes a and Kinch Computer also offers the C source listing very well-written manual; you'll have no trouble for the m program for committed compile-it- getting started with it. A tantalizing description of yourselfers. (Contact them for details.) The big Amigaw appeared last year in TUGboat (9, 1, news though is that Kinch Computer now has a April 1988, 40-41), and a user report is in this issue low-cost version of METAFONT available as well (see starting on page 65. page 23)! The combination of plus METAFONT The best news about Amigam is the current executables will be $150; the C source for the pair street prices of Amiga computers. Rumors abound will be $300. Monitor support for their METAFONT that Commodore (the Amiga's parent company) includes Hercules, CGA, and EGA. will be releasing new models, the 2500 and 3000, A superb low-cost previewer called CDVI (be- and are perhaps lowering the prices of the 500 and cause, I guess, you use it to see a DVI file) has 2000 to clear the shelves. Whatever the reason, crossed our desk recently. It's easy to install, and prices here in the New York City area are low. The at $35 it'd be a bargain even if it dzdn't work 2000 sells for $1495 complete, including 1 megabyte well. (That's $35 for 360K disks; add $10 for 3.5in of memory, 1 floppy drive and the color monitor. disks. These prices include postage and handling, The Amiga 500-with 512K memory, 1 floppy but please add sales tax for Texas orders.) When drive, and a color monitor -can be had for $800 ordering, be sure to specify your monitor type- or less. To run Amigam, you only need 512K of either EGA, Hercules mono, CGA, ATT 6300, RAM and two floppy disk drives or one floppy drive MCGAJVGA, or Toshiba 3100. The program is and 1.5M of RAM. (Of course, the software really offered by SullivanSFT, Box 292431, Lewisville, TX hums with a hard drive, but it is not necessary. 75029. AmigaMETAFONT definitely requires 1 megabyte Most previewers I've tried seem to take their of RAM, as will I4m.) The extra memory or time loading font information, so you have to wait a floppy adds only a few hundred dollars to these bit to do any previewing. CDVI is blazingly fast. On prices. These computers are more expensive than my AT compatible, it is essentially instantaneous the plainest of 8088 IBM compatibles, but you in operation. I do not perceive any pause between get substantially more computer power, including the time I execute its command line and the ap- multitasking and stunning graphics. pearance of the screen image. Viewing subsequent pages in your document is as rapid. Wayne Sulli- PCompatible-m van, a Dallas-born, Georgia- and Oxford-educated The components of a PCompatible TEX system mathematician now at University College in Dublin have to be assembled in the same way as are most and the author of CDVI, has designed a fine user of these compatibles-component by component, interface as well. each component of which comes from someplace CDVI will not be all things to all people, else. however. The secret to its speed lies in the fact that My choice for text editor remains PC-Write, it has built-in information about all the fonts in now up to version 3.0. PC-Write is a shareware PLAIN. TEX, but only at their unmagnified sizes. You program, so you should look for one from a friend will only see unmagnified images on your screen. or bulletin board. Otherwise, contact QuickSoft Magnification is simulated by showing these images for their current distribution policy (QuickSoft, while using the letterspacing appropriate for the 219 First North, #224, Seattle, WA 98109; (206) magnified font. Thus, you can check layout and 282-0452). One irritation with PC-Write is its page breaks, which is all most of us use previewers inclination to break lines right after an explicit for anyway. If you use non-CM Roman fonts. hyphen. m turns this line break to an extra you must use an included utility which will let space, so if you're not careful, you get extra spaces CDVI substitute the plain TFJ font of your choice after these hyphens in the typeset document. A (although it will use your .TFM file to position the public domain version of the Emacs editor JOVE letters properly). (SullivanSFT cautions that the (Joe's Own Version of Emacs) is also widely use of too many nonstandard fonts will slow down available. CDVI's operation.) If you work with non-Roman Turbom is a low-cost m available from fonts, or are doing extensive METAFONTing, CDVI the Kinch Computer Company (501 South Meadow may not be for you. TUGboat, Volume 10 (1989), No. 1

Nelson Beebe has previously reported on the time for this task for several more months at least. public domain printer drivers he has prepared. (See Volunteers wishing to get cracking on this should TUGboat, 8, 1, April 1987, 41-42.) The demand get in touch with him first (to make sure no one for this software has greatly exceeded their author's else has already begun). expectations; Nelson estimates that they are now in A savvy user-that is, one who reads this use at over 1000 sites in 28 countries. Because of this column regularly -can put together an AT-class extraordinary demand, Nelson has had to modify his compatible for about $1600 or so. Such a machine distribution policy. IBM PC floppy distributions won't be fancy, but it will run T)$K (actually, it are available from him for $100, which includes will walk m. Hmm- this makes the Amiga look documentation, media, and shipping. (Nelson better and better.) H.F. Beebe, PhD, Center for Scientific Computing, Department of Physics, University of Utah, Salt Late-Breaking News: The Deal of the Lake City, UT 84112.) However IBM PC floppies Century? of this software are also available from the following Always wanted to try 'IjEX but afraid to take the sources: Personal 7&X, Inc. (12 Madrona Ave., Mill plunge? 1-800-USA-BOOKS, a mail order outfit Valley, CA 94941); Kinch Computer Co. (501 S and that's their toll-free number as well, makes an Meadow St., Ithaca, NY 14850); and Jon Radel (Rt incredible offer. They have assembled true public 2 110 Sydnor Dr., Leesburg, VA 22075). Prices domain versions of all the software you might need from these suppliers may be cheaper than Nelson's; to run 7&X on a PC, and will offer their Tm-Kit the current Personal catalog, for example, lists for $38.50 (no misprint!). Here's what you get: this material for $35. One caveat: these sources 0 A version of PC-Write with a utility to patch may not be distributing the latest versions of these this program so it won't break at hyphens. drivers. (I do not have pricing from the other 0 A true, public domain version of m. suppliers.) 0 A stripped-down, public-domain version of the Nelson's software is actually a series of C CDVI screen previewer. modules intended for those wishing to prepare a Nelson Beebe's public domain laser printer variety of drivers for a variety of devices on a drivers. The fonts that come with this variety of printers. The drivers support the HP are only those 300dpi fonts that work with the LaserJet and Postscript (Apple LaserWriter) laser previewer . printers, as well as a generous selection of dot 0 A shell program to take command of these matrix machines (Epsons, Okidatas, Toshibas, and separate components. Apple Imagewriters among others). It's this last item that makes the m-Kit such The original TUGboat announcement was for an extraordinary bargain, because for the first version 2.07 of this software; Nelson is now up time, users of PCompatible 7&X can work within to version 2.10. Major changes of 2.10 include an integrated 'IjEX environment, a workspace long substantial improvements to the HP LaserJet Plus available to users of Macintosh or Amiga versions. and Apple LaserWriter drivers. (Printer memory A flick of your finger on a function key brings up management is much better than before.) Version your document for editing. Close the file, and 7&X 3.0 of the software is due out in January. This new it with a tap on another key. Oops-a Q$ error version will add support far 2 or 3 new operating on line 134? Invoke the "el1 option from within systems, over a dozen new drivers, and will have w,and the shell automatically opens your file for support for font paths with multiple directories, editing on line 134. Previewing and printing are run-time specifications of the format for font file similarly controlled with single function keystrokes. names, and better control over the magnification This same company reports plans for similar search when substitutions are required. There TEX kits at different levels. Watch this space for will also be support for a startup file for common details! options, and much more powerful control over paper P.S. Writer's Tools II will appear Real Soon Now. sizes. Gathering the remainder of the information has been Nelson asks us to conclude with a plea. In the more time-consuming than we initially imagined! past, several people had promised that they would merge in support for Postscript resident fonts from the dvi2ps program of Stephan van Bechtolsheim; this program runs only on UNIX. So far, no one has been forthcoming! Nelson himself won't have TUGboat, Volume 10 (1989), No. 1

Amigaw . . . or How Envy Was Resisted and day when single users would have networked desktop Knowledge Found on the Road to OijC workstations capable of running multiple programs simultaneously with sophisticated interprocess com- Kim Kubilr munication. Both a mouse-driven icon-based shell and a windowed Unix-style command line inter- HEY SAY THAT ENVY is one of the seven deadly sins. In early 1986 1 finally decided I had en- preter were added to Tripos and AmigaDOS was T born. Suddenly the little game machine vaulted vied others long enough, it was time to spend my own money on a personal computer to run 'I)$.I from the realm of single-tasking PCs and WYSIWYG made a list of the pros and cons of the 8086 and Wonders toward league with the Suns and Apollos. 68000 based computers for which TEX was available MIGATEXmakes extensive use of the multiwin- and would vacillate from week to week on which one A dow multitasking capabilities of the computer. I thought best. Then the June TUGboat arrived and Any text editor, the system command interpreter, a short notice announced that TEX now ran on the the compiler, and the Amigaw screen pre- Commodore Amiga, further stating that due to the viewer may all be active in separate windows during multitasking operating system one could build "an a session. As soon as e.g. 'tex myFoo. tax' is typed impressive TJ$ environment." I knew little about at the prompt in the 'I)$ window the user can slide the Amiga but worked near Stanford so called the back to the editor window and work on something author, Tom Rokicki, and spent part of my lunch else; as soon as page one of myFoo.dvi is output hour getting a quick overview of Amigaw. When I the user can preview it on the hi-res screen while returned to work I got out that computer list, looked the rest of myFoo . tex continues to be processed. it over a last time, and tossed it in the garbage. And Or while the compiler continues to run the user now, a year and a half after I bought an Amiga, I'm can preview or print any other . dvi file, or score and still finding out just what a gross understatement listen to computer generated music, build objects for that phrase "an impressive TEX environment" re- a color 3-D ray trace animation, or simultaneously ally was. download and unarc files from a bbs. The user is not forced into a linear one-dimensional mode of interacting with the computer. If there is sufficient memory to load a program the Amiga can generally EVELOPMENT of what would eventually be- run it no matter what else is active. D come the Amiga began in the early 1980's, While the Amiga operating system does not a time when computer games were still the rage support virtual memory like the big workstations it and many "real" computer companies in Silicon Val- also does not burden the buyer with the expensive ley were lamenting that they couldn't get good en- necessity of hardware memory management and a gineers because the game companies were offering hard disk just for operating system overhead. As all such lucrative salaries. A group formed out of this executable programs are RAM bound a completely already select pool of talent to design a chip set functional system can be run from floppies. This for the ultimate game machine. Essentially they leads to one great advantage of the Amiga over would tightly couple a Motorola 68000 cpu to cus- any other true multitasking workstation: price. I tom RISC-style coprocessors to offload many of the purchased a single-floppy A1000 with 2.5 Mbytes of cpu intensive chores necessary for sound and color RAM in late 1986 for $1600. I ran AmigaT@ on graphics and animation. These components were de- this with no hitches for a year before I even bought signed to be modular with a multitasking executive a second drive. The A1000 has been discontinued at the core to coordinate their interactions. (but not obsoleted!) but the new models are low-end Thus, when the bottom dropped out of the and high-end repackages of the same system. game market and the startup was refinanced by For the TEX user on a severe budget a one Commodore under the stipulation that the system Mbyte two-floppy A500 can be purchased discount be configured as more "business-like" the basis for for about $1200; for someone needing maximum a full-function workstation had already been im- performance at minimal cost an add-in 68020 cpu plemented. A real-time message-passing operating increases the price only another $1000. The Amiga system known as Tripos was ported to this hardware model B2000 adds greater expandability and IBM- by a group of computer scientists in England. Tripos PC compatiblility at a greater cost, but it is still had been developed as a systems software research priced far below any workstation with similar capa- project at Cambridge (UK) with vision towards a bilities. TUGboat, Volume 10 (1989), No. 1

- Amigam . . . or How Envy Was Resisted and day when single users would have networked desktop Knowledge Found on the Road to OS~ workstations capable of running multiple programs simultaneously with sophisticated interprocess com- Kim Kubilc munication. Both a mouse-driven icon-based shell and a windowed Unix-style command line inter- HEY SAY THAT ENVY is one of the seven deadly Tsins. In early 1986 I finally decided I had en- preter were added to Tripos and AmigaDOS was vied others long enough, it was time to spend my born. Suddenly the little game machine vaulted own money on a personal computer to run TJ$.I from the realm of single-tasking PCs and WYSiWYG made a list of the pros and cons of the 8086 and Wonders toward league with the Suns and Apollos. 68000 based computers for which TEX was available MIGAT@makes extensive use of the multiwin- and would vacillate from week to week on which one A dow multitasking capabilities of the computer. I thought best. Then the June TUGboat arrived and Any text editor, the system command interpreter, a short notice announced that TJ$ now ran on the the T@ compiler, and the Amigaw screen pre- Commodore Amiga, further stating that due to the viewer may all be active in separate windows during multitasking operating system one could build "an a session. As soon as e.g. 't ex myFoo . t ex' is typed impressive 'I'EX environment." I knew little about at the prompt in the T)$ window the user can slide the Amiga but worked near Stanford so called the back to the editor window and work on something author, Tom Rokicki, and spent part of my lunch else; as soon as page one of myFoo.dvi is output hour getting a quick overview of Amigaw. When I the user can preview it on the hi-res screen while returned to work I got out that computer list, looked the rest of myFoo. tex continues to be processed. it over a last time, and tossed it in the garbage. And Or while the compiler continues to run the user now, a year and a half after I bought an Amiga, I'm can preview or print any other .dvi file, or score and still finding out just what a gross understatement listen to computer generated music, build objects for that phrase "an impressive 'I)$ environment" re- a color 3-D ray trace animation, or simultaneously ally was. download and unarc files from a bbs. The user is not forced into a linear one-dimensional mode of interacting with the computer. If there is sufficient memory to load a program the Amiga can generally EVELOPMENT of what would eventually be- run it no matter what else is active. D come the Amiga began in the early 1980'~~ While the Amiga operating system does not a time when computer games were still the rage support virtual memory like the big workstations it and many "real" computer companies in Silicon Val- also does not burden the buyer with the expensive ley were lamenting that they couldn't get good en- necessity of hardware memory management and a gineers because the game companies were offering hard disk just for operating system overhead. As all such lucrative salaries. A group formed out of this executable programs are RAM bound a completely already select pool of talent to design a chip set functional system can be run from floppies. This for the ultimate game machine. Essentially they leads to one great advantage of the Amiga over would tightly couple a Motorola 68000 cpu to cus- any other true multitasking workstation: price. I tom RISC-style coprocessors to offload many of the purchased a single-floppy A1000 with 2.5 Mbytes of cpu intensive chores necessary for sound and color RAM in late 1986 for $1600. 1 ran Amigaw on graphics and animation. These components were de- this with no hitches for a year before I even bought signed to be modular with a multitasking executive a second drive. The A1000 has been discontinued at the core to coordinate their interactions. (but not obsoleted!) but the new models are low-end Thus, when the bottom dropped out of the and high-end repackages of the same system. game market and the startup was refinanced by For the 'I)$ user on a severe budget a one Commodore under the stipulation that the system Mbyte two-floppy A500 can be purchased discount be configured as more "business-like" the basis for for about $1200; for someone needing maximum a full-function workstation had already been im- performance at minimal cost an add-in 68020 cpu plemented. A real-time message-passing operating increases the price only another $1000. The Amiga system known as Tripos was ported to this hardware model B2000 adds greater expandability and IBM- by a group of computer scientists in England. Tripos PC compatiblility at a greater cost, but it is still had been developed as a systems software research priced far below any workstation with similar capa- project at Cambridge (UK) with vision towards a bilities. TUGboat, Volume 10 (1989), No. 1

One also gets something else for the modest one case, came easily: before I got an Amiga, I really investment: access to the end products from a envied people who had those big Sun workstations community of some of the most avid computer to run w. enthusiast/programmers in the world. There are literally hundreds of public domain software tools for I don't any more. the Amiga. The open operating system allows these utilities to work together so that a user can tailor a truly flexible personal application environment. This flexibility can yield a productivity increase a few orders of magnitude greater than any bench- Using and I4w with WordPerfect 5.0 mark of straight cpu performance could possibly Michael F. Modest indicate. Perhaps a better "benchmark" of both Pennsylvania State University the developer community's sophistication and the Amiga's capabilities is the fact that already next 0.1 Introduction to my Amiga are five software product manuals While w is an extremely powerful typesetting lan- typeset with Amigaw. guage that can make your publications look as close These capabilities are not without price: users to professional as you could possibly hope for, this have to learn AmigaDOS on their own as docu- beauty comes at a price: w by itself is somewhat mentation of the Amiga as a workstation is all but tedious to use, and it is not WYSIWYG (what you nonexistent. Most dealers are completely ignorant see is what you get). There appears to be no truly of its potential, and it can take many (enjoyable) WYSIWYG word processor available for the IBM PC hours of testing new utilities to optimize an Amiga or compatibles. The good news is that -when com- for specific work habits. Without a hardware dein- bined with WordPerfect, which allows customization terlacer (available only for the model B2000) there of printer drivers- the tediousness of ?&X can be is an intolerable screen flicker in the hi-res mode overcome. I have written a W-IPWdriver for that requires a very stable balanced room light and WordPerfect which allows you to use WordPerfect careful choice of colors to reduce. normally while typing ordinary text, and uses simple Like w,AmigaDOS can initially seem frus macros when typing equations. I have written the trating because it offers so many choices: modular preprocessor in such a way that it may be .used for extensible software exacts a different kind of toll in IPw documents or for straight documents as the freedom it affords. When the Rexx language long as the keys/macros specifically geared towards became available for the Amiga it was as if the IPw are not employed. The user prepares his or last piece of a puzzle fell into place. A common her WordPerfect file and sees centering, indented vocabulary can now be used both to write macros paragraphs, Greek letters, mathematical symbols, within programs as well as to mediate interaction subscripts, etc., actually displayed (and entered with between programs. single keystrokes). Then, rather than sending this As every capability of the system is available at file directly to a printer, "prints" it to a diskfile us- all times the overlapping window paradigm becomes ing the preprocessor which converts the WordPerfect a true asset rather than mere dressing. The user who format into a standard w or IPw file. If only understands why T@ is not Desktop Publishing, the macros activated by the WordPerfect keyboards and understands that ease of use is not enviable are used, the preprocessor even assures matching of when the tradeoff is quality, might check out the braces, dollar signs and \begin and \end of IPw Amiga. Like T@,it can reward effort. environments. 0.2 WordPerfect Fonts I have programmed the driver so that -using the NVY is a transgression in that it focuses at- ordinary WordPerfect font change commands - a Etention to surface appearance, diverting one number of different types of fonts are available, as from the true substance, the kernel, of a thing. well as a predefined math displaymode, as indicated The heretic might suggest that all one needs for an below. Depending on the graphics card and monitor optimum environment is a fast 32-bit cpu and present in your PC, different fonts and/or attributes a large screen. But when the system beneath such may or may not be displayed: glitz is basically an 8-bit style program loader the EGA card and monitor: choosing the 1 font/ suggestion is ludicrous. Absolution, at least in this 512 character option the full Greek alphabet TUGboat, Volume 10 (1989), No. 1

plus most other important symbols will be dis- etc. (usually used in conjunction with \tt, i.e., in played. Bold, underline, italics, etc. are color- typewriter mode). coded. 0.4 WordPerfect Keyboards Hercules graphics card Plus, or Incolor card: choosing the 6 font1512 character option to- WordPerfect 5.0 allows you to define custom key- gether with a Ramfont set prepared by myself boards and to access zillions of special symbols the full Greek alphabet, all other important which cannot normally be displayed on the screen symbols, bold, underline, italic, courier (i.e., such as crpy, or 4 or d or cc etc. This is done verbatim), sub- and superscripts, small caps, by depressing the corresponding key in the appro- calligraphic letters, "Large", etc. will be dis- priate keyboard, sometimes accompanied by simul- played. taneously pressing either the Alt-key (abbreviated Neither: sorry, you are out of luck: only the here as @) or the Ctrl-key (here ^). Thus most keys standard 256 ASCII characters, bold and un- may be used in four ways, e.g., a. shft-a (A), @-a derline will be displayed. and ^-a, although some keys are limited to three by not allowing either the Alt or Ctrl key combination. Compatibility Considerations I have defined six new keyboards to be used with You can use most of the features of the WordPerfect w:NORMAL, FOREIGN, GREEK, SINGLE, SMCAPS and wordprocessor that you may usually use, such as CALLIGRAPHIC. supera or subb-scripts, the speller, the thesaurus, NORMAL keyboard the search and replace routines, block mark/copy/ movelretrieve routines, the "merge" and "macro" As the name implies this keyboard is the one used features, as well as bolding and underlining. A most of the time. Its basic layout is shown in Fig. 1, number of special features of WordPerfect, such as where the central character in each box is the name tabs, indent, center, flush right, footnote, and line- of the key, the bottom left character shows the char- spacing are converted into blank spaces by Word- acter displayed if the key itself is pressed, top left Perfect before sending it to the printer and. thus, shows the shft character, bottom right the Alt char- cause a problem. Most of these features have been acter and the top right shows the Ctrl character (for made compatible as indicated in the section on the function keys the WordPerfect bottom-to-top se- WordPerfect Keyboards, a few (e.g., linespacing) quence is used instead). The function of a few of must be treated by using 'l&X macros directly for the individual keys is explained below in some detail these functions. (note that in most of the examples below unneces- If a little care is taken a text file can be printed sary blanks have been included to distinguish a key like a normal WordPerfect file or as a TEX file, as like Q-a from the three-key sequence Q - a). long as the file does not contain any fancy type- Many function keys in this keyboard have been setting, such as equations using l$$-commands or made compatible with Tj$X (such as indent, under- any "backslashn-commands. Even then the file can line, etc.) while others have been redefined. For ex- be printed out under WordPerfect, but it will now ample: not enforce these commands. Since a number of --F5 This key, newly labeled Print File translates "special characters" are frequently used in nor- a WordPerfect file (prepared with the present mal text I have replaced three of them in my ver- set-up) into a variety of documentstyles. sion of WordPerfect: $, # and % are no longer re- served, i.e., they print out as seen here. No replace- F9 This key, labeled Toggle Character, switches ment has been programmed for # and %, since the into keyboard SINGLE for a single character, user of this WordPerfectlIPT~Xcustomization has then switches back into NORMAL. no longer any need for them, while the reserved F11 This key, labeled Itemize, produces a I4W character $ has been replaced by the b symbol1. itemized list: the user is prompted for each An exception is the Verbatim font: in this font there item ending with a ; items are by de- are no special characters, i.e., \ will print out as \, fault labeled with a 0, other labels can be used by enclosing them in square brackets (e.g., the he reason why the h symbol is used at all is due to present label was achieved by typing [F111 af- a WordPerfect weakness: WordPerfect is unable -even ter the prompt); itemization is exited by hit- when using Ramfonts-to display two "attributes" at ting (to end each item), followed by once, such as italics and subscripts. Therefore, I have -- (to exit list); lists may be nested by chosen to display math-italic like ordinary text, with h as delimiters. hitting twice (once to end item, sec- ond time to start nesting), followed by another

70 TUGboat, Volume 10 (1989), No. 1

WordPerfect. The SINGLE keyboard is identical to 0.6 Custom Made Macros GREEK except that control is returned to NORMAL af- I have defined the following local macros which, ter each character, and is toggled by hitting the F9 therefore, are only available in my version of key. Thus typing a F9 bc results in "apt". WIUW: FOREIGN, SMCAPS, CALLIGRAPHIC keyboards \f lush#l#2#3 Identical to the prompted ^-F6,i.e., this macro will place the text #1 flush left, For people who type in foreign languages I have de- text #2 centered, and text #3 flush right, fined the FOREIGN keyboard which allows you to type e.g. \f lush{left)c{right): umlauts, etc. The keyboard is identical to NORMAL left c right except that some characters have been replaced. At this point only some umlauts etc. have been rede- \ls#l This macro sets the linespacing, where #1 fined. For example, typing @-a gives a, --a gives A, etc. The SMCAPS keyboard contains a displayable must be an integer number and sets the spac- set2 of small caps characters A, B, THROUGH Z. ing in multiples of "jots" (ljot = 3pt = $ Control is returned to the normal keyboard by hit- ting . The CALLIGRAPHIC keyboard acts like of regular line spacing); the default is \ls4, SINGLE, i.e., after typing a single calligraphic char- i.e., one line every 4 jots or 12 points, trans- acter (upper case A through Z), control is returned to NORMAL automatically. lating to six lines per inch, while this para- Equation example graph is surrounded by {\ls6.. . ) (notice the To demonstrate how the system works for typing "1;-spacingn?). The unit of "jot" was chosen equations, consider the equation to make simple input (\ls followed by a sin- gle digit) possible for fractional values of line spacing. (Enclosing the paragraph in {. . . ) reestablishes former linespacing beyond the )). Note that this macro takes effect only as soon as T$$ goes into "vertical mode" after it is and appears on the screen approximately as called (i.e., between paragraphs); thus putting 66 {\lsn . . . ) within a paragraph will have no ~(x)=~/~./c=o"[{g(x,J) \over 1-J2}+1]\p{f){FIW 6d effect at all. (The big brackets actually appear "broken" on the \d#1#2 Total derivative of #1 with respect to #2 screen to indicate their variable size). (mathmode only), e.g. \d Tx results in (ac- cessed via Q-d) 0.5 Printer Drivers \p#1#2 Partial derivative of #I with respect to #2 As indicated in the description for the --F5 key (mathmode only), e.g. \p Tx results in (ac- above I have defined a number of "printers", cessed via @-p) which will take your WordPerfect files and trans- \dn#1#2#3 #1-th order total derivative of #2 with late them into T$$ files (tex.prs), or into respect to #3 (mathmode only), e.g. \dn 4Tx documentstyle files (article, book, conference, results in $ (accessed via " -d) letter, memo or sideways). Besides translating \pn#1#2#3 #1-th order partial derivative of #2 T$$ and LATEX commands (such as a to \alpha, with respect to #3 (mathmode only), e.g. \pn etc.), these drivers also add the necessary commands 4Tx results in (accessed via --p) at the beginning and end of the file. \fr#l #I-th fraction, (mathmode and normal mode), e.g. \f r4 (accessed via --x) 'while the normal WordPerfect command for small -+a \Cases{#l) is identical to the normal TEX \cases caps may be used, this would not display them (because of the 6 font limitation) {#I} command, but both columns are typeset in mathmode. \txt#l Small text between equations like "and" can be inserted by typing \txt{text) (accessed via --n) TUGboat, Volume 10 (1989), No. 1 7 1

tan

cos mln a delimiters of size "Big"

Figure 2: The GREEK and SINGLE keyboards

0.7 Typing Memos With PT)$ referencing. The following macros will behave differ- The memo document style is designed to make a num- ently depending on the journal style option chosen, ber of memos at once and is really just a slightly i.e., asme, aiaa, ijhmt or jqsrt: modified Umletter style file. The first page of \cit e{key (3)) will place the reference number (or each memo will have a UW-generated version of year) into the text (i.e., the year within paren- the PENNSTATElogo at the top (which, obviously, theses for asme, superscripted number for aiaa other users may want to modify to their needs). and jqsrt, and bracketed number for i j hmt). In addition, a BIB^ command will be placed 0.8 Custom Journal Styles for those that use a bibliography database (ac- Every journal has slightly different ways to arrange cessed via @-c). the list of references, to refer to references within Note: for the asme style the \bibitem com- text, to refer to equations, etc. I have defined cus- mand must have the year of publication as a tomized . sty files for four types of journals in which label, i.e., \bibitem [year] {key). (Of course, I usually publish, viz. the Transactions of the Amer- for BIB^ users this is taken care of automat- ican Society of Mechanical Engineers (asme. sty), ically). journals of the American Institute of Aeronautics \Cite{key(s)) similar to \cite but the numbers are and Astronautics (aiaa . sty), the International J. large and accompanied by "Ref." or "Refs.". of Heat and Mass Transfer (ij hmt . sty), and the J. Obviously, this macro is not defined for the of Quantitative Spectroscopy and Radiative Trans- asme style (since references are not numbered). fer (as well as many other Pergamon Press jour- \capcite{key(s)) identical to \cite except that it nals) (jqsrt . sty). Of these four styles the first only reads the . aux file (to display the cor- one (asme) orders references alphabetically, while rect reference number or whatever), but does the other three order them sequentially. not write an entry into the . aux file; therefore, For these bibliography styles I have redefined or \capcite can only be used if \cite is used newly defined a number of UWmacros, which act elsewhere for the same reference; \capcite differently for different journals. These macros are may be used in places where \cite cannot, discussed under Custom Made L.1w Macros below. primarily within figure and table captions. \e{key) same as the \ref command but surrounds 0.9 Custom Made @T)$ Macros the number with parentheses. I have written a number of Tj$ macros which act together with J4W macros, mostly for labeling and TUGboat, Volume 10 (1989), No. 1

\eq{ke y) will write something like "equation (n)" Contents (eventually one can splice all . toc (depending on the journal), where n is the ref- files together to make a single Table of Con- erenced equation (accessed via --e) . tents); \eq+{keyl , ke@) will write something like "equa- is similar to \TOC, and is designed to be used tions (nl) and (n2)" (depending on the jour- instead of the \listof f igures command; nal), where nl and n2 are the referenced equa- is similar to \TOC, and is designed to be used tions (accessed via --e). instead of the \listoftables command. \eq-{key1 , ke@) will write something like "equa- \Section is equivalent to the \section* command, tions (nl) through (n2)" (depending on the but places an unnumbered entry into the Table journal), where nl and n2 are the referenced of Contents; equations (accessed via --e). \eqs{key} will write something like "equations (n)" \Label is equivalent to the \label command, but (depending on the journal), where n is the places a cross-referencing line not only into the first referenced equation (to be used with \e if . aux file, but also into the . crf file; some other inter-equation text than "and" or \plcounter{#l} places the value of a counter into "through" is desired) (accessed via --e). the . crf file, (which can later be read by the \Eq{key), . . . All of the above \eq.. . commands \crossref command from a different docu- exist also as \Eq. . . commands for equation ment part). #I may be page (page number), references at the beginning of a sentence (ac- chapter (chapter number), section (section number), subsection (subsection number), cessed via ^ - e). figure (figure number), table (table num- \f g{key}, \f g+{key), \f g-{key), \fgs{key), . . . All the \eq commands are repeated for fig- ber), or equation (equation number). When ures. In this case all four journals have the placed at the very end of a file (last entry same format, i.e., the \f g commands translate before the \end{document) command) this to "Fig. n" or "Figs. n", while the \Fg com- transmits to the \crossref command the lat- mand translate to "Figure n" and "Figures n" est page number etc., making continuous num- (accessed via ^-f). bering possible. \tb{key}, \tb+{key), \tb-{key), \tbs{key). All \widen{#l) increases the document \textwidth by the lower case \f g commands are repeated for #1, and decreases both margins by x #I. This tables. In this case all four journals have the macro comes in handy when l2-W breaks same format, (and the upper case version does pages in such a fashion that only one or two not exist since there is no difference between lines end up on the last page (particularly in beginning-of-sentence and mid-sentence refer- letters and memos). ence), i.e., the \tb commands translate to LLTa-

ble n" and "Tables n" (accessed via ^ -t) . Another group of macros that I have written deals Since the standard I4W formats are geared to- with cross-referencing between different documents. wards mathematical and computer journals (styles For example, if you write a long report or a book. plain and unsrt are available), I have written a you may want to break up the documents into parts few more styles, viz. asme, aiaa, jqsrt , i j hmt, or chapters, but without losing the ability to refer- i.e., drivers for the aforementioned journals, which ence equations/figures/pages etc. from other parts, are primarily of interest to engineers and physicists. keeping up continuous pagelchapter etc. numbering, Others could be customized easily. preparing an overall table-of-contents, etc.: 0.11 Availability \crossref {file(s)) will read the files file(s). crf (if I am prepared to supply anybody who would like it the entry is non-empty), and will open the new with the software that I have developed (i.e., you file present-file-name.crf; supply your own WordPerfect and w).To receive \closecrf will close the file present-file-name. crf the software you need to send $10 (to cover diskettes (if it is open, i.e., if \crossref { . . . ) has been and postage), and specify whether you want 360kB called within the document. This command or 1.2MB 5.25in floppies, or a 1.44MB 3.5in diskette. should come after the \end{document) (and In addition I would appreciate any suggestions on is automatically included in my WordPerfect how to further improve the present WordPerfect-to- book documentstyle); WII4Wpreprocessor. \TOC will open and prepare a present-file-name. toc file similar to the \tableofcontents com- mand. but will not actually print the Table of TUGboat, Volume 10 (1989), No. 1

These characteristics satisfy the criteria presented Macros by Rogers in Reference 1. The floating keep is implemented as a macro \addf igure that is called with one parameter: the number of a box-register A Page Make-up Macro that contains the figure \vbox. If the \vbox can not appear on the current page (either there Joost Zalmstra* are already two figures on this page or there are David F. Rogers*' figures left over from a previous call to \addf igure) In a previous article in TUGboat (Ref. 1) it was then \addfigure puts the \vbox on a list (FIFO pointed out that using rn to produce heavily queue) implemented as the box-register \f iglist. illustrated mathematical, engineering and scientific Otherwise, it tries to fit the box on the current books containing large numbers of complex display page, taking into account \pagetotal, \pagegoal equations and tables poses problems. The reason is and the size of the figure. The figure size includes that publishers have stringent requirements for the the space separating the \vbox from the text. If placement of figures with respect to the text while the figure won't fit, it is added to \f iglist. If neither Plain nor Urnprovides good control the figure fits on the page the \vbox, together with of this placement. the space separating it from the text, is inserted Currently a set of macros is being developed to on the current page using Plain m's\topinsert. help in solving this problem. The macros are based The queue (\figlist) is implemented using W's on a FIFO queue. Basically, the algorithm is quite box operations. An element (figure) is added to the simple. When making up a page the FIFO queue is queue by placing it at the top of the existing vertical checked. If the queue is not empty and if the first list of boxes. The 'head' of the queue is accessed figure on the queue fits on the current page, it is via m's\unvbox and \lastbox commands. removed from the queue and placed on the current The output routine splits the insertion, if page at the top. If the queue is still not empty, necessary, and places the first figure at the top of and the second figure on the queue also fits on the the page and the second, if present, at the bottom. page it is removed from the queue and placed at the After the \shipout for the current page occurs, the bottom of the current page. If the figures do not fit output routine checks \f iglist to see if there are on the current page, the page is made-up normally any figures left. If there are, it attempts to insert and the process repeated for the next page. If a a maximum of two figures on the next page, again new figure is encountered, and if the queue is not using \t opinsert . Before calling \t opinsert the empty, the figure is placed on the queue. If the total size of the figures on the page is checked queue is empty, and if the figure fits on the current to insure that it does not exceed \dimen\topins. page, it is placed on the current page, either at the If this is not done, \topinsert would shift the top or at the bottom. If the figure does not fit on insertion to the next page, thus producing a figure the current page, it is placed on the queue and the on that page without \addf igure knowing about page made-up normally. it. In implementing the algorithm in Plain m, a The space separating the figure from the text form of floating keep with the following properties is specified by two skip registers: \topf igureskip is introduced: and \bottomf igureskip. The first specifies the \vskip below a figure placed at the top of the page, The figure and any caption must be placed in the second the \vskip above a bottom figure. Note a \vbox. that this \vskip must not be included in the \vbox The order in which these \vbox-es appear in offered to \addf igure. the text is maintained. There are several refinements to the basic algorithm that have been implemented and are No more than two \vbox-es appear on one worth mentioning: page, one at the top and one at the bottom of the page. if the amount of text remaining on a page after insertion of the figure(s) is less than a certain amount (specified by the dimen register *Vrije Universiteit, Amsterdam, The Nether- \minpagesize) then no text is placed on the lands, mcvax ! nat vu nl ! j jazQuunet .uucp . . page. If two figures appear on that page they **United States Naval Academy, Annapolis, are placed at the top and bottom of the page. MD, USA, df rQusna .mil TUGboat, Volume 10 (1989), No. 1

If there is only one figure on that page, it for \topf igureskip, \bottomfigureskip or \art- appears at the bottom of the page. surround. The data in Table 1, plus allowance for these spaces, indicates that approximately 25% of The switch \ifbottomforce is used to force a the available space is occupied by illustrations. This bottom figure. If \bottomforcetrue then if fact, plus the large numbers of display equations, \addf igure finds that it can fit a figure on the many of which are 4 to 8 row matrices within current page as the first figure (which would an \eqalign, illustrates the complexity of page normally be placed at the top of the page) make-up for these files. then it forces the figure to the bottom of the page (by inserting an empty \vbox first, which appears at the top of the page). This feature Table 1. Page Make-up Complexity can be used to insure that the figure appears after the first reference to it. File 1 File 2 File 3 If the \vbox offered to \addf igure has a height No. Pages of exactly \vsize then it is considered to be a page sized figure. No extra \vskip is added. No. Figs. \pageinsert is used to insert it into the text. Total Figure Space For completeness, a set of macros to create the space for a figure and to set the figure caption is Average Figure also presented. These macros are called from within Space the macro \f igspace. The \f igspace macro has Smallest Figure four calling parameters: No. Display The vertical dimension of the white space to Equations be left for the figure. No. Tables The horizontal dimension of the white space to No. Direct Calls be left for the figure. to \normalf ig The figure number. The figure caption. The \f igplace macro performed very well. Calling \f igplace immediately after the first ref- If the horizontal size of the figure (parameter erence to the figure often resulted in acceptable 2) is smaller than a certain value specified by placement of the figure. Placement of the figure \sidearttest then \sidefig is called and the can be changed by changing the location of the call caption is placed to the right of the figure (separated to \f igplace in the source file. Occasionally when from it by \sideartspace). Otherwise \normalf ig l&X was particularly recalcitrant, it was necessary is called and the caption appears below the figure to call \normalf ig or \sidef ig directly. separated by \artsurround. There are still some small bugs known to us The \addfigure and \figspace macros are and some improvements that can be made. combined by calling \f igplace with the same Since the vertical size of a figure caption is parameters as \f igspace. This creates space for the not known a priori, there is no way to initially figure, sets the caption, places the result in a \vbox exactly specify a full page figure. At least one and calls \addf igure. Note that \addf igure and pass through must be made. The vertical \f igspace are completely independent. Changing size of the figure caption is then measured and the the \figspace-macros has no influence on the value of the first parameter in \f igplace adjusted working of \addf igure. accordingly. To solve this problem \f igplace is The macros have been used both with test files called with a vertical size (parameter 1) of 0. The and with production text (Ref. 2). The production \f igspace macros then change the vertical size to text consisted of three separate files. The com- produce a full page figure. Directly incorporating plexity of the page make-up task is indicated by this capability into \f igplace to maintain complete the details given in Table 1. Page size was 46pc independence of the two macros is desirable. by 29pc set 10/12 using the Computer Modern If \raggedbottom is used, the vertical size Fonts. The figure space quoted in Table 1 does of pages may vary. However, \f igplace always not include space for the figure captions nor that makes full page figures exactly the specified \vsize. TUGboat, Volume 10 (1989), No. 1

Verso and recto pages may then be unbalanced (of A macro to set two or more small figures different vertical lengths). The workaround is to side-by-side with the captions below is also needed. call \f igplace within a \vbox of the required size. Here, the calling sequence might be However, if the required size is greater than the \sidebysidefig#i#2#3#4#5#6#7#8 specified \vsize, an overfull \vbox results and where items 1-4 correspond to those of \f igplace prints the appropriate message. The message can be for the lefthand figure and 5-8 to those of \f igplace ignored since the page is set and output correctly. for the righthand figure. \figplace is limited to a maximum of two A major problem is the fact that \addfigure figures on a page. However, difficult make-up must be called between paragraphs. The reason is situations or reader convenience may dictate that that \addf igure calculates the space available on more than two figures be placed on the page. For the current page from \pagetotal and \pagegoal. example, it may be desirable to group several small However, at the moment that these are evaluated figures together at either the top or bottom of the they have the current value at the start of the \f igspace page. Here, the workaround is to use paragraph. directly, place the small figures together in a \vbox Despite the problems remaining, the macros and call \addf igure directly, e.g., seem to do the job. Hopefully they will be useful to \setboxO=\vbox( other people and will stimulate further discussion \f igspace(#la3i#2alI#3a)C#4a3 of the solution to the page-makeup challenge. \f igspace(#lb)(#2b)C#3b)C#4b) l References \addfigure0 The \vbox containing the figures is added to 1. Rogers, David F., A Page Make-up Challenge, \f iglist and processed in sequence. TUGboat, Vol. 9, No. 3, pp 292-293, December The \sidef ig macro assumes that the illustra- 1988. tion is left justified on the page with the caption set 2. Rogers, David F. and Adams, J. Alan, Math- to the right. A companion macro with the illustra- ematical Elements for Computer Graphics 2nd tion right justified on the page with the caption set Edition, McGraw-Hill, New York, 1989. to the left is needed.

The macros figplace.tex

name : f igplace . tex programmer: Joost Zalmstra versioddate: Version(i.8) of 89/16/1 08:30:00 language: Plain \TeX purpose : Implementation of a floating keep that allows better control of the placement of figures history: Based on David Rogers tests and comments the original macro was modified as follows: Added separate \topfigureskip and \bottomfigureskip to partially solve the problem of unequal spaces between a topfigure and the text and a bottomfigure and the text. Corrected problem of loss of all subsequent figures if a figure + caption is larger than \vsize. Added code to approximately center the text between a topfigure and a bottomfigure on the same page. Added code to push a figure larger than \vsize - \minpagesize to the bottom of the page. Added code to force a single figure on the page to be at the bottom of the page. declaration of some registers TUGboat, Volbme 10 (1989), No. 1

\newif\ifbottomforce \bottomforcetrue \newbox\figlist \newcount\f iguresonpage \f iguresonpage=O \newcount\figuresonlist \fig~resonlist=O \newskip\topf igureskip \topf igureskip=l .25 pc \newskip\bottomfigureskip \bottomfigureskip=i.5 pc \newdimen\pagesize \newdimen\minpagesize \minpagesize=5 pc \newdimen\figuresizeonpage \input f igspace .tex% % \figspace is the macro that actually sets the white space % % for the art and the figure caption. % % It is independent of \figplace. % user interface for inclusion of figures \catcoder@=ll % % borrowing macros from plain TeX % Note: the redefinition of \raggedbottom has nothing to do with % the implementation of \addfigure. It is only placed here % because \raggedbottom uses @ as a letter \def\raggedbottomC\topskiplOpt plus 24pt \r@ggedbottomtrue) \def\figplace#l#2#3#4C% \setboxO=\vboxC% \f igspaceC#l>C#2)C#3)C#4) 1 \addf igureO 3 % add figure in box #l to the document \def\addfigure#lC% \dimenO=\ht#l \ifdim\dinenO>\vsize% % be sure it will fit \messageCfigure to big) \setbox#l=\vbox to \vsizeI\box#l> \f i \ifnum\figuresonpage>l% % already two figures on this page \addtolist{#l)% % so save for later \else\ifnum\figuresonlist>O% % figlist is not empty \addtolistC#l>% % so save for later \else% % no figures left over, so try to fit this one \dimenO=\ht#l \ifdim\dimenO<\vsize% % not a pagesize figure \advance\dimenO by \dp#l% % size of the box \if num\f iguresonpage=O \advance\dimenO by \topfigureskip% % extra space below \else \advance\dimenO by \bottomfigureskip% % extra space above \f i \f i \dimenl=\dimenO \advance\dimenO by \pagetotal \ifdim\dimenO>\pagegoal% % no space on this page \addtolistC#i)% % so save for later \else \advance\dimenl by \figuresizeonpage \ifdim\dimeni>\dimen\topins% % exceeding maximum insertion size \addtolistC#l)% % so save for later TUGboat, Volume 10 (19891, No. 1

\else% % insert figure \ifnum\f iguresonpage=O% % force a bottom insert \ifbottomforce% % by adding an empty box first (\setboxl=\vboxC% \vskip -\topf igureskip)% compensate for f igureskip \f igureinsertl) \f i \f i \figureinsert{#l)% % insert the figure \f i \f i \f i\f i

% \addtolist adds \box#l to the FIFO queue \figlist \def\addtolist#lC% \gl~bal\setbox\figlist=\vbox{% \nointerlineskip \box#l \unvbox\figlist) \global\advance\figuresonlist by 1 3 % \figureinsert inserts \box#l using Plain \TeX's \topinsert % and updates the registers \figuresizeonpage and \figuresonpage \def\figureinsert#l{% \dimenO=\ht#l \advance\dimenO by \dp#l \ifdim\ht#l<\vsize% % not a full page figure \ifnum\figuresonpage=O \advance\dimenO by \topfigureskip \insert\topins{\vbox~% \unvbox#l\vskip\topfigureskip))% % skip below the figure \else \advance\dimenO by \bottomfigureskip \insert\topinsC\vboxC% \vskip\bottomfigureskip\unvbox#13)% % skip above the figure \f i \else% % full page figure \pageinsert \unvbox#l \endinsert \fi \global\advance\f iguresonpage by I \global\advance\figuresizeonpage by \ht#l \global\advance\figuresizeonpage by \dp#l \if num\f iguresonpage=O \global\advance\figuresizeonpage by \topfigureskip \else \global\advance\figuresizeonpage by \bottomfigureskip \f i 3 % see if there is a figure in the list that will fit on the next page % return \box0 containing the figure or void if no figure will fit \def\checkf iglist{% \ifnum\figurssonlist>O % % there are figures on the queue TUGboat, Volume 10 (1989), No. 1

\global\setbox\figlist=\vbox{% \unvbox\f iglist \setboxO=\lastbox% % \box0 contains first figure \global\advance\dimenO\htO \ifdim\htO<\vsize \global\advance\dimenO by \dpO \ifnum\figuresonpage=O % % topfigure may loose \figureskip \else \global\advance\dimenO by \bottomfigureskip \f i \f i \ifdim\dimenO>\vsize% % test if it will fit \vboxC\boxO)% % no room ; replace the figure \else \ifdim\dimenO>\dimen\topins \vbox{\boxO)% % exceeding maximum insertion size \else% % remove it from the queue \global\advance\figuresonlist by -1 \f i \f i \global\setboxO=\boxO 1 \else% % no figures left on the queue {\global\setbox0=\box0\voidb@x) % make box0 void \f i 3 % output routines % note: these are just modifications of the Plain \TeX output routines \outputi\myoutput) \def\myoutputC\shipout\vbox~\makeheadline\pagebody\makefootline~% \advancepageno % reset \addfigure registers \global\figuresonpage=O \global\figuresizeonpage = Opt \dimenO=Opt% % \dimen0 contains \figuresizeonpage \checkf iglist% % check if there is figure waiting that will fit \if voidO% % nothing left \else \f igureinsertO% % insert this figure \global\advance\dimenO by \topfigureskip \checkfiglist% % check for a second figure \if voidO\else \f igureinserto \fi \f i \ifvoid255\else\unvbox255\penalty\outputpenalty\fi % put unused page back on list \ifnum\outputpenalty>-\@MM \else\dosupereject\fi) % actual contents of this page \def \pagecontentsC% \pagesize=\ht255 \advance\pagesize by \dp255% % determine size of box 255 \ifnum\figuresonpage>O% % check for insertion of figures \unvbox\topins% % place the figure(s) on top TUGboat, Volume 10 (1989), No. 1

\if dim\pagesize>\minpagesize \ifnum\figuresonpage=2 \setboxO=\lastbox% % place the second figure in \box0 \f i \setboxl=\lastbox \unvboxl% % remove surrounding box \else% % no text is produced on this page \ifnum\figuresonpage=l \setboxO=\lastbox \vf ill% % figure becomes bottomfigure \unvboxO% % remove surrounding box \unskip% % remove \topfigureskip

% topfigure is placed on this page % put the text on this page if it is large enough \if dim\pagesize>\minpagesize \dimen@=\dp255 \unvbox255% % the real page contents \ifr@ggedbottom \kern-\dimenC!\vf il\f i \else \ifdim\ht255=0pt% % box is empty \else \vfil% % too small so leave for next page \f i \f i % Produce the second figure, if present \ifnum\figuresonpage=2 \boxO% % second figure \f i % produce possible footnotes \ifvoid\footins\else% % footnote is present \vskip\skip\f ootins \footnoterule \unvbox\footins\fi 3 \cat codeCQ=12% % at signs no longer letters

The macros figspace.tex % name: f igspace.tex % programmer: David F. Rogers % versioddate: Version(l.6) of 89-16-01 08:30:00 % language: Plain \TeX % purpose: To provide white space for stripped in art and set the caption for the art % history: Modified by Joost Zalmstra to work more efficiently with the \figplace macro % Added code to check for nearly page size figure, expand it to fill the page % and print a message to that effect. % Added code to check for figure + caption larger than page size, to % reduce the figure size (parameter #1) so that the art plus caption just % fills the page and to print a message to that effect. 80 TUGboat, Volume 10 (1989), No. 1

% define top and bottom cornerrules to indicate the size of the art \newdimen\ruleht \ruleht=0.5pt% % take the rules out for final \newdimen\ruledpth \ruledpth=Opt% % production by setting \newdimen\rulelength \rulelength=lpc% % \ruleht=Opt and \rulelength=Opt \def\settopcornerrules#1C\hbox to #1<\vrule width\rulelength height\ruleht \hfil \vrule width \rulelength3 \hbox to #i<\vrule height\rulelength width\ruleht depth\ruledpth \hfil \vrule width\ruleht depth\ruledpth)) \def\setbotcornerrules#1I% \vskip -2\rulelength% \hbox to #lC\vrule height\rulelength width\ruleht depth\ruledpth% \hfil \vrule width\ruleht depth\ruledpth)% \vskip -\rulelength% \hbox to #lC\vrule width \rulelength height\ruleht% \hfil \vrule width \rulelength) 3 % define a figure caption macro % #1 is the figure number #2 is the caption % the caption is to be set in a 'box' left and right justified 1em to % the right of the figure number % the size to the box containing the word Figure, its number and the 1em % skip is found in box0 % box1 is \hsize less the width of box0. % a \vtop is used along with an \halip to obtain the flush left and right % effect. \def\figcap#l#2IC% \setboxO=\hboxCC\bf Figure #l)\hskip lem)% \setboxl=\vtopC\advance \hsize by -\wdO \noindent \spaceskip=.3em plus .2em minus.2em #23 \halip{## & ## \cr \box0 & \box1 \cr)) \leavemode > % define a figspace macro % A 1.5pc space is required above the art. % If a figure is more than 13pc wide then the caption is to be set % below the art with a 1.5pc space between the art and the figcap. \newdimen\artsurround \artsurround=l.5pc% % space between art and the caption \newdimen\sidearttest \sidearttest=13pc% % if more than set side caption \newdimen\sideartspace \sideartspace=2em% % horizontal space to caption \def \f igspace#l#2#3#4C% \ifdim #2 > \sldearttest% \normalf igC#lH#23C#3H#43 \else \sidefigC#1)(#2){#33<#4) \f i 3 % this is the case when the figure is wider than \sidearttest (13 pc's) \def\normalfig#l#2#3#4C% #I is vertical size in pc's % #2 is horizontal size in pc's % #3 is the figure number -- used in figcap % #4 is the figure caption -- used in figcap TUGboat, Volume 10 (1989), No. 1

\setboxO=\vbox{\f igcap{#3){#4)) \dimenO=\htO \advance\dimenO by \dpO \advance\dimenO by \artsurround \dimenl=#l \ifdim\dimenl = 0 pt% % figure should fill the rest of the page (jz) \dimen1 = \vsize \advance\dimenl by -\dimen0 \message{expanding figure to \the\dimenl) \else \advance\dimenO by \dimen1 \ifdim\dimenO>\vsize% % figure + caption larger than page size (jz) \advance\dimenO by -\vsize \advance\dimenl by -\dimen0 \message{warning: reducing vertical figure size to \the\dimenl) \f i \f i \leftline{% % left justify the figure \vbox to \dimenl{% \settopcornerrules{#2)% % set top corner rules \vf ill% % push the figcap down to bottom \setbotcornerrules{#2)% % set bottom corner rules 3% 1% \nointerlineskip \vskip \artsurround% % put space between figure & caption \boxO% % set the caption 1 % this is the case when the caption is to be set to the rigb.t \def\sidefig#l#2#3#4{% #I is vertical size in pc's % #2 is horizontal size in pc's % #3 is the figure number -- used in figcap % #4 is the figure caption -- used in figcap \ifdim#l>\vsize% % figure + caption larger than page size (jz) \dimenO=\vsize \message{warning: reducing vertical figure size to \the\dimenO) \else \dimenO=#l \f i \setboxO=\vbox to \dimeno(% \advance \hsize by -#2% % reduce \hsize by the horiz. \advance \hsize by -\sideartspace% % size and blank space between \vf ill% % push the figcap down to bottom % of the box J \setboxl=\hbox to #2{\vbox to \htOC \settopcornerrules(#2~% % set top corner rules \vf ill% % push the figcap down to bottom \setbotcornerrules(#21% % set bottom corner rules I)% \hbox{\boxl \hskip \sideartspace \boxO)% actually do the setting > TUGboat, Volume 10 (1989), No. 1

Extended Equation Numbering in Plain James Nearing Physics Department University of Miami This is a macro package designed to provide auto- matic equation numbering.* It has various options: allow chapter (or section) numbers; allow forward will produce references to equations or figures; allow equations a=2+1.5+2.5~+... (9) to be labeled by chapter number as well as equation ($ - m)ll, = 0 (10) number; allow automatic lettering of appendices. References to equations produced as above are The five commands used for equation numbers done by \eqref where the dots are the label and for reference to the equations are C . . .3 that was introduced when either of the commands \eqnum \eqlabel or \eqalignlabel are used. The se- \eqalignnum quence \eqlabel

Summary

Number this equation, but make no reference to it. 11 11 11 , and set up a reference to it. like \eqnum but in the context of \eqalignno I1 I' \eqlabel " #I I! refer to a labeled equation.

Number this chapter, but make no reference to it. I1 11 I1 , and set up a reference to it. refer to a labeled chapter.

Number this figure, but make no reference to it. I1 I1 " , and set up a reference to it. refer to a labeled figure.

Eq. - convenient if you change your mind Eqs . - Figure- Figures- \centerhead{alabelH~~~~~)Typical macros for labeled titles \lefthead{alabel)CTITLE) \bigheadCalabel)CTITLE)

\input eqmacros To use these macros: \proofmodetrue Initially set to true, later false \forwardreferencetrue If you plan on any, set true \chapternumberstrue If you want equation numbers like (3.2) \figurechapternumberstrue II #I I! figure " #I II \initialeqmacro To initialize the setup:

\bumpchapno Like \chapnun, but doesn't display number \continuousnumberingtrue If you DON'T want eq numbers to restart fresh

\continuousfigurenumberingtrue " " I( " fig " )I It I! \chapf olio The current chapter number or letter \today Today's date (\proofmode puts it in headline)

\chapno=-1 Starts LETTERING instead of NUMBERING TUGboat, Volume 10 (1989), No. 1

Macros

% true => wide right margin, eqn. % labels shown; date in headline

% true => allow reference to an % equation that appears later

\newif\ifchapternumbers % true => equations labeled as e.g. \chapternumbersfalse % (3.7) instead of (7)

% true => don't reset numbering of % equations in each chapter

% true => figures labeled as e.g. % (3.7) instead of (7)

% true => don't reset numbering of % figures in each chapter

% given these odd names to avoid % possible conflict with a user. % for proofmode labels

% for appendices % chapter number % equation #'s % figure numbers

% This returns either a number or a letter depending on the sign % of \chapno. It uses the CURRENT value of \chapno. Typically used % only by other macros. The user may however, want to place the chapter % number (or letter) into the headline, then \chapfolio should be used. % \def\chapf olioC\ifnum \chapno>O \the\chapno \else \the\chapletter \f i)

% This increments \chapno in the correct direction (more positive OR % more negative). If as is normal, there is NO continuous numbering % of equations and figures, those variables are reset. It is typically % used only by the other macros, not directly by the user. % \def\bumpchapnoI\ifnum \chapno>-1 \global \advance \chapno by 1 \else \global \advance \chapno by -1 \setletter\chapno \fi \ifcontinuousnumbering \else \global\eqlabelno=O \fi \ifcontinuousfigurenumbering \else \global\figureno=O \fi) TUGboat, Volume 10 (1989), No. 1

% This is a very awkward way to turn a number into a letter, but some % difficulty with simpler methods occurs in the \write routines. % \def\setletter#i{\ifcase-#l ()\or<) \or\global\chapletter=CA) \or\global\chapletter=IB) \or\global\chapletter=CC) \or\global\chapletter=ID) \or\global\chapletter=CE) \or\global\chapletter=(F) \or\global\chapletter=CG) \or\global\chapletter=(H) \or\global\chapletter={I) \or\global\chapletter=(J) \or\global\chapletter={K) \or\global\chapletter={L) \or\global\chapletter=(M~ \or\global\chapletter=CN) \or\global\chapletter=CO) \or\global\chapletter=CP) \or\global\chapletter=Cq) \or\global\chapletter=CR) \or\global\chapletter=W \or\global\chapletter=CT) \or\global\chapletter=(U) \or\global\chapletter=CV) \or\global\chapletter=IW) \or\global\chapletter=(X) \or\global\chapletter=CY) \or\global\chapletter=IZ)\fi)

% And a non-global version of the above: % \def\tempsetletter#l(\ifcase-#I ()\or{) \or\chapletter=(A) \or\chapletter=(B) \or\chapletter=(C) \or\chapletter=CD) \or\chapletter=(E) \or\chapletter=CF) \or\chapletter=CG) \or\chapletter={H) \or\chapletter=CI) \or\chapletter={J) \or\chapletter=CK) \or\chapletter=CL) \or\chapletter={M) \or\chapletter={N) \or\chapletter=CO) \or\chapletter=CP) \or\chapletter=Cq) \or\chapletter=CR) \or\chapletter=(S) \or\chapletter={T) \or\chapletter=CU) \or\chapletter={V) \or\chapletter={W) \or\chapletter=CX) \or\chapletter=CY) \or\chapletter=(Z)\f i)

% A utility: it produces a number or a letter, depending on % the sign of the argument. Used by other macros for appendices. % (It is like \chapfolio, but need not refer to the current chapter.) % \def\chapshow#li\ifnum #1>0 \relax #I% \else (\tempsetletter(\number#l)\chapno=#l \chapf olio) \f i)

% In proofmode, it is useful to put today's date on each output page. % \def\todayC\number\day\space \if case\month\or Jan\or Feb\or Mar\or Apr\or May\or Jun\or Jul\or Aug\or Sep\or Oct\or Nov\or Dec\fi, \number\year)

% The initialization procedure. Output registers 1 and 2 are used. % \def\initialeqmacroC\ifproofmode \headline(\tenrm \today\hfill \jobname\ --- draft\hfill\folio) \hof f set=-lcm \immediate\openout2=allcrossreferf ile \f i \ifforwardreference \input labelfile \ifproofmode \immediate\openoutl=labelfile \fi \fi)

\def\initialeqmacros{\initialeqmacro) % either spelling TUGboat, Volume 10 (1989), No. 1

% Various ways to place a number on a chapter (or section): % \def\chapnumC\bumpchapno \chapfolio3

\def\chaplabel#lC\bumpchapno \ifproofmode \ifforwardreference \immediate\writel(\noexpand\expandafter\noexpand\def \noexpand\csname CHAPLABEL#l\endcsname{\the\chapno))\fi\fi \global\expandaf ter\edef \csname CHAPLABEL#l\endcsname C\the\chapno~\ifproofmode\llapC\hboxC\marginstyle #l\ ))\f i\chapf olio)

\def\chapref#1~\ifundefinedCCHAPLABEL#l)??\ifproofmode\ifforwardreference \else \writeiGC ***Undefined Chapter Reference #I*** )\fi \else \writelGC ***Undefined Chapter Reference #I*** )\fi \else \edef\LABxx~\getlabe1ICHAPLABEL#lH\chapshow\LABxx\fi \ifproofmode\write2CChapter #l)\fi)

% Various ways to place a number on an equation. % \def \eqnum~\global\advance\eqlabelno by 1 \eqno(\ifchapternumbers\chapfolio.\fi\the\eqlabelno)3

\def\eqlabel#lC\global\advance\eqlabelno by 1 \ifproofmode\ifforwardreference \immediate\writelC\noexpand\expandafter\noexpand\def \noexpand\csname EQLABEL#l\endcsname~\the\chapno.\the\eqlabelno?))\fi\fi \global\expandafter\edef\csname EQLABEL#l\endcsname I\the\chapno . \the\eqlabelno?) \eqno(\if chapternumbers\chapfolio. \f i \the\eqlabelno)\ifproofmode\rlapC\hboxC\marginstyle #l33\fi3

\def \eqalignlabel#lC\global\advance\eqlabelno by 1 \ifproofmode \ifforwardreference\immediate\writel(\noexpand\exp~d\def \noexpand\csname EQLABEL#l\endcsname <\the\chapno.\the\eqlabelno?))\fi\fi \global\expandaf ter\edef \csname EQLABEL#l\endcsname C\the\chapno. \the\eqlabelno?)&(\if chapternumbers\chapf olio.\f i \the\eqlabelno)\ifproofmode\rlapC\hboxC\marginstyle #l))\fi3

\def \eqref#1I (\ifundef inedCEQLABEL#l)***\ifproofmode\iff orwardreference)% \else \writelGC ***Undefined Equation Reference #I*** 3\f i \else \writeIG< ***Undefined Equation Reference #I*** )\fi \else \edef\LABxxI\getlabelIEqLABEL#IH% \def\LAByyC\expandaf ter\stripchap\LABxx)\if chapternumbers \chapshowI\LAByy3.\expandafter\stripeq\LABxx \else\ifnum \number\LAByy=\chapno \relax\expandafter\stripeq\LABxx \else\chapshowC\LAByy3.\expandafter\stripeq\LABxx\f i\f i) \f i \ifproofmode\write2IEquation #l)\fi) TUGboat, Volume 10 (1989), No. 1

% These are analogous to \eqnum etc. They will automatically % generate figure numbers and in the second case accept your % label for later reference. % \def\fignumC\global\advance\figureno by 1 \relax \iffigurechapternumbers\chapfolio.\fi\the\figureno)

\def \f iglabel#l~\global\advance\figureno by l\relax \ifproofmode\ifforwardreference \immediate\writ el(\noexpar.d\expandaf ter\noexpand\def \noexpand\csnameFIGLABEL#l\endcsnameC\the\chapno. \the\f igureno?))\f i\f i \global\expandafter\edef\csname FIGLABEL#I\endcsname C\the\chapno.\the\figureno?)\iffigurechapternumbers\chapfolio.\fi \ifproofmode\llapC\hbox~\marginstyle #I\ ))\relax\fi\the\figureno)

\def\figref#l{\ifundefined(FIG~~~E~#l)!! ! !\ifproofmode\ifforwardreference \else \write16{ ***Undefined Figure Reference #I*** )\f i \else \write16{ ***Undefined Figure Reference #I*** )\fi \else \edef\LABxxC\getlabel{FIGL~~~~#l))% \def \LAByyC\expandafter\stripchap\~A~xx)% \iff igurechapternumbers\chapshowC\~~~~~r.\expandaf ter\stripeq\LABxx \else\ifnum\number\LAByy=\chapno \relax\expandafter\stripeq\LABxx \else\chapshow(\~~~~~).\expandafter\stripeq\~~~xx\f i\f i \ifproofmode\write2{~igure #l)\fi\fi)

% TYPICAL macros to place headers on chapters or sections: % Form to use is: \...head{label)(Title) % \def\centerhead#l#2~\vskiplOpt\centerline~\chaplabel{#1). #2)\vskiplOpt) \def\lefthead#l#2CC\bf \noindent \chaplabel(#l). #2\hfil\break)) \def\bighead#1#2{\vskiplOpt% \centerline{(\eqtwelverm \chaplabelI#l). #2))\vskiplOpt)

% Utilities for use by other macros % \def\getlabel#1{\csname#l\endcsname) TUGboat, Volume 10 (1989), No. 1

APE - A Set of 'I)ijX Macros produces the following cutput: To Format Ada Programs procedure EXCH(X,Y : in out INTEGER) is Sriram Sankar* T : INTEGER; - - T is a temparary variable. 1 Introduction begin T := X; X := Y; Y := T; This report describes a set of macros designed for end EXCH: the purpose of formatting Ada [Ada831 programs in QX1. These macros were implemented by the au- The text that produced the very first line in this thor in early 1987, and they have been refined a few section is shown below: times since. They have also been extended for the language extensions of Ada developed by the Pro- The example below shows a means of gram Analysis and Verification Group at Stanford formatting a \ap(\Procedure EXCH). University. Some of these language extensions are The following text: Anna [LvHK084] and TSL [HL85]. These macros As is obvious from the above example, keywords exist as one collection in a file which is included into are entered as macros whose names are the same the document using the \input command. This file as the keywords (with the first letter converted to is available on request from the author. upper-case). Apart from \apebegin, \apeend and The design of the macros was motivated by the \ap, the keyword macros are the only global macros. programexample environment in Scribe. It is for Also, comments are inserted using the macro \cm this reason that they have been named APE, which which takes two arguments-the first is the maxi- is an acronym for "Ada Program-Example". The mum width allowed for the comment, and the second macros are of two kinds -global macros and lo- is the actual comment itself. If the comment does cal macros. The global macros are visible through- not fit in one line, it is split into lines each of the out the scope in which the \input command has specified width. Each of the lines is prefixed by the been inserted. The most important global macros Ada comment symbol -- in the output2. If only are \apebegin, \apeend and \ap. \apebegin the comment symbol is desired (with no comment . . . \apeend defines an environment in which a com- following it), the macro \- can be used. Again, as plete Ada program can be formatted, while \ap is is obvious from the above example, all spaces and a macro with one argument which is used for in- carriage-returns are significant everywhere except sertion of program text within ordinary text. The within the arguments of the macro \cm. local macros are available for use only within en- vironments defined by \apebegin . . . \apeend and The very first thing that one would like to do within the program text of arguments to \ap. is to choose their own favorite fonts for the various Ada constructs. To do this, the following macros 2 Formatting Ada Programs using APE should be redefined after the \input command: The example below shows a means of formatting a \apekeywordf ont \apkeywordf ont procedure EXCH. The following text: \apecommentfont \apcommentfont \apebegin \apebodyf ont \apbodyf ont \Procedure EXCH(X,Y : \In \Out INTEGER) \Is T : INTEGER; Each of the above macros defines a font. Those that are of the form \ape.. define fonts for the \cm(2.5in)(T is a temporary variable. ) . \Begin \apebegin . . . \apeend environment, while the oth- T := X; X := Y; Y := T; ers define the fonts for the \ap macro. In addition, \End EXCH; the following macros can be redefined to specify the \apeend horizontal space that each space character inserts; the vertical space that each carriage-return inserts; *Department of Computer Science, Stanford Uni- and the margin at the beginning of each line: versity, Stanford, California 94305. EMail: [email protected]. Phone: (415)723-4962. 'These macros can easily be rewritten for other 2~ora similar use of this feature see [Des84]. languages. 90 TUGboat, Volume 10 (1989), No. 1

The range delimiter (. .) in Ada is obtained us- created using \cm. Any scope that begins within the ing the macro \. . The meanings of - (underscore) \apebegin . . . \apeend environment must be ended and \- have been interchanged. Hence underscores before the end of the line or the next &, whichever in Ada identifiers can be entered without a preced- is earlier. ing backslash. However a backslash is required when Just as in the case of T)$, these tabbing com- the underscore is used for subscripting. Most other mands format text into a box of appropriate width characters and macros have their usual plain and inserts \hss at the end of the text. Hence it is meaning. For example, math mode has to be entered possible to achieve interesting results like centering for subscripting and superscripting, and to obtain text between two tab positions (by inserting glue characters like & and # one has to enter \& and \# more infinite than \hss on both sides of the text). respectively. There is one exbeption - math mode To conclude, three more examples are shown need not be entered to get a small space; one can below. The first example demonstrates multi-line enter \ , directly. comments; the second example shows the use of Page-breaks are by default disabled within tabbing and different fonts; and the third exam- the \apebegin . . . \apeend environment. How- ple shows how centering about a column can be ever, there are macros that can enable or disable achieved. page-breaks within this environment. The macro \bhinge enables page-breaks, while the macro Example 1: \ehinge disables page-breaks. Both \bhinge and The following input: \ehinge have global effect -even if they occur in- side a group, they continue to have effect outside the \apebegin group. \bhinge and \ehinge can be used within \Procedure CLOSE(F1LE: \In \Out FILE-TYPE); comment text (the second parameter to \cm) also. \cmC2.5in)CSevers the association When used within comments, these macros also in- between the given file and its sert a space at their location. It is sometimes useful associated external file. The to specify the particular lines at which page-breaks given file is left closed. The should be enabled. For this there is a macro - \\. exception C\apebodyf ont STATUS-ERROR) \\ has to be entered at the end of a line just be- is raised if the given file is fore the carriage-return (). Actually, \\ not open.3 is equivalent to \bhinge\ehinge. Note that \apeend enabling page-breaks does not mean that 'QX will produces: actually move over to a new page at these loca- tions; it only means that l)$ can move over to a procedure CLOSE(F1LE: in out FILE-TYPE); new page if its page-breaking algorithms decide that -- Severs the association between the given this is necessary. Commands that force page-breaks -- file and its associated external file. The (like \eject) will not work within the \apebegin -- given file is left closed. The exception . . . \apeend environment. -- STATUS-ERROR is raised if the given file There is also a tabbing facility that can be used -- is not open. within the environment \apebegin . . . \apeend. This is quite similar to the tabbing facility of 'QX. Example 2: For this, there are three more commands, the most The following input: important of which is the character &. This com- mand shifts to the next tab position. If the current C\def \apekeywordf ontC\normalsize\bf 3 text has overshot this position, then it will back up \def \apebodyf ont(\normalsize\it) to the tab position. However, if there is no tab po- \def \apehspaceCO .5em) sition to skip to, then a new tab position is cre- \apebegin ated at the current distance from the left margin. A \If n < r &\Then n := n + I; carriage-return moves back to before the first tab. &\Else &\Begin print-totals; n := 0; The command \kill at the end of a line inhibits &&\End ; output of the current line, but any new tab posi- \End \If; tions created in this line remain set. The command \apeend) \actabs clears all the current tab settings. An im- plicit \actabs is performed by \apebegin. Tab- produces: bing commands cannot be used within comments TUGboat, Volume 10 (1989), No. 1

[HL85] David P. Helmbold and David C. Luck- if n < rthen n:= n + 1; ham. TSL: task sequencing language. else begin print-totals; n := 0; In Ada in Use: Proceedings of the Ada end; International Conference, pages 255- end if: 274, Cambridge University Press, May 1985. [LvHK084] David C. Luckham, Friedrich W. Example 3: von Henke, Bernd Krieg-Briickner, and The following input: Olaf Owe. Anna-A Language for Annotating Ada Programs. Techni- \apebegin cal Report 84-261, Computer Systems \Type DAY \Is (&WEDNESDAY&, &\kill Laboratory, Stanford University, July \Type DAY \Is (&\hfill(SUNDAY)\hfill&, 1984. (Program Analysis and Verifica- &\hfill(MONDAY)\hfill&, tion Group Report 24.) &\hfill(TUESDAY)\hfill&, &\hfill(WEDNESDAY)\hfill&, Appendix A The APE Macros &\hfill(THURSDAY)\hfill&, Editor's note: These macros have been reformat- &\hfill(FRIDAY)\hfill&, ted for presentation in two columns. Problems aris- %\hfill(SATURDAY)\hfill&&); ing in macros re-keyed from the text below should \apeend first be referred to the TUG office. The macros produces: (in their original form) are available for anony- mous FTP at Score.Stanford. edu in the directory type DAY is ( SUNDAY , . MONDAY , % Copyright 1988 by Sriram Sankar. TUESDAY , % WEDNESDAY, % GLOBAL DEFINITIONS: THURSDAY , % FRIDAY , % The fonts for the keywords. SATURDAY ); \def\apekeywordfontC\large\bf) \def\apkeywordfont{\normalsize\bf)

3 Conclusions % The fonts for comments. The APE macros have been used extensively by the \def\apecommentfontC\normalsize\sl) author and other members of the Program Analy- \def\apcommentfont{\normalsize\sl) sis and Verification Group at Stanford. It has been used to format examples in two books and in many % The default fonts for everything else. papers. No problems with its use have been encoun- \def\apebodyfont{\small\rm) \def\apbodyfont{\small\rm) tered so far. The author invites comments and sug- gestions for the improvement of this set of macros. % The space generated by the character. The complete listing of the macros (for Ada without \def\apehspace{0.65em) any extensions) is provided in the Appendix with \def\aphspaceiO.5em) detailed comments explaining the various aspects of the macro. % The space inserted between each line \def\apevspace{Opt) References [Ada831 The Ada Programming Language Ref- % The space left at the beginning of each line. erence Manual. US Department of \def\apelmargin{Opt) Defense, US Government Printing Of- The above ten macro definitions can be fice, February 1983. ANSI/MIL-STD- redefined within the document as many 1815A-1983. times as desired. The default settings [Des84] Jacques DCsarmCnien. How to run T@ above are in terms of LaTeX macros in a French environment: hyphenation, (e.g. \large, \small, etc.). Note: These fonts, typography. TUGboat, 5(2):91- are the only LaTeX dependencies in this 102, 1984. file. TUGboat, Volume 10 (1989), No. 1

\def \Package{{\ !keyword{packageW \def \Pragma{{\ ! keyword{pragma))) \catcode'\!=ll \def \Private{{\ ! keyword{privatem \catcode'\--I=Q \def\Procedure{{\!keyword{procedure))) % Tabs will now be ignored, so they can be \def\Raise{{\!keyword{raise))) % used to format the macros below. \def \Range{{\ !keyword{range))) % \def\Record{{\!keyword{record))) % The following macros are for formatting \def\Rem{{\!keyword{rem))> % the Ada keywords. Note that they accept \def\Renames{{\!keyword{renames))) % the keyword as an argument in LOWER-CASE. \def\Return{{\!keyword{return))) % TO format keywords in other ways \def \Reverse{{\ !keyword{reverse>>> % (e.g. upper-case) , one could either change \def\Select{{\!keyword{select))) % the case of these keyword arguments below, \def \Separate{{\! keyword{separatem % or define \apekeywordfont in such a way \def\Subtype{{\!keyword{subtype))) % that it changes the case of its argument \def \Task{{\ ! keyword{task))) % appropriately. \def\Terminate{{\!keyword{terminate))) \def\Then{<\!keyword{then))) \def \Type<{\ !keyword{type))> \def\Use{{\!keyword{use~)) \def\WhenC{\!keyward{when))> \def\While{{\!keyword{while))) \def With{{\ ! keywordCwith))) \def\Xox{{\!keywordhor))) % % Some more global definitions follow: % \def \! lbrC\/$ ($1 \def \ ! rbrC\/$) $1 \def\!str{\/$*$) \def \ !pis<\/$+$) \def\!min{\/$-$1 \def\!col{\/$:$) \def \ ! aclC\/$ ; $) \def \ ! les<\/$<$) \def \ ! greC\/$>$) \def \ !bar{\/$ I$) \def \ ! equi\/$=$) % \def\!sla{\/{\slC/>H \def\!dqt{{\/\raise.2ex\hbox{\tt{")>)) \def \ !dots{\/. {\hskiplmm). ) \def \ ! commentTL {\apecommentfont\rm--\thinspace--)) \def\!hinge{\vfil\penalty5000\vfilneg) \def \ ! space{\hskip\apehspace) \def\!underscore{\underbar{\!space)) % % Now follow the global definitions for the % tabbing commands. First a set of dimen, % count and box registers are allocated. % The number of dimen registers limit the % total number of tabs permitted. % \newdimen\!apetabi \newdimen\!apetabii \newdimen\!apetabiii \newdimen\!apetabiv \newdimen\!apetabv \newdimen\!apetabvi TUGboat, Volume 10 (1989), No. 1

\hbox\bgroup \hskip\apelmargin\!apebbox 3 % \def\!apeelineC% \hss\egroup \box\ ! apetabbox \egroup \box\!apelinebox 3 % % The macro \!apekill is similar to % \!apeeline, except that it does not output % the contents of \!apelinebox. In addition. % this macro also performs a \!apebline, thus % getting ready for the next line of input. % \newbox\!apelinebox \def \ ! apekillfl % \hss\egroup % Dimen register i stores the distance from \box\!apetabbox % the tab stop (i-1) to the tab stop i. \egroup % \!apetotaltabs maintains the total number \!apebline % of tabs currently set. \!apetab maintains 3 % the tab stop that will be reached if % % another '&' is encountered. The box % The macro \!apetabskip is expanded when an % registers are explained below. % '&' is encountered in the input file. It % % ends the current \!apetabbox, and if a new % Between the beginning of lines, tab stops % tab stop needs to be set, it increments the % and the end of lines, text is formatted % counters appropriately and sets the % into the box \!apetabbox and padded on % appropriate dimen register to the width of % the right with the glue \has. The macro % \!apetabbox. Finally, \!apebbox is invoked % \!apebbox is what needs to be done at the % to start off a new \!apetabbox. % beginning of each of these boxes. % % \def\!apetabskip{% \def\!apebbox{% \hss\egroup \ifnu\! apetab>\!apetotaltabs \ifnum\ ! apetab>\ ! apetotaltabs \setbox\!apetabbox=\hbox \global\advance\!apetotaltabs by 1 \global\csnme !apetab\romannumeral\!apetotaltabs \endcsnme=\wd\!apetabbox \endcanme \fi \fi \box\!apetabbox \bgroup \global\advance\!apetab by 1 1 \ ! apebbox % > % The boxes mentioned above (that are stored % % into \!apetabbox) are put together into \def \ ! apecr{% % another \hbox called \ !apelinebox. This \strut\par % box is output once a full line has been \ ! break % read from input. The macro \!apebline \vskip\apevspace % does what is needed at the beginning of 3 % each input line, while the macro \!apeelhe % % does what is needed at the end of each \def\!par{\!apeeline\!apecr\!apebline) % input line. % % % The following global definitions are for \def\!apeblineC% % formatting Ada comments. The macros \!cma \noindent % and \!cmb are used in the definition of the \global\ ! apetab=1 % \cm macro later. The comment text is split \setbox\ ! apelinebox= % at all \bhinge's and \ehingels. Each TUGboat, Volume 10 (1989), No. 1

portion of the comment is then put into a \vbox separately and output one after the other. Actually all but the last line of % each \vbox is output. The last line is % included at the beginning of the next \vbox. % At the end of it all, there will be one more % line to output. \!cmb explicitly outputs % this line, and moves back to the beginning % of this line. The box registers below are % used to store the boxes created during this % process. Dimen register \!cmtpos contains % the distance of the comment from the left % margin while \!cmtwd contains the width of % the comment. % \newif\ifnonvoid

\repeat \fi > \newdimen\!cmtwd % % % The following two macros \!cmtbhinge and % \!cmtout is the output routine. It assumes % \!cmtehinge end the current comment box % that the \hboxes to be output are enclosed % being created. They then pull out the % within a \vbox in \!cmti. It consists % last line from this box and ship the % mainly of two loops. The first loop % rest of the box to \!cmtout. The value % reverses the order of the \hboxea in \!cmti % of \!break is then modified to ensure that and puts this into a \vbox in \!cmtv. The % the correct penalty value is inserted at second loop pulls out the \hboxes from % the end of the next line. They then start \!cmtv and outputs them. % off a new comment box after inserting the % % last line of the previous box and a space \def\!cmtout{% % character at the beginning. \setbox\ ! cmtii= % \vboxC \def\!cmtbhingei% \unvbox\ ! cmti \egroup \global\setbox\ ! cmtiii=\lastbox \setbox\!cmtii= \vbox{ \unvbox\!cmti

\!cmtout \global\def \ !break<\!hinge)% \setbox\! cmti= \vbox\bgroup \hsize=\ ! cmtwd \noindent\apecommentfont <)\unhbox\!cmtviC) % TUGboat, Volume 10 (1989), No. 1

3 \apecommentfont % C3#2\egroup \def\!cmtehingeC% \setbox\!cmtii= \egroup \vbox< \setbox\ ! cmtii= \unvbox\!cmti \vboxC \global\setbox\!cmtvi=\lastbox \unvbox\ ! cmti \unskip \global\setbox\!cmtiii=\lastbox \unpenalty \unskip\unpenalty )% 3% \setbox\!cmti=\box\!cmtii \setbox\!cmtvi= \ ! cmtout \hboxC% \noindent \unhbox\!cmtiii \hbox to Opt{% \unskip\unskip \hskip\!cmtpos \unpenalty \!comment.O\!space 3% \box\ ! cmtvi \setbox\!cmti=\box\!cmtii \has \ ! cmtout 3% \global\def\!breakC\nobreak~% \endgroup \setbox\!cmti= \ ! apebline \vbox\bgroup 3 \hsize=\!cmtwd % \noindent\apecommentfont % The following global definition of \!ap is {3\unhbox\!crntviC3 % % used in the definition of the \ap macro 3 % later. As in the case of \!cmb and \cm, % % there is an \endgroup in \!ap whose % \!cma begins the comment by finishing off % corresponding \begingroup is in \ap. In % the boxes being created and then outputting % this case, there is also a corresponding % them. It also measures the width of the % \apebegin in \ap. % box output to determine the value of % % \!cmtpos. \def \ ! ap#l{#l\apeend\endgroup{>> % % \def\!cmaC% % We cannot have the sequence "\let=\!equl' \egroup % within the body of the ape macro since \setbox\!cmti=\hboxC\unhbox\!apetabbox)% % the will not be scanned with the \box\ ! cmti % correct category code. Hence, the macro \egroup % \!defequ is defined in an environment \ ! cmtpos=\wd\ ! apelinebox % where ll=tl has the correct category code, \hbox to Opt{\box\!apelinebox\hss~% % and then this macro is used within the body 3 % of the ape macro. \!defequ is now defined % % as a global macro. % \!cmb takes over from \cm. It starts qfP % % the first comment box and finishes C % off the last comment box. If there is \cat code' \==\active % only one comment box (no \bhinge or \gdef\!defequC\let=\!equN % \ehinge in between), then it starts and 3 % finishes this one box. It then pulls % % out the last line of the last box and \catcode1\!=12 % ships the rest of the box to \! cmtout. \catcode'\^-1x10 % It then outputs the last comment line % % and moves to the beginning of the line % END OF GLOBAL DEFINITIONS. % in which the last comment line was output. % % % NOW THE MACRO DEFINITIONS: \def\!cmb#l#2C% % \ ! cmtwd=#i% % The macro has to be defined in an \setbox\! cmti= % environment with the category codes set \vbox\bgroup % correctly. This environment is first set \hsize=\!cmtwd % up below, and then within this environment, \noindent % the macros are defined. TUGboat, Volume 10 (1989), No. I

% \catcodeC\!=ll% i% The macro definition environment \catcode'\&=\active% % % % Firstly, Ilo~ter~~macros cannot occur % Now each of these characters is given % within any macro expansions. The only % its definition. % such macro that occurs in the macros % % below is \+. Hence this is redefined to \let (=\ ! lbr% % its usual value. The effect of this \let)=\!rbr% % redefinition just changes the status of \let*=\ ! str% % \+ to now be a non-"outer" mecro. \let+=\!pls% % \let-=\!min% \def\+i\tabalign>% \let:=\!col% % \let;=\!scl% % Necessary changes to category codes are \let<=\!les% % made right now since category codes \let>=\!gre% % are used while scanning and the macro \letl=\!bar% % is scanned at definition time, and not \let/=\!sla% % at macro expansion time. \lettt=\!dqt% % \let--M=\!par% \catcodel\(=\active% \let =\ ! space% \catcode' \)=\active% \let-=\!underscore% \catcodel\*=\active% \cat code ' \--A=S\def\-{--A>% \catcodet\+=\active% % \catcode'\-=\active% % The above two lines interchange the \catcodel\:=\active% % meanings of - and \-. To do this, a new \catcode' \ ;=\active% % subscript character -A is defined, and \catcode'\<=\active% % then \- is defined as a macro to \catcode'\>=\active% % expand to -A. \catcode'\l=\active% % \catcodec\/=\active% \let&=\ ! apetabskip% \catcode' \"=\active% 7, \catcode' \--M=\active% % Now follows the remaining macro \catcode'\ =\active% % declarations needed to complete the \ape \catcode'\-=\active% % environment. \catcodel\!=ll% % \catcode' \&=\active% \def\.C\!dots)% % \def\,C\thinspacei))% \gdef\apebegin{% \def\-{\!comment>% \begingroup% % \global\def \ !breaki\nobreak)% \def \bhingei\global\def \ !break{\ !hinge>)% % \def \ehingei\global\def \ ! breaki\nobreak))% % First the category codes of the characters \def\\'-Mi\bhinge--M\ehinge>% % to be redefined are made active. \def\actabsC% % \global\ ! apetotaltabs=O% \catcode'\(=\active% \global\!apetab=ii)>% end \def of actabs \catcodei\)=\active% \actabs% \catcode6\*=\active% \def\kill-^Mi\!apekill)% \catcodeC\+=\active% \def\!keyword{\apekeywordfont)% \catcode1\-=\active% % \catcode1\:=\active% % Following is the \cm macro definition. \catcodel\;=\active% % This macro eventually lets the macro \catcode'\c=\active% % \!cmb take over so that the text \catcodet\>=\active% % following is read in with the correct \catcode'\ l=\active% % category codes. The redefinition of \catcode'\/=\active% % \+ below is for the same reason as \~atcode'\~=\active% % before: to convert it from an outer \catcode'\--M=\active% % to a non-outer macro. \catcode'\ =\active% % \catcode'\-=\active% \def\+{\tabalign)% TUGboat, Volume 10 (1989), No. 1

% The category codes are temporarily % changed back to their original values. Contents of Archive Server % \catcode1\(=12% as of 16 January 1989 \catcode'\)=l2% Michael DeCorte \catcode1\*=i2% Clarkson University \catcode'\+=l2% \catcode'\--12% Several changes to the IPm Archive have been \catcode'\:=l2% made since the last TUGboat. It has been split \catcode1\ ;=la% into several different subarchives: IP'style files; \catcode'\<=l2% '!&X style files; AM-TfjX style files; BIB~Xstyle \catcode1\>=12% files; BIB^ 0.98 style files; Tf$ programs. Also \catcode'\l=i2% there are several new archives: AM-msource; \catcodes\/=la% BIB'I~EXsource; CM fonts source; IK&X source; T@ \catcode ' \''=12% \catcode'\--M=5% documentation; m inputs; 'IfEX source; Tf$ tests; \catcodes\ =lo% TUGboat files; mhax digests; 'MaG digests; \catcode'\!=l2% UKWdigests. % As always, submissions are encouraged. If you \def\bhinge{\!cmtbhinge)% do submit a file please include at the top of the file: \def \ehinge{\ ! cmtehinge>% your name; your email address; your real address; % the date. Also please make certain that there are \ ! cmb>% no lines in the file longer than 80 characters as some % mailers will truncate them. Mail should be sent to % Now = is redefined. Had this been done mrdQsun.soe.clarkson.edu % earlier, then it would have affected archive-managementQsun.soe.clarkson.edu % the previous definitions, since many % of them contain =. For Internet users: How to ftp % \catcode'\==\active\!defequ% An example session is shown at the bottom of % the following page. Users should realize that ftp \apebodyfont\!apebline% syntax varies from host to host. Your syntax may % be different. The syntax presented here is that 1% end of definition of \apebegin of Unix ftp. Comments are in parentheses. The exact example is for retrieving files from the IP'IfEX Archive; the syntax is similar for the other archives, only the directories differ. The directory for each \gdef\apC\begingroup% archive is given in its description. \def \apekeywordfont{\apkeywordf ontN \def\apecommentfontC\apcommentfont3% Non-Internet users: How to retrieve by mail \def \apebodyf ont{\apbodyf ant>% \def\apehapace{\aphspace)% To retrieve files or help documentation, send mail to \def\apelmargin{Opt)% archive-server0sun.soe.clarkson.edu with the \apebegin\ ! ap% body of the mail message containing the command 3% help or index or send. The send command must % be followed by the name of the archive and then % The reason for letting \!ap take over the files you want. Users who are not in the uucp % from \ap at this point is to make TeX maps database are strongly encourage to include a % scan the argument with the correct path command followed by a path from Clarkson % category codes. to you in domain style format. If you don't % path 3% This ends the environment in which the include a command, your mail may not get % macros are defined. to you and will definitely be delayed as Michael 1 will have to mail it by hand. You should realize that Clarkson does not have a uucp connection; therefore you must send it to an Internet or Bitnet TUGboat, Volume 10 (1989), No. 1 host that does have a uucp connection. For example, has UTEX style files only. host!userQuunet.uu.net should send: 1. Either one 1.2 MB diskette or three 360 KB diskettes, blank and formatted. To: archive-serverQsun.soe.clarkson.edu 2. Indication of the format required, Subject : 3. A self-addressed mailer, and path host!userQuunet.uu.net 4. A $5.00 donation per set of files, to cover send latex-style Readme Index postage and equipment wear & tear. (If you send latex-style resume.sty live outside North America, airmail delivery Traffic on the network servers and gateways will probably require more postage. You should has been very high recently, and in order to provide probably contact David for details.) improved service, there have been some volunteers 5. No phone calls or personal visits please. to maintain local "slave" repositories of the Jon Radel style collection. There is usually a geographic or P. 0. Box 2276 network restriction requested, since the idea is to Reston. VA 22090 cut down traffic, not add to it. The following areas has I4m style files and utilities. For a list of other will be covered by the volunteers listed. info send a SASE. a Bitnet users: Texas A&M maintains a list- 1. 360 KB diskettes, blank and formatted. server and file-server which is already handling 2. A stamped, self-addressed mailer, and (with TEX-L) much of the Bitnet distribution 3. $1.50 per disk. If you live outside North of mhax. An inquiry via listserv will retrieve America, skip the stamps and send additional a list of all w-related files: money or International Reply Coupons. tell listserv at tamvml get tex filelist As a convenience for people who have more money UK users: Aston University maintains a T)$Y than floppies, Jon will supply everything for $6.00 archive covering all aspects of TEX/UW/ per disk to U.S./Canada/Mexico addresses. METAFONT and ancillary software. UKW Contents of the 4IMS-W Source (like mhax) digests are distributed from Aston. For users with Colour book software. This contains the w source needed to build FTP access is available; for all users, mail Am-w.It is a duplicate directory of tex. amstex access is available. Send enquiries in the on Score. Files are located in pub/amstex for ftp first instance to inf o-texQuk. ac .ast on (via users. Mail users should request files from the Internet use pabbottQnss. cs .ucl.ac .uk). amst ex archive. Additional volunteers should contact Michael. Contents of the BIB^ Source Distribution for IBM PC and clone users This contains the BIB^ style files and the WEB files need to build BIB^. It is a duplicate directory There are two sources. of tex.bibtex on Score. Files are located in David W. Hopper pub/bibtex for ftp users. Mail users should request 446 Main Street files from the bibtex archive. Toronto, Ontario Canada M4C 4Y2

Sample FTP session for Internet users

% ftp sun.soe.clarkson.edu (a.k.a. 128.153.12.3) . . . (general blurb) user: anonymous password: ftp> cd pub/latex-style (where the files are) ftp> Is (to see what is there) . . . (lots of output) ftp> get Index . . . (more blurb) ftp> quit TUGboat, Volume 10 (1989), No. 1 99

Contents of the CM Fonts Contents of the WMaG Digests This contains the METAFONT files needed to build This contains all of the back issues of WMaG. the CM fonts. It is a duplicate directory of tex.cm Files are located in pub/texmag for ftp users. Mail on Score. Files are located in pub/cm-fonts for users should request files from the texmag archive. ftp users. Mail users should request files from the cm-f onts archive. Contents of the UKWDigests This contains all of the back issues of UKW. Files Contents of the LAW Source are iocated in pub/uktex for ftp users. Mail users This contains the w files needed to build I4m. should request files from the uktex archive. It is a duplicate directory of tex.latex on Score. Files are located in pub/lanport for ftp users. Mail Contents of the LAW Style Collection users should request files from the lanport archive. This contains files that are specific to IPW. Most of these are style files but some of them are Contents of the 'QX Documentation programs. Some of the files support BIB^ style This contains documentation on w. It is a files that are in the BIBWCollection or the BIB~ duplicate directory of tex.doc on Score. Files are 0.98 Collection. Files are located in pubhatex- located in pub/tex-doc for ftp users. Mail users style for ftp users. Mail users should request files should request files from the tex-doc archive. from the latex-style archive. a4.sty Set page size to A4 Contents of the 'QX Inputs a4wide. sty Set page size to A4 with narrow This contains the w files needed to build plain margins (needs a4. sty) . It is a duplicate directory of tex.inputs a5. sty Sets A5 page size (use only with on Score. Files are located in pub/tex-inputs for 10pt) ftp users. Mail users should request files from the a5comb. sty Sets A4 page style but for spirally- tex-input s archive. bound documents (bigger inner margins) (needs a5 . sty) Contents of the 'QX Source aaai-doc. tex Style file for AAAI conference 1988 This contains the WEB files needed to build w. aaai. sty BIB^ style in bibtex-style It is a duplicate directory of tex.web on Score. and bibtex-style-0.98) Files are located in pub/tex-source for ftp users. aip. sty For American Institute of Physics Mail users should request files from the tex-source journals archive. agugrl-sample.tex agugrl . sty AGU Geophyszcal Research Letters Contents of the 'QX Tests agujgr-sample. tex This contains the files needed to test using the agujgr . sty AGU Journal of Geophyszcal triptest. It is a duplicate directory of tex. tests Research on Score. Files are located in pub/tex-tests for album. shar For printing cassette labels ftp users. Mail users should request files from the alleqno .sty Makes all displayed equations tex-tests archive. numbered by default alltt . sty Like verbatim. but permits other Contents of the TUGboat Files commands inside This contains files related to TUGboat. It is a amssymbols.sty duplicate directory of tex.tugboat on Score. Files Load the AMS fonts are located in pub/tugboat for ftp users. Mail users apalike . sty Amerzcan Psychologzcal Assoczatzon should request files from the tugboat archive. BIB^ style in bibtex-style) biihead . sty Underlined heading Contents of the mhaxDigests boxedminipage.sty This contains all of the back issues of whax. Files Puts a box round a minipage are located in pub/texhax for ftp users. Mail users bsf . sty Provide access to bold sans serif should request files from the texhax archive. fonts in I4w captcont .sty Needed by lcustom.tex. Creates a caption without updating any counters TUGboat, Volume 10 (1989)' No. 1 changebar.sty ist2l.sty IST21 document style option for Changebars for IPW cover page chapterbib.sty jbs.sty For The Journal of Business Allow IPW and BIBWto Strategies produce separate bibliographies for layout.readme each chapter layout.tex Prints nice diagram showing page cyrillic.sty Load Cyrillic font parameters of I4W deprocldc.tex lcustom . tex Useful macros and definitions for deproc .sty DEC Users Proceedings UW draft.sty Draft option for documents for local-suppl.tex debugging Supplement to local guide draf thead.sty that describes lcustom.tex, Prints DRAFT in heading sfwmac.sty,tgrind.sty, drop.sty For making large dropped initials trademarks.sty xxxcustom.tex, for starting paragraphs xxxslides.sty doublespace.sty If ont s-ams. readme Double spacing in text lfonts-ams.tex Use AMS symbols in IPT@ eepicl0.shar A picture environment that uses manual.readme tpic specials manual.sty Like "book" but for manuals. You env.sty For printing on envelopes manlo.sty should read the documentation for epicl.shar Shar archive of an extended picture manil.sty "book" to learn how to use this epic2.shar environment manl2. sty style file equations.sty memo.sty Memo and "memo for the record'' Macros to to aid in constructing mfr.sty style option displayed equations in IPw merge.sty Form letter option to IPW letter espo . sty For Esperanto style f igplace . tex 7&X macros to handle floating mitthesis-sample.tex insertion mitthesis. sty Massachusetts Institute of f ixup.sty Fix up plain's \bigl, etc. to track Technology thesis format size changes mult ibox . sty Provides multiple boxes in pictures flouchart.sty natsci . sty Natural sciences (BIBQXfile in For writing flow charts bibtex-style-0.98) fnpara.sty Sets footnotes as parapraphs nl.sty For Dutch format . sty Print FP numbers in fixed format nofm.sty For "n of m" style pagination frontiers.sty nopagenumbers.sty For Frontiers '88 Symposium and Remove page numbers other IEEE conferences pslatex . shar Use printer resident Postscript fullpage . sty Gives one inch margins fonts. Requires dvi2ps that german. sty For German understands Postscript fonts. greek1 . shar Shar file to help Greek users of remark.sty Like newtheorem but no \it greek2. shar resume-sample.tex headerfooter.sty resume . sty A format for doing resumes Adds the capability of underlining romanneg . sty Roman-numbered pages get the heading, ala the IPW manual negative page numbers (useful icassp . sty For the ICASSP '89 Conference when selecting only part of a and possibly other IEEE document to be printed) conferences rotate.sty Rotation of W output with insertplot.readme Textures (and maybe other insertplot.sty Macros for inserting Postscript Postscript drivers) in files printed with Arbortext's sc21-wgl . sty ISO/TC97/SC21 document style DVIPS. sc2l.sty option for cover page iso-doc.tax For use by those writing IS0 schedule.sty Style for generating schedule sheets iso.sty standards screen.sty Helps create a document suitable iso9.st y for screen previewing TUGboat, Volume 10 (1989)' No. 1

semitic. sty Used to set Semitic languages xxxcustom.tex sf wmac . sty Useful macros for Unix Supplementary macros for documentation xxx-t ex, for some xxx showlabels. sty xxxslides.sty Shows labels and references to Supplementary macros for SL~: them includes slides.sty slem.sty Change \sl to \em siaml0.sty Document style for SIAM Contents of the T'X Collection siamll .sty (Society for Industrial and Applied This contains style files for plain W.Files are siaml2.sty Mathematics). BIB^ style in located in pub/tex-style for ftp users. Mail users siam. sty bibtex-style) should request files from the tex-style archive. siam. tex celluar . tex Macros to allow for both vertical siam.bib celluar . doc and horizontal spans within a ruled spacecites.sty cell1 . tex table and take steps to prevent Put spacing between citations cell2. tex "nubs'' and "gaps" when rules are subeqn . sty Allows related equations to be cell3.tex used numbered with the same number cell4. tex but further qualified by a,b,c etc. dayofweek.tex subeqnarray.sty Macros to compute day of week Allows related eqnarrays to be and phases of the moon. Examples numbered with the same number of how to use 7Q$ arithmetic but further qualified by a,b,c etc. capabilities subfigure.sty deprocdoc.tex Allows related figures to be deproc .tex DEC Users Proceedings numbered with the same number epigram. tex Print text either centered or in a but further qualified by a,b,c etc. displayed paragraph supertab.sty Allows multipage tabulars fnpara.tex Sets footnotes as parapraphs suthesis . sty Stanford University thesis style hyphen-nederlands.tex svma-doc . tex Style for Springer-Verlag reports. A dutch hyphen. t ex svma. sty svma is for multiple authors: svsa texinf o . tex 7&X macros to handle Gnu texinfo svsa . sty is for single author files tables-doc. tex select.tex Selectively print pages in a Tf$ tables. sty Ruled and unruled tables made document easy texnames.sty Define a couple more I4W names Contents of the M-TEX Collection tgrind. sty Tgrind macros for I4W instead of This contains style files specific to AM-W users. w Files are located in pub/amstex-style for ftp users. threepart.sty Mail users should request files from the amstex- Three part page headers style archive. trademarks. sty amstexsiam-sample.tex Definitions of common trademarks amstexsiam-doc .tex twoup. sty Change the page sizes so that two amstexsiam.sty For SIAM (Society for Industrial pages can fit onto one page with and Applied Mathematics) the help of dvidvi imappt-sample.tex ucthesis.readme imappt .sty For reports and preprints on 8.5 ucthesis.sty A document style for the imappt-doc .tex by 11 inch paper ucti0.sty University of California thesis with uctll .sty documentation and support files. Contents of the BIBW Collection ucti2. sty This contains files that are specific to version 0.99 ukdate . sty Changes the \today command to of BIB^. Many of these files are to be used with UK format files in the I4m Collection. Files are located in vdm-doc .tex Vienna Development Method pub/bibtex-style for ftp users. Mail users should vdm. sty request files from the bibtex-style archive. TUGboat, Volume 10 (1989), No. 1 acm. bst Association for Computing rscsencode.shar Machinery Programs to encode and decode aaai-named. bst files with rscs AAAI conference uuencode.shar apalike .bst American Psychological Association Programs to encode and decode (Dmstyle file in latex-style) files cpp. el A C preprocessor written for texindex.shar GnuEmacs for use in generating Style file and processor for index BIB^ style files from a master file entries for VMS ieeetr . bst IEEE Transactions wsltex.shar Wordstar to I4m filter, C and makebst . sh A shell script to make bibtex style Pascal versions files from a master bst file physics .btx Various physics journals; must be run through cpp. el or makebst .sh siam.bst SIAM (IPW style in latex- style) Contents of the BIB^ 0.98 Collection This contains files that are specific to version 0.98 of BIB^. Many of these files are to be used with files in the IPW Collection. Files are located in pub/bibtex-style-0 .98 for ftp users. Mail users should request files from the bibtex-style-0.98 archive. aaai-named .bst AAAI conference 1988 (IPW style file in latex-style) btxbst.readme btxbst .doc A master file for BIB^ styles with standard styles and some new ones natsci .bst Generic natural sciences (L4w style file in latex-style) newalpha. bst Modified alphabetic

Contents of the 7QX Programs This contains programs that are of general interest to users in general. Files are located in publtex-programs for ftp users. Mail us&s should request files from the tex-programs archive. docsty. shar Program to convert .doc to .sty by stripping comments dvidocl . shar DVI to character device filter for dvidoc2. shar Unix BSD systems dvidvi . shar Program to select pages from dvi files or print multiple pages on a single page f ig2epiclc. shar Converts fig code to epic or eepic files lgraph.shar Data to graph command filter in Pascal pcwritex.uue PC-Write to interface that has been uuencoded TUGboat, Volume 10 (1989), No. 1 103

"A new implementation of the array- and resolves to "undefined". Actually this doesn't tabular-nvironments of I4w make any difference. Only the case with the (TUGboat 9#3) - addenda empty argument is nc longer optimized. The proper first line in the definition of \@tf or is Frank Mittelbach below. Universitat Mainz c. These corrections should also be reflected in 1 Corrections to the macros the version number. After submitting the article describing the new im- d. Before the two lines of c, we also add a new plementation of the array- and tabular-environments line of code to avoid reading this file twice. of UTF$ two errors were found and corrected. The 2 Future versions changes below correspond to the items in the figure at the bottom of this page. After many discussions with IPW users I think that it might be better to rename the preamble options a. If a flushright column entry is left empty, a t to p (old I4w meaning) and p to m (for mid- hidden \unskip in the macro \insertQcolumn dle). This will probably change in version 2 coming cancels the stretch (\hf il). The fix is easy. "sooner or later" l. If you are interested in chang- The lines to be altered in the definition of the ing the current source at your site you should do so macro \Qclassz are below. provided you also add a \typeout line which reflects b. The second bug was a typo. In the macro \@tf or we should test for \@empty which rep 'Quoted from the song "History will teach us resents "empty". The typo \@mpty, however, nothing" (STING).

a. % The templates for {\tt 1) and {\tt r) (i.e.\ \verb+\Qchnum+ $I$ or $2$) % are generated the same way. Since one \verb+\hfil+ is missing % the text is moved to the relevant side. % \beginCmacrocode> \dQllar \insertQcolumn \dQllar \hf il \or \hf il \dQllar \insertQcolumn \dQllar \or

should be changed to

The templates for C\tt 1) and {\tt r) (i .e.\ \verb+\Qchnum+ $I$ or $2$) are generated the same way. Since one \verb+\hfil+ is missing the text is moved to the relevant side. The \verb+\kern\zQ+ is needed in case of an empty column entry. Otherwise the \verb+\unskip+ in \verb+\insert@column+ removes the \verb+\hfil+. \begin{macrocode) \dOllar \insertQcolumn \dQllar \hf il \or \hfil\kern\zQ \dQllar \insert@column \dQllar \or

c. \typeoutCStyle-Option: 'array' v1.9k \space\space <30.11.88> (F .M.1) \typeoutCEnglish documentation dated \space\space <30.11.88> (F.M.)) TUGboat, Volume 10 (1989), No. 1 the ~hange.~You only have to change the two corre- (doc. sty) redefines this character to 'ignore'. In sponding characters in the \ifx tests in the macro this way documentation comments are made visible \Ot estpach. to TEX. In this mode we want to format the code The old source (v1.9g) should be available by 'verbatim' rather than evaluating it. So lines of code now at the Heidelberg listserver and in the I4w are surrounded by style collection in US listservers. YolLLU\beginCmacrocode) 3 Further developments in Mainz The following is a short overview concerning the re- Note that there must be exactly four spaces between cent activities in Mainz. If there is similar work on- the % and the \end{macrocode)-'I)$ is actually going at other sites I would be glad to learn about looking for this string and not for a macro. it. This environment also has a star form which 0 One year ago I wrote a set of macros ex- formats the spaces as just in case somebody needs tending the theorem-environments of LVEX this. which allows the user to use and define \theoremstyle's similar to the \pagestyle 4.2 Describing a new macro macro. This code is documented and tested A macro definition is surrounded by the environ- and will be submitted to TUGboat (The bot- ment macro which has one argument-the macro tleneck is the translation to English, sigh!). name without the backslash. This argument is used 0 Our main project is to remove the \protect to generate a main index entry. It is also printed in macro in IPW, because we think this is the left margin prefixed by a backslash. Nesting of the most critical feature, especially for novice this environment is provided (up to three levels) to users. This work is almost finished (only the allow macro definitions within others. letter-environment remains to be changed), but the documentation is still rather poor. I 4.3 Index facilities hope the code can be released this year . . . As mentioned above the argument from every macro 0 As a reaction to my last article I was asked if environment is used to generate a main index en- I am willing to put the style file used to pro- try. Furthermore all code sections surrounded by duce the documentation into the public do- the macrocode environment are scanned and ev- main. This is my intention but I feel that con- ery control sequence starting with a backslash will trary to the user interface the inner macros produce a normal index entry for cross referenc- need polishing. Therefore I shall describe the ing purposes4. The actual index entries are pro- user interface in the next section, to enable duced with the macros \SpecialMainIndex and others to use this documentation tool in the \SpecialIndex. Both insert a backslash in front near f~ture.~ of their argument which is also used as the sort key. There also exists a general \SortIndex command 4 The user interface of the 'doc' style option with two arguments-the sort key and the index en- 4.1 General conventions try. The main characteristic of a 'I)$ file prepared for The resulting idx file might be sorted by the the 'doc' style option is the use of the % charac- makeindex program, but other programs can be used ter. Every line of documentation starts with this if the commands mentioned above are redefined. character in column one. Therefore such a (style) 4.4 Additional bells and whistles file might be used directly by QX since all com- ments are bypassed. The documentation style file The verbatim environment is changed to ignore % characters. This makes it possible to place examples 20ther changes are only allowed if the style file in the documentation. is renamed but this is seldom sensible because it in- There also exist several style parameters which creases the number of (normally) unsupported files. determine the documentation layout. See for example the I4QX style collection. I there- fore hope that all improvements, suggestions and/or bug reports are sent back to me. 31f someone is interested in using this style file right now, he or she should send me a short message. 4This was not implemented in the version used for the last article. TUGboat, Volume 10 (1989), No. 1 105

Drawing histogram bars inside the I&jijK picture-nvironment Rainer Schopf Institut fiir Physik Johannes Gutenberg Universitat Abstract This article describes an enhancement of the U'QX pictureeenvironment to draw histogram bars. It is written in the self documenting "I)$ format developed by Frank Mittelbach. 1 User interface \typeout{--JDocument style option 'histogr', version 1.0 by RmS, released Nov 15. 19873 This is a macro collection to draw histogram bars inside a picture-environment. Use is as follows: \histogram(xo,~o)(x1,~l)...(~n,~n) The coordinate pairs specify the upper left corner of the histogram bars, i.e. this will draw a horizontal line from (xi, yi) to (xi+l,yi), then a vertical line from (xi+l,yi) to yi+l) if \noverticallines was specified, else from (x~+I,yo) to (~~+~,ma~(y~,Y~+~)).Default is \verticallines, yo should be less or equal the minimum of all the yi (i.e. other cases have not been tested). Let's start with an example: to get the following picture:

Behandler 1

I used these I4w commands: \setlength~\unitlength~~lmm) \begin (picture) (100,65)(-10, -15) TUGboat, Volume 10 (1989), No. 1

\put (15, -10) {Behandler 11

2 Implementation Here's how it is implemented: first we allocate three counters that are needed later on. \histax and \histay are the x and y coordinate of the current point, i.e. the point that serves as a start for the next box of the histogram. \histaystart holds the y coordinate of the first point, i.e. yo. \newcount\histQx \newcount\hist@y \newcount\histQystart We need a switch to decide if the vertical lines of the histogram boxes are to be drawn from y, to y,+l or from yo to max(y,, y,+]). Default is the latter. \newif\ifhistavert

\hiat@verttrue The \histogram command takes the starting point as argument and initializes the counters. \histax, \histay and \histaystart are set to xo, yo and yo, respectively. \def \histogram(#l. #2) {\histax #l \histay #2 \hist@ystart\histOy Then the macro \histQnext is used. \histQnext> \histQnext looks at the next token to see if there is another open parenthesis. If this is the case it calls \histabox, otherwise \hist@end. \def\histOnext{\Qifnextchar ({\histObox>{\histOend)) The macro \histabox does nearly all the work. The first thing to do is to set the temporary counter \Otempcnta to x,+l - x,. Remember that \histax is the x coordinate of the last point (i.e. x,) whereas the macro's first argument is x,+I. So we write \def\hist@box(#l,#2){\@tempcnta -\histax TUGboat, Volume 10 (1989), No. 1 107

The next step is easy: draw the horizontal part of the histogram box. The line starts at (x,, yz) and has length \Qtempcnta\unitlength. \ifnun \Otempcnta >\A \put(\hist@x,\histQy){\line(l,O){\Qtempcnta))\else \put (\histax, \histay){\line(-1 ,O){-\Qtempcnta>>\f i Now set \histQx to x,+~: \histax #1 If \verticallines was set we first set \@tempcnta to max(y,, y,+l): \ifhistavert \ifnum \histQy >#2 \Qtempcnta\histQy \else \@tempcnta #2 \fi then we set \@tempcntb to the same value and \Qtempcnta to the length of the line to draw. \@tempcntb\Btempcnta \advance\Btempcnta -\histaystart We draw the line \put(\histQx,\Qtempcntb)~\line(0,-1)C\~tempcnta))% which finishes this case. \else In the other case (i.e. if \noverticallines was set) we have to draw a line from y, to y,+l. We set \Otempcnta to yz+l - y, \cDtempcnta -\histay \advance\Qtempcnta #2 and draw the line. \ifnun \Btempcnta >\zQ \put(\hiat~x,\hist@y)C\line(O,1)~\Btempcnta~3\else \put (\histax.\histay) {\line (0,-1) C-\Qtempcnta}>\f i Thus endeth the drawing. \fi Finally we set \histay to y,+~and call \histQnext to look for the next coor- dinate pair. \histQy #2\histOnext) \histmend There is only one thing we left out: what if there is not another open parenthesis? That's the easy part: do nothing. \def\histQend{) Frank Mittelbach has suggested that the x-coordinate should specify the mid- point of the histogram bar, not the upper left corner. However, I don't see how this will work if the bars have different widths. What do you think about it? Well, that's all. Use it and enjoy. TUGboat, Volume 10 (1989), No. 3

Vertical Centering for Transparencies Dezso Nagy Geological Survey of Canada The problem of vertical adjustment, when prepar- \voffset=-1.Otruein ing transparencies is well known. It is very frus- \hoff set=-I . Otruein trating, that after some small changes, the number of lines changes and the vertical centering must be done again. In addition to this, first time users face the problem of selection of the size of letters to be used, the maximum page dimensions, which fit into \def\vc#1#2{% centering macro a standard transparency holder, etc. Also, the ques- \vrule tion of the location of an identification on the page \vf ill must be addressed. \f ootnotetextC% In the following, a very simple procedure for IPQ$ users is presented, which solves most of the problems related to producing transparencies. There are enough comments included to use it; here only a few pointers are given, which may be of some help. If one wants to use the macro as is, then every- \def\thefootnote{) % to avoid footnote numbers thing needed is done for the user. A good size bold- \pagestyle{empty) % to avoid page numbers face character set is selected, identification with the date is produced in the footnote, and an automatic \newpage is provided. There is no check to see if there is enough room for the text on the page. Pos- % call the macro with two parameters as : sibly the only parameters which require new values % are the % \vc{#13{#23 % \vof f set \hof f set % #I : id, i.e. the name, title, etc., which which are device-specific. % goes to the bottom of the page. As indicated on the comment lines, material for % The date is supplied automatically. the transparency can be read in from a file with the % standard . tex extension : in this case at least one % #2 : text for the transperency, space must be left between the name and the closing % including \indent, \noindent, bracket (see transpl ). % \itemize, or whatever. This text As can be seen from the examples, there is some % can be put in directly, or read in flexibility in the usage of the macro. However if the % by using : \input text where default setting is not suitable, then the user should % text .tex contains the material for modify the macro to suit the requirements. % the transperency.

Editor's note: Following is the code used to obtain % first example with defaults the adjoining transparencies. The driver file defines a few macros and uses \vc to create the centered \vc{Nagy : Geoid i)t\input transpl 3 text. % second example: the fonts are changed, 1 Driver File % both for the id and the text, but not % for the title. The text is supplied 00000000~00 LLMLLLM % directly. % Driver file defining macros and creating % 3 transparencies. \vc{\sc Nagy : Geoid 2)% % (\bc T R I A L \quad T E X T\ec \Large \documentstyle{article) This is a trial text to find out how % the linebreaking algorithm and other TUGboat, Volume 10 (1989), No. 1

special instructions may work in this arrangement. It is hoped that this Following is the code contained in the file text may clarify the points hidden by transp3.tex. the fog earlier.) 00000000000LLLLLLLLLLL % third example: \sl is used for id, and % input file to test the \vc#1#2 macro % default font for text. The text is % transp3.tex % read from the file : transp3.tex, then % % augmented by directly putting in the \bc PRESENTATION OF RESULTS \ec % rightflush text : FINI to the end % of the last line.

\vc{\sl Nagy : Geoid 31% \noindent The Oblique Lambert Zenithal Equal (\input transp3 \unskip'\hf ill FINI) Area projection has been selected as a base map. The followings will be shown : \end{document) \vspace{5mm) % End of driver file \begin(itemize) \item Data distribution for \begin{itemize) 2 TRANSP1.TEX \item North America, Worldwide Following is the code contained in the file \endCitemize) transpi.tex. \item Satellite model \begin{it emize) 00000000000LLLLXLLLLLL \item Gravity and geoid % input file to test the \vc#1#2 macro \end{itemize) % transpl . tex \item Gravity and residual anomaly for % \begin(itemize) \bc GEOID COMPUTATION \ec \item North America and Worldwide \endCitemize) \item Gravimetric geoid map \end{itemize) \noindent The problems related to the \vspace{5mm) computation of a gravimetric geoid for Canada can be summarized as follows : The results will be presented in various \vspace(5mm) forms, such as APPLICON-map, contour-map, \begin(itemize) etc. \item Selection of reference system \item Preparation of input data \item Computation of geoid \item Presentation of results \endCit emize) \vspac e(5mm) In the following, these topics will be discussed in some detail. GEOID COMPUTATION

The problems related to the computa- tion of a gravimetric geoid for Canada can be summarized as follows : Selection of reference system Preparation of input data Computation of geoid Presentation of results In the following, these topics will be discussed in some detail.

Nagy : Geoid I February 26, 1989 TRIAL TEXT This is a trial text to find out how the linebreaking algorithm and other special instructions may work in this arrangement. It is hoped that this text may clarify the points hidden by the fog earlier. PRESENTATION OF RESULTS

The Oblique Lambert Zenithal Equal Area projection has been selected as a base map. The following will be shown :

Data distribution for

- North America, Worldwide Satellite model

- Gravity and geoid Gravity and residual anomaly for -North America and Worldwide Gravimetric geoid map The results will be presented in var- ious forms, such as APPLICON-map, contour-map, etc. FIN1

Nagy : Geoid 3 February 26, 1989 TUGboat, Volume 10 (1989), No. 1

Typesetting Bridge via I+= N/None 4 J74 Deal: C.G. van der Laan V AJ demo Rekencentrum RUG 0 QJT2 The Netherlands 4 Q874 Abstract 4 A3 4 K86 V T9542 macros and a bidding environment for type- 0 963 0 874 setting bridge card distributions and bidding se- 4 KJ952 4 T3 quences are given. Examples borrowed from bridge 4 QT952 literature are supplied. V Q83 1 Card deals 0 AK5 4 A6 In bridge literature diagrams of distribution of cards over the hands are often given in order to demon- Remarks. By this levelling I circumvented the limit strate bidding sequences or to explain play tech- of the number of parameters. Because parameter nique. In order to do this systematically and to substitution is done by 'text' replacement there is abstract from layout details I wrote a macro- no '(strong) type checking' as in modern high-level \crdima -with six parameters: programming languages. first parameter: text, especially who is the dealer There is no check on the correctness of the cards and what is the vulnerability. For example: (correct number, distribution, multiple occurrence N/None, for North dealer and vulnerability or omission), nor on the correct sequence of the pa- none. rameters. In SGML, compliance with the input syn- tax can be imposed with enhanced user convenience second parameter: text. For example, indication and alleviated proofreading, but at the expense of of deal as in Deal I or in elaborate coding, [4]. No test on the correctness of \begin{minipage) [tl (\br) the sequence of the hands is possible, except for the Deal:\\demo mechanism of 'named' parameters. The chosen or- \end(minipage) der of the parameters is in agreement with how the next four parameters: the four hands N, E, S, play goes. W, clockwise. Each hand is a call of the \hand The \crdima macro can be used to display all macro with four parameters: the 4, 0, 0, 4 phases of the play. Hands can be suppressed at dis- cards. cretion of the user by empty actual parameters. A As example, void can be supplied via --. In the listings of the commands used for the examples the quote environ- \crdima(N/None)(% ment command is omitted. \begin(minipage) [t] (\br) For (bridge) tournaments, plays are often dealt Deal:\\demo by computer. At the end of tournaments players \endIminipage))% appreciate prints of the deals. For that purpose my (\hand( J74)(AJ)03374H%N (Pascal) deal program generates ASCII output -for (\hand(~86)(~9542)(874}(T3}>%E simple display on the PC -as well as I4W input, C\hand(qT952)Cq83)(AK5}(KJ952))%W \crdima. Parameter testing is superfluous for Uw yields input generated this way. 2 Bidding In the context of bidding theory I use a bidding en- vironment. The given card deal takes the following ACOL bidding West North East South - l no 14 no 24 no 44 a.p. obtained via TUGboat, Volume 10 (1989), No. 1

4 Some more examples a. In order to illustrate general bidding theory from the viewpoint of one hand only, the \hand macro can be used. The following layout, heavily used in 131, 4 AKJ42 West North East South Remark. The bidding environment is independent V AK9 - 14 no 1NT of the number of bid rounds. 0 T832 24 ? 4 T 3 Macro texts is obtained via \newcommand{\hand) [41{ \begin{minipage) [tl {\br)%I chose \br=8em \hand{AKJ42){AK9){T832){T)\hfill \begin{tabbing) \begin{minipage) [tl {\br) %width of parbox equals: \begin{bidding) %min{\br, maxtstring #I, . . . , string #4)) -- \> l\s\> no \> INT \\ 2\c\> ? \(\spadesuit\) \= #I \\ \(\heartsuit\) \> #2 \\ \end{bidding) \ (\diamondsuit\) \> #3 \\ \end{minipage) \(\clubsuit\) \> #4 \end{tabbing) b. For issues related to defense play one often dis- \end{minipage) )%end \hand plays only the dummy hand and your own hand. % The following example -layout and text - is from \newsavebox{\NESW) PI. \savebox{\NESW) E4eml {% \raisebox{-1.5\baselineskip)% {\f box{\small W

West North East South \newcomrnand(\crdima) [61(% 14 no 20 no \begin{tabular) [tl C111) 2NT no 40 a.p. #I & #3 Sl #2\\ Against 40 South starts 4K, taken with #6 & \usebox{\NESW) & #4\\ 4A. Leader continues VAKQ. On the third & #5 & round of V's, partner discards 09 (indicates \end{tabular) )%end \crdima interest in 4). Leader continues with 02, % how do you continue? \newenvironment{bidding)% {\begin{tabbing) The example is obtained via xxxxxx\=xxxmcx\=xxxxxx\=xxxxxx \kill West \>North \>East \> South\\ ){\end{tabbing))%end bidding To eliminate data integrity errors the listings of the above macros and the listings of the commands used in the examples are 'included' via a transparent ver- batim like environment, [7]; so the same files were used for execution and listing. Remark. In a similar way W-N, N-E, E-S hands, or W-E, N-S hands, or one hand only, with NESW diagram, can be displayed simply by a suitable call of \crdima. TUGboat, Volume 10 (1989), No. 1 115 c. Finally, an endplay -positional squeeze -from [5] is given. N/None 4 J74 Deal: demo; no 4 AJ S leads &A V AJ NES W diagram VK 0 QJT2 0 - 4 Q874 4 - 4 A3 I, K86 4 7 V K76 0 T9542 0 963 0 874 4 KJ952 4 T3 0 - 0 T 4 QT952 4 - 4 2 V Q83 V 4 0 AK5 0 - 4 A6 4A Remarks. A NESW diagram is obtained with The example is obtained via \usebox{\NESW) -or something you have designed yourself - as fifth parameter. An elegant solution to the problem of having a default NESW figure which could be overruled by another figure is the optional parameter mecha- nism, which -helas -is lacking in the macro facil- ity of I4W. The same applies to the bidding envi- ronment with the default bid sequence West North 5 Variation East South. Again via the mechanism of optional An elementary, and in a sense more general, crdima parameters one could provide another bid sequence macro is order, use abbreviations or names suited for other languages. For the hand parameters one could think \newcommand(\crdimaele> [91<% of the mechanism of 'named parameters' with ulti- \beginCtabular) [tlilll) mately complete freedom of the sequence order of #I & #2 & #3\\ the parameters. A step in this direction is to use #4 & #5 & #6\\ variables, e.g., \ns for spades of the North hand #7 & #8 & #9 and so on. The use of \hand for North is then \end{tabular))%end crdimaele \hand{\ns)(\nh){\nd}{\nc). Of course one could All the given examples can be handled with modify crdima into a version with parameter calls crdimaele. crdimaele applied to the original deal replaced by 'global' variables. My case rests. without NESW diagram reads \crdimaeleCN/None)% Left text Conclusions {\hand{ J74)(AJ3{9 JT2Hq874}>%N The author claims that bridge publications with re- (\begin(minipage) [t] (\br) spect to card distributions and bidding sequences Deal: demo; no\\ NESW diagram can be typeset easily with high quality via MTJ$ \end{minipage))% Right text and the given macros. Proofreading of deals not (\handCA3)CK76)C9633

Calendar

Sep 11 - 13 W89: 4th Annual Meeting of European TEX Users, May 1 TUGboat Volume 10, No. 2: University of Karlsruhe, FRG. Deadline for receipt of manuscripts. For information, contact

May 16 - 17 Congres GUTenberg, Paris, France. Rainer Rupprecht (Bitnet: Theme: and graphics. For RZ32QDKAUNI48. See also page 118.) information, contact Bernard Gaulle Oct 3 - 6 Protext V Conference: (Bitnet: UCIR001QFRORS31. See also 5th International Conference on page 118.) Computer-Aided Text Processing

May 29 - 31 WOODMAN '89, Workshop on and its Applications. Boston, Object Oriented Document Massachusetts. For information, Manipulation, Rennes, France. For contact Protext Conference, INCA, information, contact Jacques Andr6 P. 0. Box 2, Duri Laoghaire, Ireland; (jandreQirisa.irisa.fr or +353-1-613749. fax: (33) 99 38 38 32. See also Oct 12 - 13 RIDT189- Raster Imaging page 116.) and Digital Typography. Jun 29 - 30 NTG - Nederlandse rn Ecole Polytechnique FGdGrale, Gebruikers, ''W happening". Lausanne, Switzerland. Utrecht, The Netherlands. For information, contact For information, contact Prof. R.D. Hersch, C.G. van der Laan (Bitnet: Lausanne, Switzerland; cglbhgrrug5, or +31/50 633374. (4121) 47 43 571693 43 57 See also TUGboat 9#3, page 316.) or herschQelde.epfl.ch; or Debra Adams, (415) 494-4022 Jul 30 - ACM SIGGRAPH '89, Boston, or adams paQXerox corn. Aug 4 Massachusetts. Contact: Chris Herot . . (See announcement, TUGboat 9#3, or Branko Gerovac, (312) 644-6610. page 316.)

Users Group 1989 Conference 1990 - Tenth Anniversary - Stanford University, Stanford, California Jan 15 TUGboat Volume 11, No. 1: Aug 14 - 18 Short Courses: to be announced Deadline for receipt of manuscripts Aug 21 - 23 TUG Annual Meeting (tentative). Aug 24 - 25 Short Courses: to be announced For additional information on the events listed Sep 11 TUGboat Volume 10, No. 3: above, contact the TUG office (401-751-7760) unless Deadline for receipt of manuscripts otherwise noted. (tentative).

Status as of 15 February 1989 TUGboat, Volume 10 (1989), No. 1

GUTenberg CongrBs: w89: 4th Annual Meeting of T&jX et les graphiques European 'l$jX Users Paris, 16-17 May 1989 September 11-13, 1989 Karlsruhe, FRG The second annual Congrbs of the Groupe franco- phone des Utilisateurs de 'I)$ will be held in Paris W89, the 4th European Conference, will take on 16-17 May 1989. The theme will be T)$ and place at Karlsruhe University, FRG, from Mon- graphics. Various papers will present a survey day, September 11, to Wednesday, September 13, of rn graphics under MS/DOS, UNIX, VMS and 1989. The conference will be organized by Anne Mac. New products will be unveiled. Major topics Briiggemann-Klein, Department of Computer Sci- are presently oriented around METAFONT and Post- ence, University of Freiburg, and Rainer Rupprecht, Script. A "grand gourou" speaker will be invited. Computing Center, University of Karlsruhe. Will this person speak about new color products? Following the tradition of last years' confer- An introductory course is being orga- ences, contributions are welcome from all areas of nized by Olivier Nicole and Jacques Beigbeder; W, METAFONT, and related subjects. Likely a tutorial on METAFONT is planned by Victor themes might- include: Ostromoukhov. Document structures A general assembly of GUTenberg members (IPW, SGML, ODA, . . . ) will be held on the evening of the first day in Non-technical TJ$ order to approve the composition of GUTenberg's (humanities, music, exotic languages, . . . ) executive board and to approve its decisions. Other technical areas The two-day cost for the Congrbs will be nearly (chemistry, physics, biology, . . . ) 400FF for GUTenberg members, plus an additional Difficult jobs with TJ$, IPW, . . . 200FF for non-members. The location will be at a Graphics and T@ Paris north gate (Porte de la Chapelle) that's not w training so far from Roissy airport. w as part of a larger system The Cahiers GUTenberg will begin publication (user interfaces, tools, environments, . . . ) officially during 1989. This journal will be formatted w as a production tool for A4 paper, using French typographic conventions. Fonts to use with A LATEX style file will be provided to prospective (METAFONT and other systems) authors. It is expected that many of the papers and Postscript to be presented at the CongrBs will be published Macro packages in the Cahiers. Subscription prices have been set Public domain 'I)$ vs. commercial W at 150FF per year for GUTenberg members, 250FF Besides traditional paper sessions, discussion groups for non-members. Four issues are planned for this on special subjects and exhibitions will be organized. year. In a special session at the end of the conference, highlights of the discussion groups will be presented For information on the Congrbs or the Cahiers, to the general audience. Conference proceedings contact will be published after the conference. Bernard Gaulle Various workshops and participatory seminars CIRCEICNRS will be offered before and after the conference. Pro- BP 167 posals for topics and voluntary tutors are welcome. 91403 Orsay Cedex, France The conference fee will be approximately DM 16.(1) 69.82.41.07 280,-. The fee includes registration materials, Bitnet: UCIR0019FRORS31 lunches, social events and a copy of the conference proceedings. For information, contact Rainer Rupprecht Rechenzentrum Universitat Karlsruhe Postfach 6980 7500 Karlsruhe 1, FRG Bitnet: RZ32QDKAUNI48 TUGboat, Volume 10 (1989), No. 1 119

A UK Users' Group- Computer Modern "Sample Book", in the manner Report of a preliminary meeting of Volume E of "Computers and Typesetting". Since I have been involved in setting up David Osborne on systems in our computing centre, I tried to University of Nottingham, UK give an overview of some of the pitfalls which National user groups in the m-speaking world await the novice implementor, despite the amount are quite the fashion these days, it seems. With of helpful information in README files and other the formation of user groups in West Germany, documentation. In fact, this is part of the problem: France and the Netherlands, there is an active and the sheer volume of information which needs to be growing involvement of European mersin meeting assimilated and, ideally, before starting. I wondered to discuss T@ matters. To date, although there if there is scope for a succinct yet detailed "How to implement and METAFONT on system X.. ." has been a widespread and growing use of m m within the United Kingdom academic community document for each major system. and also, fortunately, outside it, contact between From the somewhat arcane topics of META- users of has been largely informal. It has FONT and m implementation, our attention been common for m users who encountered each turned to an topic of which concerns many users other at various non-m seminars and conferences in a stimulating look at "I4W in Conmt" from to swap experience and news during coffee-breaks. Sue Brooks of BUSS Ltd. As someone using WIQX The undoubted success of the Third European to document a significant software package, Sue's 'T)$ conference in Exeter in July ("l&Xeter8Bn) point of view was that of the author and she gave a brought together a significant number of British clear overview of the benefits which I4W offers a users and produced a momentum for the formation writer for logically structuring their document. of a user group devoted to l&X. Credit for After lunch, we were treated to two very masterminding both the Exeter conference and the interesting reports from recent conferences. Cathy first organised meeting of UK rn users goes to Booth from Exeter University had attended this Malcolm Clark of Imperial College, London. Thus year's TUG meeting in Montreal and described it was during one of those coffee-break Tp-X get- those threads running though the meeting which togethers in late September that I found myself the had most caught her attention. Chris Rowley of the subject of Malcolm's well-known persuasive skills Open University gave a companion talk on events and agreed to organise an inaugural meeting at at the Freiburg meeting in West Germany. It was which a UK group might be formed. clear from his description of the proposed further Due to the short notice at which the meeting development of m and I4w that we will be was arranged, its announcement was by electronic hearing much of interest from West German mail and details were also given in the UKW users in future. Digest. This led to an unfortunate emphasis in As has already been mentioned, time was short favour of academic users; however, a number of T$$ and it was with regret that, with his agreement, users from commercial companies were among the we postponed the talk on "Picture Languages" 36 who came to the meeting held at the University from Sebastian Rahtz of Southampton University; of Nottingham on November 4th. I tried to plan the hopefully, Sebastian will give this talk at a later programme with a balance between talks and an meeting. Malcolm Clark then took the floor to give a opportunity to discuss the aims of the group but, as wide-ranging assessment of the world m situation. might be expected, there was just not enough time He had recently been appointed European CO- for everything. ordinator (in absentia!) and was not yet sure what The first speaker was Charles Curran of Oxford this entailed. University. Charles has been actively interested in Malcolm first outlined the activities of TUG itself, then broadened the picture to include the METAFONT for some years and discussed how fonts can be matched to specific output devices by tuning various national groups which have been formed, the mode-def parameters. It was obvious that this not forgetting those groups with peripheral interests is a lengthy process of trial and error. During in rn as one aspect of electronic typesetting. Fo- questions which followed, it was suggested that cusing on the main reason for the meeting, Malcolm optimum results could be obtained if a definitive then looked at what he felt was needed to further standard were available in the form of a laser-printed the cause and how a UK group could help to this end. There is clearly a need for English hyphen- ation patterns and some tentative plans were made 120 TUGboat, Volume 10 (1989), No. 1 to develop these. He suggested there is scope for possible, a copy of the file actually used for pro- more in the way of information for those currently duction is returned to the author, along with the outside the community. This might include a current version of the macros, if the author has descriptive "flyer"; details of typesetting bureaux requested them or if there have been changes. This who accept DVI files; descriptions of style files and seems to provide authors with incentive to write more help for the implementor. Workshops on again for TUGboat.) topics such as METAFONT, style files and document Articles in which no, or limited, QX coding was design could help current users to make best present were tagged according to the tugbot .sty use of the software. conventions. Articles tagged according to the In the end, no firm plans were made at this author's own schemes were modified sufficiently to meeting to form a UK IIjEX users' group but those permit them to be merged with the rest of the present confirmed an interest in doing so. It was stream, Especial care was taken to identify macro agreed that a further meeting would be held in definitions that conflicted with ones already defined London in February or March, since London is, for TUGboat. In the case of IPQX-based articles, for many, more accessible than Nottingham and it was not necessary to consider interactions with the date would allow Malcolm to report on a other articles. (\documentstyle~article~is the TUG committee meeting which he would attend in basis for 1tugbot.sty; no method has yet been January. devised for processing multiple articles in a stream, Finally, my thanks go to all the speakers who so each is processed separately, and physical pasteup agreed, at short notice, to talk at the Notting- is used where required to merge partial pages.) For ham meeting and to my colleagues in the Cripps PLAIN-based articles, the side-effects of an author's Computing Centre who helped with the domestic own definitions can usually be kept to a minimum arrangements. Thanks, too, go to the trustees of by posting \begingroup. . . \endgroup around the 'eter88 for financial support which assisted in article. providing lunch and refreshments. I hope those who Most submissions for this issue were PLAIN; attended found the meeting useful and that it will for convenience in processing, two items submitted be the first of many. in IPQX but using no significant IPW features were converted to PLAIN. For these items, test runs of QjX separately and in groups were used to determine the arrangement and page numbers (to satisfy an:{ possible cross references). The final procissing ;f these articles was in three TEX runs, with ranges of page numbers skipped where Late-Breaking News I4m-based items would be inserted; starting page numbers of M'items were indicated to support cross-referencing. MQX items, as mentioned above, Production Notes were processed individually, and arranged in the proper order after camera copy was produced. Barbara Beeton The following articles were prepared using Input and input processing IPW; all others (except for items received as camera copy, for which see below) used the regular Electronic input for articles in this issue was received tugbot .sty. by mail and on floppy disk. Four articles were accepted in the form of camera copy (see the section - Michael Harrison, News from the VO~ on output), as were several illustrative samples that project, page 11. required special fonts or that could not be prepared - Adrian Clark, An enhanced 7&X-editor on the American Mathematical Society's typesetter interface for VMS, page 14. for other reasons. - Peter Abbott, UKmand the Aston archive, Authors who had written articles previously for page 59. TUGboat typically submitted files that were fully - Michael Modest, Using and with tagged and ready for processing with the TUG- Wordperfect 5.0, page 68. boat macros - tugbot . sty for PLAIN-based files - Sriram Sankar, APE-A set of Q$ macros and ltugbot . sty for those using IPW. (When to format Ada programs, page 89. TUGboat, Volume 10 (1989), No. 1

- Frank Mittelbach, Addendum to A new implementation of the array- and Coming Next Issue tabular-environments, page 103. - Schopf, Rainer, Drawing histogram bars inside the UT&X picture-environment, page 105. Printing Vietnamese Characters by - Dezso Nagy, Vertical centering for Adding Diacritical Marks via 7QjX transparencies, page 108. Brother Eric Vogel FSC - C. G. van der Laan, Typesetting Bridge via Saint Mary's College, Moraga, CA Urn,page 113 The technique described uses 7QX to produce the Output diacritical marks for the various vowels needed for Camera copy for this issue of TUGboat was pre- Vietnamese. The marks used are: accent grave, pared on the devices indicated, and can be taken accent acute, tilde, question mark and dot (below). as representative of the output produced by those New vowels will be introduced using the above devices. The bulk of this issue was prepared at by placing a hat (above a or e) or breve accent the American Mathematical Society on a VAX 8700 (above a) or by attaching a "beard" (using the (VMS) and output on an APS-p5 using resident breve accent) to o and u. The macros for these CM fonts and additional downloadable fonts for diacritics will be given. special purposes. The items listed below were re- ceived as camera copy; they were prepared on the devices indicated. The output devices used to pre- Chess Printing via METAFONT and pare the advertisements were not usually identified; anyone interested in determining the device used Zalman Rubenstein for a particular ad should inquire of the advertiser. Every chess fan knows the pleasant difference be- Unidentified: tween seeing an interesting chess position or a all advertisements. chess problem printed, and looking at the standard sample page of Japanese m input, page 10. description of the pieces by means of an 8 x 8 Apple Laserwriter (300 dpi): coordinate system a1 to h8. Michael Harrison, News from the To help bridge this gap we have written a VO~Project, figure page 13. METAFONT-m program which enables one to print chess positions with ease, and to incorporate Autologic APS-p5 (1440 dpi): these positions with an arbitrary 7QX output. Donald E. Knuth, Typesetting concrete, page 31; DEC 10. Canon CX (300 dpi): Georgia Tobin, A handy little font, page 28. Hell Digiset (900 dpi): sample page accompanying A encounter in Japan, page 9; FACOM (Fujitsu). OcC 6750 (20 dotslmm): Marius Broeren and Jan van Knippenberg, High quality printing of m-DVI files in the VAX/VMS environment, page 56; VAXIVMS. QMS PS 810 (300 dpi): Kim Kubik, Amigam.. . , page 65; Amiga.

Mate In three. Illaatratlon 1. My 64K chew compster molred H In twenty seconds. 122 TUGboat, Volume 10 (1989), No. 1

dit Company, Ltd., Tokyo, Japan Istituto di Cibernetica, Universith degli Studi, Milan, Italy Institutional Edinboro University of Pennsylvania, Edinboro, Kuwait Institute for Scientific 1 Members I Pennsylvania Research, Safat, Kuwait Electricit6 de France, Clamart, The Library of Congress, France Washington, DC Addison -Wesley Publishing Company, Reading, Massachusetts Environmental Research Institute Los Alamos National Laboratory, of Michigan, Ann Arbor, Michigan University of California, The Aerospace Corporation, Los Alamos, New Mexico El Segundo, California European Southern Observatory, Garching bei Miinchen, Louisiana State University, Air Force Institute of Technology, Federal Republic of Germany Baton Rouge, Louisiana Wright-Patterson AFB, Ohio Fermi National Accelerator Marquette University, Department American Mathematical Society: Laboratory, Batavia, Illinois of Mathematics, Statistics, and Providence, Rhode Island Computer Science, Milwaukee, Forsvarets Materielverk, Wisconsin ArborText, Inc., Ann Arbor, Stockholm, Sweden Michigan Massachusetts Institute General Motors Research of Technology, Artificial ASCII Corporation, Tokyo, Japan Laboratories, Warren, Michigan Intelligence Laboratory, Aston University, Birmingham, Geophysical Company of Norway Cambridge, Massachusetts England A/S, Stavanger, Norway Massachusetts Institute of Brookhaven National Laboratory, Grinnell College, Computer Technology, Information Services, Upton, New York Services, Grinnell, Iowa Cambridge, Massachusetts Brown University, Providence, GTE Laboratories, Waltham, Mathematical Reviews, American Rhode Island Massachusetts Mathematical Society, Ann Arbor, Michigan California Institute of Technology, Harvard University, Computer Pasadena, California Services. Cambridoe. Massachusetts Max Planck Institut fiir Mathematik, Bonn, Calvin College, Grand Rapids, Hewlett-Packard Co., Boise, Idaho Michigan Federal Republic of Germany Hobart & William Smith Colleges, Max Planck Institute Stuttgart, Carnegie Mellon University, Geneva, New York Pittsburgh, Pennsylvania Stuttgart, Federal Republic of Humboldt State University, Arcata, Germany Centre Inter-RAgional de Calcul California ~lectroni~ue,CNRS, Orsay, France McGill University, Montre'al, Hutchinson Community College, Que'bec, Canada City University of New York, Hutchinson, Kansas New York, New York Michigan State University, IBM Corporation, Scientific Mathematics Department, East College of St. Thomas, Computing Center, Palo Alto, California Lansing, Mighigan Center, St. Paul, Minnesota Illinois Institute of Technology, National Cancer Institute, College of William & Mary, Chicago, Illinois Frederick, Maryland Department of Computer Science, Williarnsburg, Virginia Imagen, Santa Clara, California National Center for Atmospheric Research, Boulder, Colorado COS Information, Montreal, P. Q., Informatika, Hamburg, Canada Federal Republic of Germany National Institutes of Health, Bethesda, Maryland Data General Corporation, Institute for Advanced Study, Westboro, Massachusetts Princeton, New Jersey National Research Council Canada, Computation Centre, Institute for Defense Analyses, DECUS, L&T Special Interest Ottawa, Ontario, Canada Group, Marlboro, Massachusetts Communications Research Division, Princeton, New Jersey National Semiconductor Department of National Defence, Corporation, Santa Clara, Intevep S. A., Caracas, Venezuela Ottawa, Ontario, Canada California Iowa State University, Ames, Iowa Digital Equipment Corporation, New Jersey Institute of Nashua, New Hampshire Technology, Newark, New Jersey TUGboat, Volume 10 (1989), No. 1

New York University, Academic I. P. Sharp Associates, Palo Alto, University of British Columbia, Computing Facility, New York, California Computing Centre, Vancouver, New York British Columbia, Canada Smithsonian Astrophysical Nippon Telegraph & Telephone Observatory, Computation Facility, University of British Columbia, Corporation, Software Cambridge, Massachusetts Mathematics Department, Laboratories, Tokyo, Japan Vancouver, British Columbia, Software Research Associates, Canada Northeastern University, Academic Tokyo, Japan Computing Services, Boston, University of Calgary, Calgary, Sony Corporation, Atsugi, Japan Massachusetts Alberta, Canada Space Telescope Science Institute, Norwegian Pulp & Paper Research University of California, Division Baltimore, Maryland Institute, Oslo, Norway of Library Automation, Oakland, Springer-Verlag, Heidelberg, California Online Computer Library Center, Federal Republic of Germany Inc. (OCLC), Dublin, Ohio University of California, Berkeley, Stanford Linear Accelerator Center Academic Computing Services, Pennsylvania State University, (SLAC), Stanford, California Berkeley, California Computation Center, University Park, Pennsylvania Stanford University, Computer University of California, Berkeley, Science Department, Stanford, Computer Science Division, Personal TkX,Incorporated, Calzfornia Berkeley, California Mill Valley, California Stanford University, ITS Graphics University of California, Irvine, Promis Systems Corporation, & Computer Systems, Stanford, Department of Mathematics, Toronto, Ontario, Canada California Irvine, California Peter Isaacson Publications, State University of New York, University of California, Irvine, Victoria, Australia Department of Computer Science, Information & Computer Science) Purdue University, West Lafayette, Stony Brook, New York Irvine, California Indiana Stratus Computer, Inc., Marlboro, University of California, QMS, Inc, Mobile, ~la'bama Massachusetts San Diego, La Jolla, California Queens College, Flushing, Syracuse University, Syracuse, University of California, New York New York San F'rancisco, San Francisco, California Research Triangle Institute, Talaris Systems, Inc., San Diego, Research Triangle Park, California University of Canterbury, North Carolina Christchurch, New Zealand Texas A & M University, REJSPEC, Inc., Rapid City, Computing Services Center, University of Chicago, South Dakota College Station, Texas Computation Center, Chicago, Illinois Rice University, Department of Texas A & M University, Computer Science, Houston, Texas Department of Computer Science, University of Chicago, Computer College Station, Texas Science Department, Chicago, Royal Marsden Hospital, Surrey, Illinois England Tribune TV Log, Glens Falls, New York University of Crete, Institute of Ruhr Universitat Bochum, Computer Science, Heraklio, Crete, TRW, Inc., Redondo Beach, Bochum, Federal Republic of Greece Germany California University of Delaware, Newark, Tufts University, Medford, Rutgers University, Hill Center, Delaware Piscataway, New Jersey Massachusetts University of Exeter, Computer TV Guide, Radnor, Pennsylvania St. Albans School, Mount Unit, Exeter, Devon, England St. Alban, Washington, D. C. TYX Corporation, Reston, University of Glasgow, Department Virginia Sandia National Laboratories, of Computing Science, Glasgow, Albuquerque, New Mexico UNI-C, Aarhus, Denmark Scotland SAS Institute, Cary, University College, Cork, Ireland University of Groningen, North Carolina Groningen, The Netherlands University of Alabama, Tuscaloosa, Alabama TUGboat, Volume 10 (1989), No. 1

University of Illinois at Chicago, University of Salford, Salford, Vanderbilt University, Nashvzlle, Computer Center, Chicago, Illinois England Tennessee University of Illinois at Urbana- University of Southern California, Vereinigte Aluminium-Werke AG, Champaign, Computer Science Information Sciences Institute, Bonn, Federal Republzc of Germany Department, Urbana, Illinois Marina del Rey, California Villanova University, Vzllanova, University of Kansas, Academic University of Stockholm, Pennsylvanza Department of Mathematics, Computing Services, Lawrence, Vrije Universiteit, Amsterdam, Kansas Stockholm, Sweden The Netherlands University of Maryland, College University of Texas at Austin, Washington State University, Park, Maryland Austin, Texas Pullman, Washzngton University of Massachusetts, University of Vermont, Burlington, Widener University, Computing Vermont Arnherst, Massachusetts Services, Chester, Pennsylvanza UniversitC de Montreal, Montre'al, University of Washington, John Wiley & Sons, Incorporated, Department of Computer Science, Que'bec, Canada New Yo&, New York Seattle, Washington University of North Carolina, Worcester Polytechnic Institute, School of Public Health, University of Western Australia, Worcester, Massachusetts Chapel Hill, North Carolina Regional Computing Centre, Nedlands, Australia Yale University, Computer Center, University of Oslo, Institute New Haven, Connectzcut of Informatics, Blindern, Oslo, University of Wisconsin, Academic Norway Computing Center, Madison, Yale University, Department of Wisconsin Computer Science, New Haven, University of Ottawa, Ottawa, Connectzcut Ontario, Canada Uppsala University, Uppsala, Sweden

Tfl Typesetting Services

The American Mathematical Society can produce typeset pages from your DVI or source files. Features of our services include:

QUALITY - We use an Autologic APS SPEED - Turnaround time is no more Micro-5 typesetter. than one week for up to a 500 page job. FONTS - We offer AM. CM and Times EXPERIENCE - If you have a problem Roman. Several more Autologic typefaces with a DVI or source file, we can usually will be added in the near future. solve it with our staff who are trained in LOW-COST - We charge only $5 per TEX . page for the first 100 pages: $2.50 per page FULL-SERVICE - We also offer keyboard- for additional pages. ing, camera work, printing and binding ser- vices.

For more information, or to schedule a job, please contact Regina Girouard American Mathematical Society (401) 272-9500 PO BOX6248 800-556-7774 Providence. RI 02940 TEX Users Group 1989 Membership Form

Request for Information 0 Send completed form with remittance (checks, money orders, UNESCO coupons) to: The Users Group maintains a database and 7&X Users Group publishes a membership list containing informa- P. 0. Box 594 tion about the equipment on which 7$X is (or will Providence, Rhode Island 02901, U.S.A. be) installed and about the applications for which For foreign bank transfers is used. This list is updated periodically and direct payment to the w Users Group, distributed to members with TUGboat, to permit account #002-031375, at: them to identify others with similar interests. Thus, Rhode Island Hospital Trust National Bank it is important that the information be complete One Hospital Trust Plaza and up-to-date. Providence, Rhode Island 02903-2449, U.S.A. Please answer the questions below, in particu- General correspondence lar those regarding the status of and the hard- about TUG should be addressed to: ware on which it runs. (Operating system informa- tion is particularly important in the case of IBM Users Group mainframes and VAX.) This hardware information P. 0. Box 9506 is used to group members in the listings by com- Providence, Rhode Island 02940-9506, U.S.A. puter and output device. If accurate information has already been pro- Name: vided by another TUG member at your site, indi- Home [ ] BUS. I Address: cate that member's name and the same information will be repeated automatically under your name. If your current listing is correct, you need not answer these questions again. Your cooperation is appre- ciated.

QTY ITEM AMOUNT 1989 TUGboat Subscription/TUG Membership (Jan.-Dec.) - North America New (first-time): [ ] $35.00 each Renewal: [ ] $45.00; [ ] $35.00 - reduced rate if renewed before February 1,1989 1989 TUGboat Subscription/TUG Membership (Jan.-Dec.) - Outside North America New (first-time): [ ] $45.00 each Renewal: [ ] $50.00; [ ] $45.00 - reduced rate if renewed before February 1,1989 TUGboat back volumes 1980 1981 1982 1983 1984 1985 1986 1987 1988 Circle volume(s) desired: vol. 1 vol. 2 vol. 3 vol. 4 vol. 5 vol. 6 vol. 7 vol. 8 v01.9 I Indiv. issues $18.00 ea. $18 $50 $35 $35 $35 $50 $50 $50 $50 1 1 Air mail postage is included in the rates for all subscriptions and memberships outside North America. TOTAL ENCLOSED: Quantity discounts available on request. (Prepayment in U.S. dollars required)

Membership List Information

Institution (if not part of address): Date:

Title: Status of m: [ ] Under consideration Phone: [ ] Being installed Network address: [ ] Up and running since: - [ ] Arpanet [ ] BITnet Approximate number of users: - [ ] CSnet [ ] uucp [ ] JANET [ ] other Version of m: [ ] Pascal Specific applications or reason for interest in w: [ IC [ ] other (describe) My installation can offer the following software or From whom obtained: technical support to TUG: Hardware on which m is used: Operating Output Please list high-level users at your site who would not Computer(s) system(s) device(s) mind being contacted for information; give name, address, and telephone.

Revised 10/88 Integrated Computer Software, Inc Stephan v. Bechtolsheim

Related Services: Related Services: Macro package design Style file modifications Specialized output routines Training Training Consulting Consulting X Window System Programming NeWS Programming POSTSCRIPTRelated Services: l@QS Software Package Programming (see article in this issue) Training Data Base Publishing Unix Related Programming

21 19 Old Oak Drive West Lafayette, IN 47906

THE COMPLETE PC TYPESETTING SYSTEM TEX * METAFONT * Previewer * HP Laser Driver * Dot Matrix Driver

To earn your patronage, ScripTek, Inc., makes this limited introductory offer of its Complete System I: TEX with virtual memory (The T~Xbookextra); METAFONT with virtual memory (The METAFONTbook extra); Screen previewer with three zoom levels; Laser printer driver for HP Laser Jet I1 or compatible; Dot matrix driver for IBM graphics printer or compatible; All 75 Computer Modern Fonts with source code; Total package price $125. Available for the IBM PC XT/AT or compatible. Requires 512K RAM and hard disk. For purchase orders only, CALL: (800) 383-5022. Mastercard and Visa ac- cepted. For more information, or to order by mail, WRITE: ScripTek, Inc., Sales Department, P.O. Box 5310, Kansas City, Missouri 64131. Public Domain l)jX

The authorized and current versions software are available from Maria Code - Data Processing Services by special arrangement with Stanford University and other contributing universities. The standard distribution tape contains the source of w and METAFONT, the macro libraries for d&-m, BTEX, Sliw and HP w,sample device drivers for a Versetec and LN03 printers, documentation files, and many useful tools. Since these are in the public domain, they may be used and copied without royalty concerns. They represent the official versions of w. A portion of your tape cost is used to support development at Stanford University. If you have a DEC VAX/VMS, IBM CMS, IBM MVS or DEC TOPS operating system, you will want to order a special distribution tape which contains "ready-to- run" T)$ and METRFONT. If you do not have one of these systems, you must perform a more involved installation which includes compiling the source with your Pascal compiler. Ready-to-run versions of are available for other systems from various sources at various prices. You may want to examine these before ordering a standard distribution tape. The font tapes contain GF files for the Computer Modern fonts. While it is possible to generate these files yourself, it will save you a lot of CPU time to get them on tape. All systems are distributed on 9 track, 1600 bpi magnetic tapes. If both a distribution tape and a font tape are ordered, they may be combined on a single 2400' reel, space permitting. Your order will be filled with the current versions of software and manuals at the time it is received. If you want a specific version, please indicate that on your order. Please use the form on the next page for your order. Note that postage, except domestic book rate is based on the item weights in pounds. If you want to place your order by telephone, please call (408) 735-8006 between 9:00 am and 2:00 pm West Coast time. Do not call for technical assistance since no one there can help you. We normally have a good stock of books and tapes, so your order can be filled promptly - usually within 48 hours. Make checks payable to Maria Code - Data Processing Services. Export orders must have a check drawn on a US bank or use an International Money Order. Purchase orders are accepted. If you want to pay with Visa or Mastercard, include your number, card type, expiration date and signature. 'QjX Order Form

TEX Distribution tapes: Font Library Tapes (GF files) - Standard ASCII format - 300 dpi VAXIVMS format - Standard EBCDIC format - 300 dpi generic format - Special VAX/VMS format Backup - IBM 382013812 MVS format - Special DEC 2O/TOPS 20 Dumper format - IBM 3800 CMS format - Special IBM VM/CMS format - IBM 4250 CMS format - Special IBM MVS format - IBM 382013812 CMS format Tape prices: $92.00 for first tape, Total number of tapes $72.00 for each additional tape. Postage: allow 2 lbs. for each tape

Documents: Price $ Weight Quantity Wbook (vol. A) softcover ...... 27.00 2 - w:The Program (vol. B) hardcover ...... 37.00 4 - METAFONT book (vol. C) softcover ...... 22.00 2 - METAFONT the Program (vol. D) hardcover ... 37.00 4 - Computer Modern Typefaces (vol. E) hardcover 37.00 4 - UTEX document preparation system ...... 27.00 2 - WEB language * ...... 12.00 Wware * ...... 10.00 Bibw * ...... 10.00 Torture Test for W * ...... 8.00 Torture Test for METAFONT * ...... 8 .OO * published by Stanford University

Payment calculation: Number of tapes ordered Total price for tapes Number of documents ordered Total price for documents Add the 2 lines above Orders from within California: Add sales tax for your location.

Shipping charges: (for domestic book rate, skip this section) Total weight of tapes and books lbs.

- domestic priority mail rate $1.50/lb. Check - air mail to Canada and Mexico: rate $2.00/lb. One - export surface mail (all countries): rate $1.50/lb. - air mail to Europe, South America: rate $5.00/lb. - air mail to Far East, Africa, Israel: rate $7.00/lb. Multiply total weight by shipping rate. Enter shipping charges:

Total charges: (add charges for materials, tax and shipping)

Send to: Maria Code, DP Services, 1371 Sydney Drive, Sunnyvale, CA 94087. Include your name, organization, address, and telephone number. Are you or your organizaton a member of TUG? K-Talk Introduces

Math Editing Made Easy- For the PC!

MathEdit makes it easy to create and edit math formulas for your 'QjX files. With its simple menu, anyone can immediately begin constructing complex formulas. And as you create your formulas, MathEdit guides you completely through them, so you can't go wrong. rn Sizes of math symbols are adjusted automatically to fit equa- tions of varying size and complexity. rn A display window lets you see your formula as you create it. MathEdit takes full advantage of EGA and Hercules Graph- ics Plus RamFonts to give you excellent quality on-screen viewing. rn And your equation is output in WordPerfect format AND 'I?@,so it can be used in word processing as well as 'I)$ typesetting. MathEdit is $149 and has a 30-day money back guarantee. For more information, please contact:

50 McMillen Avenue KTALE CoIurnbus, Ohio 43201 COMMUNlCATlONS= (614) 294-3535

Hercules Graphics Plus RamFonts is a trademark of Hercules Computer Technology. WordPerfect is a trademark of the Wordperfect Corporation. is a trademark of the American Mathematical Society. It doesn't have to be. End its Tflessness with the Personal T#, Inc. products below ... including New PC T# 2.93 and New PTI View.

PCTEX Version 2.93. New! The latest version of TEX, TABLES TO DIE FOR. Lets you easily produce even includes support for EMS memory. $249 the most complex tables-with professional typesetter m refinements. $125 PTI View. New product! Document previewer for - EGA, VGA, CGA and Hercules graphics adapters. PTI FONTWARE Interface Package. Software to gen- Scales on-the-fly. $149 erate the Swiss family of fonts in any size. (The Inter- m face is necessary to use Bitstream fonts.) $195 PC TEX + PTI LASER + PTI VIEW. T~x82,Version m 2.93: professional formatting and typesetting results- BITSTREAM Font Family. An extensive library of for amateur prices. Includes INITEX, LaTEX, AMS- over 50 type families, in any size you specify, with true TEX, VANILLA Macros, PCTEX and LaTj+ manuals. typographic quality. Each family $195 Plus a PTI Laser device driver, to take full advantage m of your laser printer. PLUS the PTI View screen pre- NELSON BEEBE Device Drivers. C source code for viewer for on-screen previewing of your TEX docu- the do-it-yourself TEX hacker. $35 ments and immediate editing. Top performance and - low cost make this our most popular package. $499 TEX Documentation Source. 6 diskettes. $25 m - PCT@ + PTI LASER. As above, but without the 'PEX Program Source. 10 diskettes. $25 PTI View screen previewer. $399 m m PC '&jX + PCDOT + PTI View. This package gives Don't spend another day TEXless. To order, just dial you all the TEX and PTI View benefits, together with (415) 388-8853 our dot-matrix device driver for reliable, low cost printing. $399 m PCTEX + PCDOT. As above, without the PTI View PERSONAL screen previewer. $325 m pcMF-METRFONT for the PC. Lets you design fonts and create graphics. (Not for the novice.) Ver- sion 1.7a. $195 m PTI LASER HP+ SERIES. This device driver for the HP LaserJet Plus and Series I1 laser printers takes full advantage of the 512K resident memory. $195 m INC PTI LASER POSTSCRIPT. Device driver for Post- Script printer; allows the resident fonts and graphic 12 Madrona Avenue Mill Valley, CA 94941 images to be used in TEX documents. $195 FAX: (415) 388-8865 VISA, MC accepted.

Requires: DOS 2.0 or later, 512K RAM, 10M hard disk. TEX is an American Mathemoticol Society TM. PC TEX is a Personal TEX. Inc. TM Manufacturers' names are their TMs. Outside the USA, order through your local PC TEX distrfbutor Inquire about available distr~butorshipsand site licenses. This ad was produced using PC TEX and Bitstream fonts. TYPESETTING: JUST

Send us your TEX DVI files and we will typeset your material at 2000 dpi on quality photographic paper - $2.50 per page! Choose from these available fonts: Computer Modern, Bitstream Fontware", and any METAFONT fonts. (For each METAFONT font used other than Computer Modern, $15 setup is charged. This ad was composed with PCTEX@ and Bitstream Dutch (Times Roman) fonts, and printed on RC paper at 2000 dpi with the Chelgraph IBX typesetter.) And the good news is: just $2.50 per page, $2.25 each for 100+ pages, $2.00 each for 500+ pages! Laser proofs $SO per page. ($25 minimum on all jobs.) Call or write today for complete information, sample prints, and our order form. TYPE 2000,16 Madrona Avenue, Mill Valley, CA 94941. Phone 415/388-8873. TYPE If you find yourself needing a Tanician each time you want to create a format for a new document, or mod- ify an existing one, then you need TEXTI.

TEXT^ makes it easy for the T@ novice and expert alike to quickly modify the style of your chapters, contents, running head, mar- gin notes, indices, etc. You can get TEXT^ for a microcomputer for $150.

TEXT^ also has an International Phonetic font optionally available for $100.

For more information, write to: or call: TEXT^ Distribution TEXT^ Distribution WSUCSC 509-335-041 1 Pullman, WA 99 164-1220 THE SOLUTION...

Available now, from Micro Publishing Systems Inc., CTEX, a fully TRIP-certified implementation of TEX ver. 2.95 for IBM PC and compatibles running MS DOS.

TEX Version 2.95 TODAY ... THE COMPLETE PICTURE CTEX means never having to wait for your up- With the CTEX Plus package you will receive date! For instance, if TEX version 2.96 was an- all you need to TEX your most demanding nounced tomorrow, we would provide you with project. CTEX really is fast, (not just a fast an update virtually same day. Why wait for up sounding name)! TEXWRITE allows you to to two years, as in some cases, for the most TEX, preview, or print, at the stroke of a key recent TEX release? With CTEX you will always without leaving your document! TEXPRINT/PS be up to date! and TEXPRINT/HP laser printer drivers are in- cluded for a savings of more than $240.

I 1 THE CTEX PLUS PACKAGE ...... TEX Version 2.95 TEXWR~TE TEXPRINTIHP TEXPRINTIPS INITEX LuTEX AMSTEX PLAIN TEX CTEX User's Guide The T~Xbook or LaTEX User's Guide Binderislip Case 518 CM Fonts Picture and SliT~xFonts All for only ...... $495 US

CTEX, JEXWRITE AND JEXPRINJ dnvers may be purchased seperately Add Maxvrew screen prevlewer to above for $100.

For more information or to place an order, please contact: Micro Publishing Systems, Inc., Suite 300-1120 Hamilton St.,

Vancouver, B.C., V6B 2S2, M I C RO Canada (604) 687-0354 PUBLISHING Dealer and distributorship inquiries are welcome. TEX is a trademark of the Amencan Mahematical Saciety. Product names are SYSTEMS INC. trademarks of their respective manufacturers. Math and Technical B Publishers.

If you are creating your files using TEX, Computer Composition Corporation can now offer the following services: Converting TEX DVI files to fully paginated typeset pages in either "AM" or "CM" fonts. Providing 300 dpi laser-printed page proofs which simulate the typeset page in "AM" fonts only. Keyboarding services from traditionally prepared manuscripts via the TEX processing system in either "AM" or "CM" fonts. Full camera work services, including halftones, line art, screens and full-page negatives or positives for your printer.

Call or write for sample pages in either "AM" or "CM8'fonts

1401 WEST GlRARD AYE. MADISON HEIGHTS. MI 48071 Typesetting Software Including META FONT Executables $150 With source $300

Turbow Release 2.0 software larger computers, Turbow runs up Availability & Requirements: offers you a complete typesetting to 3 times faster in less memory than Turbow executables for IBM PC's package based on the QX2.95 and the Stanford Pascal distribution. include the User's Guide and require METAFONT 1.7 standards: preloaded Source code: Order the Turbo- 640K and hard disk. Order source plain ?&X, UT$, INITEX,VIRTEX, TEX source in portable C, and you code (includes Programmer's Guide) and plain METAFONT interfaced to will receive more disks with over for other machines. Source compiles CGA/EGA/VGA/Hercules graph- 85,000 lines of generously commented with Microsoft C 5.0 or later on the ics; TRIP and TRAP certification; T@, Turbow, METAFONT, and PC; other systems need 1 MB mem- Computer Modern and I4T$ fonts, printer driver source code, including: ory and a C compiler supporting and printer drivers for HP LaserJet our WEB system in C; PASCHAL, our UNIS standard 110. Media is 360K. Plus/Series 11, Postscript, and dot- proprietary Pascal-to-C translator; 5-114" PC floppy disks; other formats matrix printers. New features in the and preloading, virtual memory, and at extra cost. HP LaserJet driver put PCX or TIFF graphics code. Turbow meets C No-risk trial offer: Examine graphics files directly into your TEX portability standards like ANSI and the documentation and run the PC documents. This wealth of software K&R, and is robustly portable to a Turbow for 10 days. If you are not fills over 10 megabytes of diskettes, growing family of operating systems. satisfied, return the software for a and runs on your IBM PC, UNIX, m-FAX: Connects 'I)$ to the 100% refund or credit. (Offer applies OS/2, or VAX/VMS system. FAX revolution. Send perfect 'I)$ to PC executables only.) Power Features: Turbow output instantly, anywhere, without Ordering Turbow brings big-machine performance to scanning. With 'I)$-FAX, any FAX Order by phone, FAX, or mail. your small computer. Turbow machine in the world becomes your breaks the 640K memory barrier un- Terms: Check with order (free media output device! Complete with PC and ground shipping in US), VISA, der MS-DOS on the IBM PC with our board and software for $395 (4800 virtual memory sub-system. You'll Mastercard (free media, shipping ex- bps) or $795 (9600 bps). tra); Net 30 to well-rated firms and have the same sized TEX that runs Desktop Publishing Interface on multi-megabyte mainframes, with public agencies (shipping and media Option: Converts TEX output (such plenty of memory for large docu- extra). Discounts available for quanti- as equations or tables) for direct use ments, complicated formats, and de- ties or resale. in programs like Ventura Publisher manding macro packages that break and Pagemaker. ($50 for PC). Ask for the free, 50-page Buyer's other TEX implementations. On Guide.

The Kinch Computer Company PUBLISHERSOF TURBOTES 501 South Meadow Street Ithaca, New York 14850 Telephone (607) 273-0222 FAX (607) 273-0484 Publishing Companion translates WordPerfect

It doesn't take a T@pert to use Tfi. With Publishing Companion, you can publish documents using TEX with little or no TEX knowledge. Your WordPerfect files are translated into TEX files, so anyone using this simple word processor can immediately begin typesetting their own documents! And now, K-Talk introduces Publishing Companion version 2.0, which translates WordPerfect 5.0 files into TEX. Other word processors are supported using Mastersoft's WordForWord file conversion utility, $70.

Special Introductory Offer

Retail Price ...... $249 Academic Discount Price ...... $1 99

Introductory Price ...... $1 79 This offer good until July 3 1, 1989. Upgrade from Publishing Companion V. 1.XX is $49.

For the power of T@ with the ease of a word processor, Publishing Companion is your "best friend' for desktop publishing. For more information or to place an order, call or write:

50 McMillen Ave Columbus, Ohio 43201 (61 4) 2949535

DESKTOP PUBLISHING HAS NEVER BEEN SIMPLER AND WILL NEVER BE THE SAME Introducing.. . Tfl Made Easy Using With The Plain Macro Package

Instruction Book

Since Tj$i Made Easy was created, author/ T~~JXMade Easy, the book, is written for instructor Daniel Zirin has taught hundreds people interested in a quick simple approach of new 'QX users with this 10 hour seminar to learning how to start using Plainm. format class. Many of the participants Written for the business professional, 'I)i$ were unsophisticated computer users like Made Easy has been given higli praise by administrative aids and business people. those considered "computer shy". Mr. Zirin has consisteiitly received high marks in presenting beginning 'I)$ by rn Made Topics Covered Easy students. Creating 'I)$files. Defining page layout and margins. Now you can bring 'I'$Made Easy to your 8 Accenting and overstriking characters. place of business at affordable rates. For only Using different fonts. $750' per day (plus expenses), Mr. Zirin will How to use the TEX program. present Made Easy over a period of two Specializing the headline and footline for to five days at your office (unlimited class each page. size). To schedule a two day seminar in most 0 Generating footnotes. U.S. cities would cost an average $2500. Setting a tabular environment. TJsing alignnlent to make tables. Class Format: 10 hours (seminar) Dealing with figures and insertions. $750 per day (2 day min.) Automatic enumeration of paragraphs, 'Air, liotel, trans., meals, equations, references, etc.. . 2)jY Made Easy manuals, Using math and equation modes. and The wbook all extra. Creating simple 'I)$ macros. A sample macro package to generate an Offered by DECUS in Atlanta 011 May 7th. automatic table of contents. Call DECUS at (508) 480-3307 for details. Price: $15 for each 90 page book. $3 shipping U.S., $6 all others. (Call for special discounts)

Zar Limited (818) 794-1224 P.0. Box 372, Pasadena, CA 91102, USA A Gourmet Guide to Typesetting with the AMS -TEX macro package M. D. SPIVAK, Ph.D.

The Joy of 7&Y is the user-friendly user's accuracy and still have control over the fin- guide for AMS-'I$$, an extension of w, ished product, even novice technical typists Donald Knuth's revolutionary program for will find the manual easy to use in helping typesetting technical material. AMS-TEX them produce beautiful technical Wt. was designed to simplify the input of math- This book is designed as a user's guide ematical material in particular, and to for- to the AMS-W macro package and details mat the output according to any of various many features of this extremely useful text preset style specifications. processing package. Parts 1 and 2, entitled There are two primary features of the "Starters" and "Main Courses," teach the TF$ system: it is a computer system for reader how to typeset most normally en- typesetting technical text, especially text countered text and mathematics. "Sauces containing a great deal of mathematics; and Pickles," the third section, treats more and it is a system for producing beautiful exotic problems and includes a 60-page dic- text, comparable to the work of the finest tionary of special wniques. printers. Exercises sprinkled generously through Most importantly, m'scapabilities are each chapter encourage the reader to sit not available only to Wperts. While down at a terminal and learn through ex- mathematicians and experienced technical perimentation. Appendixes list summaries typists will find that QjX allows them to of frequently used and more esoteric sym- specify mathematical formulas with great bols as well as answers to the exercises.

ISBN 0-8218-2999-8, LC 85-7506 PREPAYMENT REQUIRED. Order from 290 pages (softcover), 1986 American Mathematical Society AMS Indiv Memb $26, AMS Inst P 0 Box 1571 Memb $30, List prlce $33 Annex Station To order speclfy JOYTIT Providence, RI 01901-1571 1st book $2, each or call 800-556-7774 to use VISA or Mastercard add'l $1, max $25, by air, 1st book Prices subject to change $5, each add'l $3, max $100 HP LaserJet Support for the current suite of Laser- Jet printers: the LaserJet 11, the most economical printer that can effectively support TEX; the LaserJet IID, which adds duplexing at a small increment in J J design and writing, instead of price; up to the LaserJet 2000, for high- volume use. struggling with your tools. DEC LN03 Fit for VMS Support for the LN03 and LN03 Plus, DEC's low-volume laser printers. A No surprises here. Our VMS TEX and specially tuned font set matches their companion device interfaces all use imaging characteristics. standard DCL command processing, file handling, and error reporting. De- Compugraphic vice interfaces mimic the familiar VMS Support for the 8400 and 8600 photo- Print command, but let you control typesetters. You get true typeset qual- page arrangement, placement, and scal- ity, production volumes, and access to ing. VMSINSTAL installation and con- the full Compugraphic font library. figuration is fast and familiar. IMAGEN Fit for Professional Use Support for the full line of IMAGEN printers: The IMAGEN-2308 and You won't have to babysit our prod- -3308s, flexible low-volume printers ucts. The software can be tailored to with the ability to emulate a wide match your conventions and pattern of variety of other output devices; the use. It reports intelligibly when errors IMAGEN-4324, capable of sustained occur. Printed documentation and ad- n 24 page/minute output; the IMAGEN- ditions to the VMS Help facility are as XX20 series, with versatile paper han- carefully designed as the software it- dling, including duplexing and signa- self. The software operates efficiently _ ture printing on paper up to ledger in normal use, and accomodates ex- size. treme situations gracefully. Kodak Ektaprint Fit to Print The Kodak Ektaprint 1392 laser printer Take full advantage of your output produces duplexed and stapled output device. All the device interfaces pro- at 90 pages per minute. It's there if vide access to device-specific fonts and you need it. native graphics capabilities. Careful font handling produces output depend- ably, even when device memory is lim- Fov more information, please ited. A font management utility lets you merge commercial fonts from Bit- call. stream, ~om~u~ra~hic,DEC, HP, and other vendors into your standard TEX Northlake Software font set. 81 2 SW Washington, Suite 11 00 Portland, Oregon 97205-3215 Supported USA You can turn to us for help. Our cus- 503-228-3383 Fax 503-228-5662 tomer support offers prompt assistance, IS a trademark of the Arnerlcan Mathematlcai Soclety DEC and xS are trademarks of Dlgltal Equipment Corporation IMAGEN s and can provide direct contact with our a registered trademark of IMAGEN Coiporation Ektapr~nt 1392 IS a ieglstered trademark of Eastman Kodak Company TeKtronix IS a software engineers. registered trademah of Tektronlx Incorporated We have it all.

ArborText offers more software for your lniT~Xfor creating preloaded macro money, on more computers, than any packages. other company. We have it all: Tj, IN$ document preparation macro TEX Preview, DVILASER, phototypesetter package. drivers on PCs, Apollos, Suns, VAXsta- AM and CM font .tfm files. tions, and IBM and DEC mainframes. Fast and easy installation script which pw, for example, ArborTexl's Tjfor saves disk space by checking for IBM PC, PSI2 and compatibles, has more redundant files. included features: Latest version of TEX, 2.9.3. Consistent directory naming. MAPPIT- converts Standard Gener- Corrections to all known bugs in alized Markup Language to LAT$ Addison-Wesley's MicroT$, 1.5A. ArborText's knowledgeable customer We have it all. We're ArborText. support. The following are trademarks of their respective companies: TEX Integrated previewer which you can of American Mathematical Society; pT$ of ArborText, Inc.; IBM PC and PSI2 of International Business Machines Corp; MicroT~Xof use while @&X is still formatting./jp, ...... Addison-Wesley, Corp. Technology developed by David Fuchs...... ARBORTEX~INC. 535 West William Street Suite 300 Ann Arbor, MI 48103 (313) 996-3566 FAX (313) 996-3573 "" for the Macintosh! MacWEB makes your Mac programming easier and more beautiful

The same powerful programming tool Knuth used to write TEX 100% Knuth compatible - based on the official WEB source code. Lets you develop programs top-down, using stepwise refinement. Your design decisions are preserved with the code, where you can keep them up to date as you make changes. Actually makes it fun to document your programs! Generates both 'TEX documentation and compilable Pascal source code from the same easy- to-write WEB input. Automatically pretty-prints your Pascal code with typeset quality, using the full range of W'scapabilities. Automatically generates a table of contents and index, including a full cross-reference of all your program's identifiers and all your top-down code refinements. Much more than just the public-domain system Offers a choice of pretty-printing styles, including Knuth's original style, "Apple" style, "Lightspeed" style, and more. Or define your own custom style. Generates more readable Pascal source files - optionally preserve identifiers, constants, and comments as you wrote them, etc. Use with MPW's PasMat tool to make nicely formatted Pascal files for debugging. Extensive documentation includes tutorial on how to use WEB effectively, with a special section of hints and trouble-shooting tips. 12 example WEB programs included. Each one comes with makefile and everything else you need to compile it or print it with TEX. Customized for the Macintosh and MPW Fully compatible with MPW - tangle and weave run as tools under the MPW Shell, and take standard command-line arguments. Commando interface, too. Handles the complete syntax of MPW Pascal, including Object Pascal. Put tangle and weave commands in your makefiles, and rebuild both programs and docu- mentation automatically. Fully compatible with Textures. Customized "webmac" for best results on Apple Laserwriter. (Standard "webmac" also included, of course.) Fast! Tangles "tangle.webn in less than a minute on a Mac SE, weaves it in less than three (~roducing45 kb of Pascal source code, or the T)$ for a 75 page document).

Order today! Complete WEB system includes manual and 2 disks containing MPW tools, installer, examples, and the full public- domain WEB source code. Requires a Mac Plus or better, MPW 3.0, MPW Pascal, and your favorite implementation of l&X (on your Mac or any other convenient computer). Rosetta, Inc. ONLY $79.95 with free shipping by UPS Second Day Air. 2502 Robinhood C.O.D., check, or money order. Houston, TX 77005 Educational discounts and site licenses are available. (713) 5288350 TUGboat, Volume 10 (1989), No. 1

TEX USERS GROUP

HAVE YOU EVER WISHED YOU KNEW HOW TO USE THE FULL POTENTIAL OF OR UTEX PROPERLY?

Can't get away to take a course? Let us help you!

Here's your opportunity to learn more about 'I]EX.

Since 1983 our instructors have taught nearly 50 Instruction can be tailored to the level of knowledge weeks of classes at all levels of w,to include the and experience of participants as well as the uses IP7Q-X and AM-7Q-X macro packages, plus MET% to which TEX is being put and is offered on all FONT, at a various university computing facilities mainframe computers, PCs, Macs, etc. throughout the U.S., Canada and Europe. In addi- Our fee of $5,000 for a 5-day course covers ev- tion, more than 60 weeks of courses were conducted eryt hing: instructor's fee, travel and living expenses, at several of the national scientific research labs and course texts and instructor handouts-everything! other organizations using to publish research. (Shorter courses are priced accordingly.) Proceeds Some of the courses we offer are: from these courses go to support other activites and services offered by TUG. 0 m: all levels, macro writing, output routines, wizard If you would like detailed course descriptions or need additional information, contact Charlotte 0 L4W: all levels, style files 0 METAFONT Laurendeau or Ray Goucher at the TUG office. Phone: (401) 751-7760. 0 Postscript

Index of Advertisers

124, 138 American Mathematical Society 140 ArborText THE WRITE STUFF, cover 3 Blue Sky Research TEXNICALLY SPEAKING adl 134 Computer Composition 127-128 DP Services 126 Integrated Computer Software, Inc. TEX is the write stuff 129, 136 K-Talk Communications TEX is the powerful publishing system that is guaranteed to make any document you 135 Kinch Computer Company write easier to read ... and guaranteed to 142 Micro Programs, Inc. make that document say the right stuff 133 Micro Publishing Systems, Inc. about you! 139 Northlake Software Micro Programs, Zm.is your source for TEX and related ArborText products 130 Personal TpX Inc. for ZBM PC and Sun workstations. 141 Rosetta, Inc. Call Bob Harris on (51 6) 921 -1 351 and 126 ScripTek, Inc. get the name of the dealer nearest you. 142 Users Group 131 Type 2000 MICRO PROGRAMS, INC. 132 Washington State University 251 JACKSON AVENUE 137 Zar Limited SY ossn NY 11791 COMPUTERS & TYPESETTING: Errata and Changes

As of 20 February 1989

This document contains all known errata and changes to Computers & Typeset- ting, Volumes A-E, as compiled by the Project at Stanford, from 16 June 1987 through the date shown above. An up-to-date log of changes is available on- line to users with Internet access. Changes are in the files ERRATA . ONE (through 22 August 1984), ERRATA .TWO (through 6 January 1986), ctex . doc>ERRATA . THR (through 15 June 1987), and ERRATA . TeX (the most recent changes). All errata files are on the Score system at Stanford (@SCORE.Stanford .Edu). The full errata list is published only once a year, and distributed with the first issue of TUGboat. Supplements appear as necessary in subsequent TUG- boat issues. The date of the last entry in each section of this document is listed in the contents, below, so that it is not necessary to check the detail to see whether anything has been added.

CONTENTS

Colophon for Computers & Typesetting Bugs in Computers & Typesetting Volume A : The wbook (4 January 1989) 3 Volume B : w: The Program (20 February 1989) 4 Volume C : The METRFONTbook (23 December 1988) 10 Volume D : METRFONT: The Program (14 December 1988) 11 Volume E : Computer Modern Typefaces (23 January 1989) 12 Changes to the programs and fonts T@ (ver. 2.97, 23 January 89) 15 METAFONT (ver. 1.7, 14 December 1988) 22 Computer Modern fonts (23 January 1989) 25

Distributed with TUGboat Volume 10 (1989), No. 1. Published by TEX Users Group P. 0. Box 9506 Providence, R.I. 02940-9506, U.S.A. Colophon for Computers & Typesetting The five volumes of Computers & Typesetting were composed by ?jEX (T~jX82) using the Computer Modern (CM85) fonts as produced by METFIFONT (METFI- FONT84). Thus, the books themselves describe exactly how they were prepared for printing. Camera-ready copy was set on an Autologic APS Micro-5 typeset- ter at Stanford University from font images resident on the host computer and shipped to the typesetter a character at a time, as needed. The proof-style illustrations in Volume E were also set on the Micro-5, each figure comprising two images that were combined photographically with the text material after the images of the character shapes had been screened. The "color separation" to produce those proofs was done by a program written for that purpose. All the copy on the cover, spine, and book jackets was also typeset by the , APS, using Computer Modern fonts, except for the ISBN number. The books were printed on Finch Opaque, basis 50 lb. acid-free paper, which has a life expectancy of several hundred years. The hardcover edition was printed and bound by Halliday Lithograph Corp., Hanover, Massachusetts, as were the spiral-bound editions of The QXbook and The METRFONT~OO~.

Corrections to earlier editions Corrections and changes to the AMSIDigital Press edition of the and META- FONT manual (December 1979) and to the w78and METAFONT79 programs are described in the booklet and METAFONT: Errata and Changes dated September 1983 (originally distributed with TUGboat Volume 4, No. 2). This document also contains a comparison of Ta78 (formerly known as m80) with w82. Errata to editions of The QXbook published prior to 1986 are described in The Wbook: Errata and Changes dated February 1986 (originally distributed with TUGboat Volume 7, No. 1). The booklet Computers & Typesetting: Errata and Changes dated 15 June 1987 contains errata through that date as well as listings of changes to TeX.WEB, MF. WEB and to the METAFONT sources of the Computer Modern fonts from the documentation files TeX82.BUG, MF84.BUG and CM85.BUG for the corresponding period. These documents are available from TUG; for information on how to obtain copies, write to TUG at the address on the front cover. Page 3: Bugs in Computers & Typesetting 20 February 1989

Bugs in Computers & Typesetting 20 February 1989

This is a List of all corrections made to Computers & Typesetting, Volumes A-E since 15 June 1987. Corrections to the softcover version of The Wbook are the same as corrections to Vol- ume A. Corrections to the softcover version of The METRFONTbook are the same as corrections to Volume C. Some of these corrections have already been made in reprintings of the books. Some of these corrections affect the indexes and mini-indexes of Volumes B and D in ways not shown here. Corrections prior to 15 June 1987 were published by the T)$ Users Group and are available from the TUG office.

Pane A159. line 22 (2/15/881 - -- - - '\nolimits' if the normal \displaylimits convention has been overridden; a Rad Page A213, lines 34-35 (12123187) text will be a single control sequence token, defined to be like \relax if its meaning is currently undefined. Page A299, line 30 (7/6/88) Fatal format file error; I'm stymied. Pane A326, line 12 (12112187) its natural width. The \hbox version also invokes \everymath. Page A359, line 2 (11/6/88)

Page A359, lines 35-38 (5124188)

Page A364, line 35 (11/6/88) \def\fmtname~plain~\def\fmtversion~2.94}% identifies the current format Page A379, line 15 (10/12/87)

Pane A383, lines 7-15 from the bottom (1141891 209 strings out of 1685 1659 string characters out of 17636 27618 words of memory out of 52821 1172 multiletter control sequences out of 2500 Consequently there was plenty of room for more macros: 52821 - 27618 = 25203 unused cells of main memory, 2500 - 1172 = 1328 of name memory, 1685 - 209 = 1476 of string memory, and 17636 - 1659 = 15977 of character memory. But a fairly large T)$ was being used, and only the macros of Appendices B and E were loaded; in other circumstances it might have been necessary to conserve space. Page 4 : Bugs in Computers & Typesetting 20 February 1989

Page A454, lines 23-29 (81131871 2 2 If a suitable starting letter is found, let it be in font f. Hyphenation is aban- 88 doned unless the \hyphenchar of f is between 0 and 255, and unless a charac- ter of that number exists in the font. If this test is passed, T)$ continues to scan for- ward until coming to something that's not one of the following three "admissi- ble items": (1) a character in font f whose \lccode is nonzero; (2) a ligature formed en- tirely from characters of type (1); (3) an implicit kern. The first inadmissible item ter- minates this part of the process; the trial word consists of all the letters found in ad- missible items. Notice that all of these letters are in font f.

Page A458, left column, line 19 (21151881

Page A462, left column, line 7 (10/9/87) 152, 178,360.

Page A463, left column (4117188)

Page A464, left column, under Displays (12/8/88) non-centered, 186, 326, 375-376, 420-421.

Page A465, entry for \everymath (12112187) [Include also a reference to page 326.1

Page A465, right column (716188) Fatal format file error, 299.

Page A473, entry for 'page builder' (w/87) when exercised, 122, 280-283, 286-287.

Page A474, left column (12127188)

Page A480, right column (2/15/88)

Page A481, right column (7/3/87) \za,347, 348. \zOskip, 347, 348.

Pane B2, line 32 (21201891

define banner = -Thi~~is~TeX,~Version,2.97' { printed when starts )

Pane B38, lines 7-9 from the bottom f11/6/881 - [Delete this paragraph; it is being moved to page B214.1 Page 5 : Bugs in Computers & Typesetting 20 February 1989

Page B38, line 5 from the bottom (12/14/88)

begin if log-opened then selector + term-and-log

Page B39. line 5 f 12114188~ if log-opened then error;

Page B52, line 5 (8113187) cannot be done, i.e., if hi-mem-min = lo-mem-max 4- 1, we have to quit.

Pane B54, lines 34-35 (719188)

begin if hi-mem-man - lo-mem-max >_ 1998 then t t- lo-mem-max + 1000 else t t lo-mem-max +l+(hi-mem-min - lo-mem-max) div 2; { lo-mem-max +2 5 t < hi-mem-min )

Page B108, new line after line 8 (5/24/88) d: integer; {number of characters in incomplete current string)

Page B108, lines 31-33 (5124188)

str-room (1); d + cur-length; while pool-ptr > str-start[&-ptr] do begin decr(poo1-ptr); str-pool [pool-ptr + 11 +- str-pool [pool-ptr]; end; { move current string up to make room for another ) for k t j to j + 1 - 1 do append-char(buffer[k]); text@) + make-string; pool-ptr + pool-ptr + d;

Page B115, line 12 (4/28/88) group-code = 0 . . max-group-code; { save-level for a ievel boundary )

Page B141, line 19 (4/28/88) par-token: halfword; { token representing '\par')

Page B150, line 24 (4/28/88) 358. The present point in the program is reached only when the expand routine has inserted

Pane B151, mini-index (4128188) Delete the entry for 'no-ezpand'; replace it by: expand: procedure, $366.

Page B154, lines 25, 29, 34 respectively (9/20/87) cvl-backup, radix-backup, co-backup: small-number; { to save cur-val-level, etc. ) co-backup + cur-order; backup-backup +- link(backup-head); cur-order t co-backup; link(backup-head) + backup-backup;

Pane B155. new entrv for mini-index (9120187) cur-order: glue-ord, $447.

Page B156, line 28 (12123187) begin eq-dejine(cur-cs, relax, 256); Page 6 : Bugs in Computers & Typesetting 20 February 1989

Page B 157, mini-index (12123187) Delete the entries for 'eqtb' and 'frozen-relax'; replace them by the following: eq-define: procedure, $227. relax = 0, $207.

Page B162, lines 12-14 (4/30/88)

repeat link (temp-head) t null; if (info(r)> match-token + 127) V (info(r) < match-token) then s +- null else begin match-chr +- info(r) - match-token; s t link(r); r e s; p + temphead; m + 0;

Page B177, bottom line before mini-index (7/13/88) cur-val + 0; cur-val-level + int-val; radzx +-- 0; cur-order +- 0;

Pane B181, line 31 (4128188) [Change 'x units per sp' to 'x sp per unit'! This change also should be made on line 1 of page B183 and line -8 of page B590.1

Page B188. line 8 (5 I25 188) function str-toks(b : pool-pointer): pointer; {changes the string str-pool[b . . pool-ptr] to a token list)

Pane B188, line 13 (5125188)

begin str-room(1); p + temp-head; link(p) +-- null; k +- b;

Page B188, line 20 (5/25/88)

pool-ptr +-- b; str-toks +- p;

Pane B188, new line after line 28 (5125188) b: pool-pointer; { base of temporary string}

Page B188, line 31 (5/25/88)

else begin old-setting +- selector; selector + new-string; b t pool-ptr;

Page B188, line 41 (5/25/88)

selector t old-setting; the-toks +- str-toks(b);

Page B190, lines 16-18 (5/25/88) b: pool-pointer; {base of temporary string) begin c c cur-chr; ( Scan the argument for command c 471 );

old-setting +- selector; selector +-- new-string; b +- pool-ptr; (Print the result of command c 472 ); selector +- old-setting; link (garbage) + str-toks (b); ins-list (link (temp-head));

Pane B210. line 36 (5/25/88) - begin if (pool-ptr + name-length > pool-size) V (sty-ptr = max-strings) V (cur-length > 0) then

Pane B211, new line of code before the mini-index (12/14/88) log-opened: boolean; { has the transcript file been opened? }

Page B212, line 5 (12114188)

job-name + 0; name-in-progress +- false; log-opened +- false; Page 7: Bugs in Computers & Typesetting 20 February 1989

Page B213, line 24 (12/14/881

log-name t a-make-name-string (log-file); selector t log-only ; log-opened +- true ;

Page B214, lines 2 and 3 f12/14/88) messages or even to show-context. The prompt-file-name routine can result in a fatal-error, but the error routine will not be invoked because log-opened will be false. The normal idea of batch-mode is that nothing at all should be written on the terminal. However, in the unusual case that no log file could be opened, we make an exception and allow an explanatory message to be seen.

Page B214, lines 7-11 reduce to a single line (12/14/88)

begin selector t term-only ;

Page B224, second-last line (41281871 done: if file-opened then b-close(tfm-file);

read-font-info +- g;

Page B229, lines 6-8 (11/17/87) than 2'?. If z < 223, the individual multiplications b . z, c . z, d . z cannot overflow; otherwise we will divide z by 2, 4, 8, or 16, to obtain a multiplier less than 223, and we can compensate for this later. If z has thereby been replaced by z' = ~/2~,let P = 24-e; we shall compute

Page B229, lines 11-12 (11/17/87) if a = 0, or the same quantity minus cu = 24+ez' if a = 255. This calculation must be done exactly, in order to guarantee portability of QX between computers.

Page B230, lines 2-5 (11/17/87)

begin alpha +- 16; while z 2 '40000000 do

begin z +- z div 2; alpha +- alpha + alpha; end;

beta +- 256 div alpha; alpha +- alpha * z;

Page B245, new entry for mini-index (817187) cur-s: integer, $616.

Page B254, line 29 (817187) cur-S: integer; { current depth of output box nesting, initially -1 )

Page B254, line 31 (8/7/87)

[Remove the statement L~u~-~+-- -1;' and put it on page B244 at the end of line 31.1

Page B259, line 13 (11/9/87\

begin rule-wd +- rule-wd + 10; { compensate for floating-point rounding)

edge + cur-h + rule-wd; kc +- 0; (Let cur-h be the position of the first box, and set

Page B259, line 17 (11/9/87)

cur-h +- edge - 10; goto next-p; Page 8 : Bugs in Computers & Typesetting 20 February 1989

Pane B263, line 21 (1119187) begin ruleht +- rule-ht + 10; { compensate for floating-point rounding ) edge t cur-v + rule-ht; lx +- 0; (Let cur-v be the position of the first box, and set

~aaeB263. line 25 (1119187)

cur-v t edge - 10; goto next-p;

dvi-out(eop); incr(tota1-pages); cur-s +- -1;

Pane B266, new code between lines 31 and 32 (817187) while cur-s > -1 do begin if cur-s > 0 then dvi-out(pop) else begin dvi-out(eop); incr(tota1-pages) end; decr(cur-s); end;

Paae B285. line 21 (4128188) is subsidiary to the nucleus field of some noad; the dot is replaced by '-' or '^' or '/' or '\' if p is

Page B338, second-last line (8119187)

q +- link(head); s + head;

Page B339, line 4 (8/19/87)

Page B339, new code to insert after line 10 (8119187) if o # 0 then

begin r +- link(q);link(q) +- null; q +- hpack(q, natural);

shift-amount (q) +- o; link (q)+- r; link (s)+- q; end; [These new lines also imply changes to the index that aren't shown in this errata list.]

Page B387, line 2 (5124188) is quite short. In the following code we set hc[hn + 21 to the impossible value 128, in order to

Pane B387, line 8 (5124188)

hc[O]+ 127; hc[hn + 11 +- 127; hc[hn+ 21 t 128; {insert delimiters)

Page B390, lines 17-1.8 (5/24/88) (Enter as many hyphenation exceptions as are listed, until coming to a right brace; then return 961); [The same change applies to lines 20-21, and to page 582.1

Pane B396. new line after line 34 (5124188) ------

trie-link(trze-szze) t 0; trze-back(0) +- trze-sue; { wrap around}

Page B396, bottom line (12/12/87) Page 9 : Bugs in Computers & Typesetting 20 February 1989

Page B397, lines 15-17 (5124188)

begin c +- trze-c[p]; if c < trze-mzn then trze-mzn +- c; if trze-mzn = 0 then z +- trze-lznk(trze-szze) else z +- trze-link(trze-mzn - 1); {get the first conceivably good hole)

Page B400, lines 3-4 (5124188) (Enter all of the patterns into a linked trie, until coming to a right brace 961) - [The same change applies to page B399, lines 29-30, and to page 582.1

Page B402, line 10 (5124188)

r +- trie-size; {finally, we will zero out the holes )

Page B406, line 9 from the bottom (1/23/89)

shrink-order(r) +- normal; delete-glue-ref (q); glue-ptr(p) +- r; q +- r;

Page B417, line 10 (1/23/89)

q + new-skip-param (top-skip-code); { now temp-ptr = glue-ptr (q)}

Paae B418. line 14 (1/23/89)

shrinlc_order(r) +- normal; delete-glue-ref (q); glue-ptr(p) +- r; q +- r;

Paae B507, line 13 (12114188)

if log-opened then selector t selector + 2;

Page B527. line 21 (12/14/88) - if log-opened then

Page B528, line 5 (12114188) if log-opened then

Page B547, right column (9120187) co-backup: 366.

Page B548, right column (9/20/87) cur-order: 366, 447, 448, 454, 462.

Page B548, right column (817187) cur-s: 593, 616,619, 629, 640, 642.

Page B551, both columns (1212318'7) [Remove '372' from eqtb and put it into eq-define.]

Paae B552, left column (4/28/88) [Insert '358' into expand .]

Page B554, left column (12123187) [Remove '372' from frozen-relax .] Page 10 : Bugs in Computers & Typesetting 20 February 1989

Page B559, new entry (12/14/88) log-opened, 92-93,527, 528, 534-535, 1265, 1333-1334.

Page B559, right column (8/13/87) [Delete the entry for low~mem~max.]

Page B562, left column (4/28/88) [Remove '358' from no-eqand .]

Pane B565, left column (817187) pop: 584-585,586, 590, 601, 608, 642.

Pane B567, left column (12/23/87) [Insert '372' into relax.]

Page B568, left column (4/28/88) [Move '269' from save-zndex to save-level.]

Page C26, bottom line (7118187) What angle corresponds to the direction North-Northwest?

Page C107, line 13 (10/7/87) pickup penrazor xscaled heavyline rotated (angle(zaa - zal) + 90);

Page C175, line 23 (1/11/88) expand into a sequence of tokens. (The language SIMULA67 demonstrated that it is

Pane C241, line 11 (5/25/88) numeric ht#, dp#; ht# = body-height#; .5[ht#, -dp#] = axzs#;

Page C248, line 21 becomes two lines (1/24/89) which might not be numerically stable in the presence of rounding errors.) Another case, not really desirable, is leftjut = right-jut = 0.

Pane C262, line 15 f 12/23/88) string base-name, base-version; base-name="plainM; base-version="1.7";

Page C271, line 12 (1/4/89) the user and METRFONT's primitive picture commands. First, some important program

Pane C271, line 4 from the bottom f12/23/88) def cutdraw expr p = % caution: you may need autorounding=O Page 11 : Bugs in Computers & Typesetting 20 February 1989

Page C272, lines 5 and 6 (12123188) (cut- scaled (l+max(pen-lf t ,pen-rt ,pen-top,pen-bot)) rotated theta shifted z)t-;

Page C273, lines 20 and 22 (9126188) (2-+(O,pen-top) )t-=round( (z+(O,pen-top) It-) ; z- enddef ; (2-+(O,pen-bot) )t-=round( (z+(~,~en-bot)It) ; z- enddef ;

Pane C290. line 6 from the bottom 112/23/881 (2)A throwaway variable, 'whatever', nullifies an unwanted equation at the beginning

Page C331, just below the illustration (7/18/87) Such a pattern is, of course, rather unlikely to occur in a gf file, but GFtoDVI would

Page C337, line 11 (4/28/88) An online "menu" of the available test routines will be typed at your terminal

Page C346, entry for autorounding (12123188) 212, 262, 264, 271-272.

Page C350, left column (7/6/88) Fatal base file error, 226.

Page C356, left column (1/11/88) SIMULA67 language, 175.

Page C358, right column (2115188) *yoffset, 212, 220, 315, 324.

Page D2, line 27 (12114188) define banner r 'ThisuisuMETAFONT, uVersionul.7 - { printed when METAFONT starts )

Page D36, lines 3-5 (11/6/88) [Delete this paragraph; it is being moved to page D349.1

Paae D36, line 7 112114188)

begin if log-opened then selector + term-and-log

Page D36, line 16 (12114188) if log-opened then error;

Page D66, lines 34-35 (7/9/88)

begin if hi-mem-min - lo-mem-max 2 1998 then t + lo-mem-max + 1000 else t +- lo-mem-max+l+(hi~mem~min-lo-mem-max) div 2; { lo-rnem_max+2 < t < hi-mem-min ) Page 12 : Bugs in Computers & Typesetting 20 February 1989

Page D347, new line of code after line 5 (12/14/88) log-opened: boolean; { has the transcript file been opened? )

Page D347, line 11 (12/14/88)

job-name + 0; log-opened t false;

Page D348. line 4 from the bottom (12114188) - -

log-name +- a-make-name-string(1og-file); selector +- log-only; log-opened +- true;

Page D349, lines 6 and 7 (12/14/88) print error messages or even to show-context. The prompt-file-name routine can result in a fatal-error, but the error routine will not be invoked because log-opened will be false. The normal idea of batch-mode is that nothing at all should be written on the terminal. However, in the unusual case that no log file could be opened, we make an exception and allow an explanatory message to be seen.

Page D349. lines 11-15 reduce to a single line (121141881

begin selector +- term-only;

Page D420, bottom line (5125188) if txx mod unity = 0 then

Page D441, delete line 2 and change line 12 as follows @I251881 done: if eq-type(x) # tag-token then clear-symbol(x,false); if equiv (x) = null then new-root (x); scan-declared-variable +- h;

Page D444, line 8 from the bottom (12/14/88)

if log-opened then selector t selector + 2;

Paae D510. line 14 (12114188) if log-opened then

Page D511, line 11 (12/14/88) if log-opened then

Page D530, new entry (12/14/88) log-opened, 87-88, 782, 783, 788-789, 1023, 1205, 1208.

Page D545, left column (10/31/87) zscaled primitive: 893. Zabala Salelles, Ignacio Andres: 812.

Pane E32. second-last line (91201871 after which comes 'math-axis#; generate mathsy' (which we won't bother to Page 13: Bugs in Computers & Typesetting 20 February 1989

Page Elll, line 29 (10/16/88)

lft $11 = hroundu; 211 - XII = 221 - 212 = 222 - xzT = hround 1.6cap-jut;

Page E285, bottom line (12/1/87) Due to Technical Developments (1968)

Page E333, lines 9-11 (1/9/89)

lft XU = hround(2.5~- .5mfudged.stem); xll = xltl = 221 = x2rl; lft 231 = hround(.5w - .5mfudged.stem); x5 - 23 = xs - XI; if not monospace: T := hround(x5 + XI) + T - w; fi % change width for better fit

Paae E353, lines 38-39 (8112187) else: fill diag-end (6r, 5r, 1,1,51,61) - - z6[] . . (25 - ~6).1[~5~,~~~] --cycle; % middle stem

Page E387, line 13 (8/12/87) pickup tiny .nib; bulb (3,4,5); % bulb

Page E413. lines 37-38 (8/12/87)

else: fill diag-end (6r, ST, 1,1,51,61) - - .9[251, Z~L] . . (25 - 26) .I[z~T,Z~T] - - cycle; % middle stem

Page E459, line 24 (8/7/87) [Delete the '=' sign between 'lft' and 'x5'.]

Page E471, line 5 (12/11/88)

22 = good .x .5w; center-on(x2);

Page E471, insert two lines below the rule at bottom of page (12/11/88) def center-on(expr x) = if not monospace: % change width for symmetric fit T := r + 22 - w; w := 22; fi enddef;

Page E477, line 20 (12/11/87)

24 = x8 = g0od.x .5w; center-on(x4); x2 = w - xs = good.x(x4 + a);

Page E483, third line of elementary division operator (12/11/88)

53 - .5dot-size = hround(.5w - .5dot_size); center-on(x3);

Page E485, line 4 (8/7/87) [Delete the '=' sign between 'lft' and 'x5'.]

Page E487, line 17 (8/4/88) fill fullcircle scaled (bold + 3.8dw + eps) shifted (.5[~4,~8]); % dot [Also remove page 487 from the index entry for dot-size, and add it to the entries for bold and dw .]

Page E515, lines 5 and 12 (12/11/88)

.5[x1, x2] = x3 = good .x .5w; center-on(x3); lft XI = hround(.5w - u * sqrt48); Page 14: Bugs in Computers & Typesetting 20 February 1989

Pane E515, line 21 (1123189) labels(5,6); zero-width; endchar; [Also put labels '5' and '6' on the upper right figure, page E514.1

Page E521, lines 4 and 14 (12112188) xi = xz = good .x .5w; center-on(x1); lft xs = hroundu; xq = w - 23;

Page E537, line 6 (12/11/88)

Page E,537, line 19 (12/11/88)

Page E539, line 4 (12/11/88)

Page E539, line 21 (12/11/88)

Pane E541, line 4 (12/11/88)

Pane E541, line 17 (12/11/88\

xi = XIO = g0od.x .5w;center-on(x1);

Page E550, new line after line 23 - (8/15/87) forsuffixes $ = notch-cut, cap-notch-cut: if $ < 3: $ := 3; fi endfor [To make room for this, combine lines 38 and 39 into a single line.]

Page E550, line 29 (7/9/88) define-whole-vertical-blacker-pixels(vair, bar, slab, cap-bar, cap-band);

Page E572, new entry at bottom (12/11/88) center-on, 473, 477, 483, 515, 521, 537-541. Page 15 : Changes to the Programs and Fonts 20 February 1989

Changes to the Programs and Fonts 20 February 1989 T@ Changes since 15 June 1987.

331. jump-out must fix unfinished output (Found by Klaus Gunterman, 3 Aug 87) Qx module 593 doing-leaders:=false; dead-cycles:=O; QY doing-leaders:=false;dead-cycles:=O; cur-s:=-I; Qz Qx module 617 cur-s:=-I; ensure-dvi-open; QY ensure-dvi-open; Oz Qx module 640 dvi-out (eop) ; incr(tota1-pages) ; QY dvi-out(eop); incr(tota1-pages); cur,s:=-I; Qz Qx module 642 if total-pages=O then print-nl("No pages of output.") QY while cur-s>-I do begin if cur-s>0 then dvi-out (pop) else begin dvi-out (eop) ; incr(tota1-pages) ; end; decr (cur-s) ; end ; if total-pages=O then print-nl("No pages of output.") Qz

332. \hangindent=lpt$$\halignC. . .\cr\noalign(\hrule))$$ problem (19 Aug 87) Qx module 805 q:=link(head) ; QY q: =link(head) ; s :=head; Qz Qx module 805, continued q:=link(ql; QY s:=q; q:=link(q) ; Qz Page 16 : Changes to the Programs and Fonts 20 February 1989

Qx module 806 if is-running(depth (q) then depth(q1: =depth(p) ; QY if is-running(depth(q) ) then depth(q1: =depth(p) ; if 000 then begin r :=link(q) ; link(q) :=null; q:=hpack(q,natural) ; shift-amount (q) :=o; link(q) :=r; link(s1 :=q; end ; Qz

333. \hskip Opt plus lfil\ifdim problem (found by Alan Guth, 20 Aug 87) Qx module 366 Q!cvl~backup,Q!radix~backup:small~number;Cto save Icur-val-levell and Iradixl) QY Q!cvl~backup,Q!radix~backup,Q!co~backup:small~number; (to save I cur-val-level l , etc .) Qz Qx backup-backup:=link(backup-head) ; QY co-backup:=cur-order; backup-backup:=link(backup-head); Qz ox link(backup-head):=backup-backup; QY cur-order:=co-backup; link(backup-head):=backup-backup; Qz

334. leaders too sensitive near exact multiples (M. F. Bridgland, 9 Nov 87) Qx module 626 begin edge:=cur-h+rule-wd; lx:=O; QY begin rule-wd:=rule-wd+lO; (compensate for floating-point rounding) edge:=cur-h+rule-wd; lx:=O; Qz Qx ibid cur-h:=edge; goto next-p; QY cur-h:=edge-10; goto next-p; Qz Qx module 635 begin edge:=cur-v+rule-ht; lx:=O; QY begin rule-ht:=rule-ht+lO; (compensate for floating-point rounding) edge:=cur-v+rule-ht; lx:=O; Qz Qx ibid cur-v:=edge; goto next-p; QY cur-v:=edge-10; goto next-p; Qz Page 17: Changes to the Programs and Fonts 20 February 1989

335. Glitch in fixed-point multiplication of negatives (W.G. Sullivan, 17Nov87) Qx module 572 begin alpha:=16*z; beta:=16; while z>=Q'40000000 do begin z:=z div 2; beta:=beta div 2; end; QY begin alpha:=l6; while z>=Q'40000000 do begin z:=z div 2; alpha:=alpha+alpha; end ; beta:=256 div alpha; alpha:=alpha*z ; Qz

336. If there are no \patterns and some \lccode is I (Breitenlohner, 12Dec87) Qx module 952 trie-link(0):=0; trie-char(0):=0; trie-op(0):=0; QY trie-link(0):=0; trie-char(0):=0; trie-op(O):=min-quarterword; Qz

337. \csname might encounter undefined-cs in a group (Chris Thompson, 23~ec87) Qx module 372 begin eqtb [cur-cs] :=eqtb [f rozen-relax] ; QY begin eq-def ine (cur-cs ,relax,256) ; Qz

338. \outer\def\aO<)\a\a shows temp-head list garbage (Silvio Levy, 20~pr88) Ox module 391 repeat if (info (r) >match_token+127)or (inf o (r) match-token+127)or (inf o (r)

339. \def\\#l{)\input a\\b failed (Robert Messer, 24Apr88) Qx module 259 var h : integer ; {hash code) QY var h:integer; {hash code) Q!d:integer; {number of characters in incomplete current string) Qz Qx module 260 str-room(1) ; for k:=j to j+l-1 do append-char(bufferCk1); text (p) :=make-string; QY str-room(1); d:=cur-length; while pool-ptr>str-start [str-ptrl do begin decr(poo1-ptr); str~pool[pool~ptr+ll:=str~pool[pool~ptrl; end; {move current string up to make room for another) for k:=j to j+l-I do append-char(bufferCk1); text(p):=make-string; pool-ptr:=pool-ptr+d; Qz

340. Make patterns work when trie-min=0 (Peter Breitenlohner, iOMay88) Qx module 951 trie_max:=128; trie_min:=i28; trie-link(O):=i; trie-taken[O] :=false; QY trie_max:=128; trie_min:=128; trie-link(O):=i; trie-taken[OI:=false; trie-link(trie-size):=O; trie-back(O):=trie-size; {wrap around) Qz Qx module 953 begin c :=trie-c [pl ; Cwe have 100 1 ) if cctrie-min then trie-min:=c; z:=trie-link(trie-min-I) ; {get the first conceivably good hole) QY begin c :=trie-c [p] ; if c

341. Avoid possible trie-pointer out of range (24May88) Qlx module 923 hc 101 :=l27; hc [hn+I] : =l27; hc [hn+21 : =256; {insert delimiters) QY hc[0] :=127; hc[hn+l] :=127; hc[hn+2] :=128; {insert delimiters) Qz Page 19 : Changes to the Programs and Fonts 20 February 1989

342. \input a\romannumerall etc.; similar to bug 339. (25May88) Qx module 464 Qp function str-toks:pointer; (changes the current string to a token list) QY Qp function str-toks(Q!b:pool-pointer):pointer; (changes the string I str-pool[b. .pool-ptr] I to a token list) Qz Qx module 464, continued p:=temp-head; link(p):=null; k:=str-start[str-ptr] ; QY p:=temp-head; link(p):=null; k:=b; Qz Qx module 464, concluded pool-ptr:=str-start[str-ptr]; str-toks:=p; QY pool-ptr:=b; str-toks:=p; Qz Qx module 465 begin get-x-token; scan-something-internal (tok-val,false) ; if cur-val-level>=ident-val then QcCopy the token list@> else begin old-setting:=selector; selector:=new-string; QY Q!b:pool-pointer; (base of temporary string) begin get-x-token; scan~something~internal(tok~val,false); if cur-val-level>=ident-val then @ else begin old-setting:=selector; selector:=new-string; b:=pool-ptr; Qz Qx module 465, continued selector:=old-setting; the-toks:=str-toks; QY selector:=old-setting; the-toks : =str-toks (b) ; Qz Qx module 470 begin c:=cur-chr; @; old-setting:=selector; selector:=new-string; WPrint the result of command IclQ>; selector:=old-setting; link(garbage):=str-toks; ins-list(link(temp-head)); QY Q!b:pool-pointer; {base of temporary string) begin c:=cur-chr; @; old-setting:=selector; selector:=new-string; b:=pool-ptr; @; selector:=old-setting; link(garbage) :=str-toks(b) ; ins-list (link(temp-head)) ; 02

343. **\input\romannumeralb confusion bypassed (25May88) Qx module 525 begin if (pool-ptr+name-length>pool-size) or (str-ptr=maxstrings then QY begin if (p~~l~ptr+name~length>pool~size)or(str~ptr=max~strings)or (cur-length>O) then Qz Page 22 : Changes to the Programs and Fonts 20 February 1989

META FONT Changes since 15 June 1987

540. Typo suppresses an error detection (Chris Thompson, 2May88) Qx module 963 if txy mod unity=O then if tyy mod unity=O then QY if txx mod unity=O then if tyy mod unity=O then Qz

541. get-x-token can lose a scanned declared variable (Chris Thompson, 4May88) Qx module 1011 if equiv (x) =null then new-root (x) ; QY Qz Qx module 1011 done:scan-declared-variable:=h; QY done: if eq-type(x) <>tag-token then clear-symbol(x,f alse) ; if equiv(x)=null then new-root (x) ; scan-declared-variable:=h; Qz

542. Avoid negative divisor rounding upward (Chris Thompson, fixed 19Jun88) Qx module 168 else t:=(lo-mem-max+hi_mem_min+2) div 2; {llo-mem-max+2<=t

543. Better strategy when near memory overflou (Chris Thompson) Qx module 168 begin if lo~mem~max+l000=1998 then t:=lo~mem~max+l000 Qz

544. Avoid fatal-error after terminal eof (Tim Morgan, reported 250ct88) Qx module 66 [serious problem occurred if this was called in open-log-file] if not input-ln(term-in,true) then fatal-error("End of file on the terminal!"); QY if not input-ln(term-in,true) then t-open-in; Qz

545. Force terminal output when open-log-file aborts (6~0~88) Qx module 789 begin print-err("1 can't write on file '"1 ; QY begin selector:=term-only ; print-err("1 can't write on file ' ") ; Qz Page 23: Changes to the Programs and Fonts 20 February 1989

546. By popular request, undo #544 and fix the bug a more complex way. Qx module 66 [this undoes change #5441 if not input-ln(term-in,true) then t-open-in; QY if not input-ln(term-inatrue) then fatal-error ("End of file on the terminal! "1 ; Qz Qx module 87 [now we get to the new stuffI begin if job-name>O then selector:=term-and-log QY begin if log-opened then selector:=term-and-log Qz Qx module 88 error ; QY if log-opened then error; Qz Ox module 782 @!job-name:str-number; {principal file name) QY @!job-name:str-number; {principal file name) Q!log-opened:boolean; {has the transcript file been opened?) Oz Qx module 783 QcInitialize the output ...Q>=job-name:=O; QY @=job-name:=O; log-opened:=false; Qz Qx module 788 selector:=log-only; QY selector:=log-only; log-opened:=true; Qz Qx module 789 begin if interaction print-f ile-name (cur-name,cur-area, cur-ext) ; print (I1 ' . ");@/ job-name:=O; history:=fatal-error-stop; jump-out; end; {abort the program without a log file3 QY begin selector:=term-only; Qz Qx module 1023 [this change is optional, but it's a slight improvement] if job-name00 then selector:=selector+2; QY if log-opened then selector:=selector+2; Qz Page 24 : Changes to the Programs and Fonts 20 February 1989

Qx module 1205 if j ob-name>O then QY if log-opened then Qz Qx module 1208 if job-name>O then Cthe log file is open) QY if log-opened then Qz

547. (I sincerely hope that there won't be any more) Page 25 : Changes to the Programs and Fonts 20 February 1989

Computer Modern fonts Changes since 15 June 1987.

Qx in SYM, the plus-or-minus character xl=x2=.5w; lft x3=lft=x5=hround u-eps; x4=x6=w-x3; QY xl=x2=.5w; lft x3=lft x5=hround u-eps; x4=x6=w-x3; Qz actually the code worked but it was "infelicitous"

Qx in SYMBOL, the minus-or-plus character xl=x2=.5w; lft x3=lft=x5=hround u-eps; x4=x6=w-x3; QY xl=x2=.5w; lft x3=lft x5=hround u-eps; x4=x6=w-x3; Qz actually the code worked but it was "infelicitous"

Ox in ROMANU, letter J [fixes a bug if dish=O and crispctiny and serifs] bulb(3,4,5); % bulb QY pickup tiny.nib; bulb(3,4,5); % bulb Qz

Qx in ROMANL, letter w [makes notch-cut more useful1 else: fill diag-end(6r,5r,l,l,51,61)--.5[~51,~611 --. 5 Cz5r ,z6rl --cycle;% middle stem QY else: fill diag_end(6r,5r,1,1,51,61)--. 9[z51,z611 ..~z5-z6~.1[z5r,z6r]--cycle;% middle stem Qz the same change applies also to letter W in ROMANU

Qx in CMBASE, makes lowres types (especially TT) look better define~blacker~pixels(notch~cut,cap~not~h~cut~; QY def ine-blacker-pixels(notch-cut ,cap-notch-cut ; forsuff ixes $=notch-cut ,cap-notch-cut : if $<3: $: =3; f i endf or Qz

Ox in BIGOP, the \displaystyle coproduct sign lft xli=hround u; xll-xll=x21-x12=x22-x2r=hround cap-jut; QY lft xll=hround u; ~1l-x11=~21-~12=~22-~2r=hround1.6cap-jut; Qz

Ox in ROMANL, the letter m lft xIl=hround(2.5~-.5stem); xll=xlJl=x21=x2'1; Ift x31=hround(. 5w-.5stem) ; x5-x3=x3-XI; if not monospace: r:=hround(x5+xl)-1; fi % change width for better fit QY lft xll-hround(2.5~-.5stem); xl1=xl'l=x21=x2'1; % stem, sic lft x3l=hround(.5~-.5mfudged.~tem); x5-x3=x3-x1; if not monospace: r:=hround(x5+xl)+r-w; fi % change width for better fit Qz Page 26: Changes to the Programs and Fonts 20 February 1989

Qx a new routine for CMBASE, following change-width QY def center-on(expr x) = if not monospace: % change width for symmetric fit r:=r+2x-w; w:=2x; fi enddef; Qz Qx in SYMBOL, the elementary division operator x3-. 5dot_size=hround(. 5w-.5dot-size) ; w: =r :=2x3; QY x3-. 5dot_size=hround( .5w-.5dot-size) ; center-on(x3) ; Qz Similarly, whenever the construction "w:=r:=2x*" appears, change it to "~enter,on(x*)~~. This happens in the programs for elementary division operator (as noted above), large triangle, large inverted triangle, lattice top, lattice bottom, dagger mark, double dagger mark, club/diamond/heart/spade suit (all in SYMBOL), plus the diamond operator and universal quantifier in SYM. The following additional change needs to be made in the programs for lattice top and lattice bottom: Qx xl=x2=good.x .5w; center-on(x1); lft x3=hround u; x4=r-x3; QY xl=x2=good.x .5w; center-on(x1); lft x3=hround u; x4=w-x3; Qz

Ox in SYMBOL, at end of zero-width slash labels(l,2); zero-width; endchar; QY labels(5,6); zero-width; endchar; Qz

(I sincerely hope there won't be any more!)