Home
Complete issue 2:3 as one pdf
Contents
1. 26 Jeffrey S Rosenschein TEX in Israel n David Rodgers TEX at the University of Michigan Summary of Progress 28 VAX UNIX Robert Morris VAX on UNIK 93 ces wk aes a a saja Ge we ee RR RR ka 29 Calvin Jackson TEX at CalTech s ssstissssssessses 29 Janet Incerpi The Status of VAX TEX at Brown ics Peta Go erac Puce dra dd VAX VMS Monte C Nichols VAX VMS Site Report s sssssess s a ux 32 John Blair Enhancements to VAX VMS TEX at Calma 32 John Sauter Poor man s TEX 94 sak Continued FRESE TUGBoAT a VOLUME 2 NUMBER 3 Contente Continued Fonts Ronald Whitney Font Update 35 Warnings amp Limitations Barbara Beeton Don t Just Net TEX Hang raise or lower It 35 Macros Lynne Price Editor s Introduction 36 TUGbost Macro Index sa uw sa da are vele 36 Timothy Murphy Bubbles A TEXtension in Search of a TEXpert 3T Michael F Plass Charting Your Grammar with TEX 39 Monte Nichols Barbara Beeton Chemical Notation Using TEX 81 Problems Lynne Price Balancing columns of text and translation Johnny Stovall Input dependent macro redefinition Mik
2. TUGboat Volume 2 No 3 The first part of this article deals with the ex periences had formatting Turtle Geometry Inter acting with the people at MIT Press learning TEX and using TEX to format the book all presented problems Meny problems stemmed from the fact that I was using TEX an extremely complex format ting program However all of my problems couldn t be blamed on TEK Turtle Geometry was a very large very complex document with innumerable difficult figures equations etc It would have been difficult to format this book using any method Eventually I dealt with all of these difficulties and produced an extremely good looking book Turtle Geometry The Computer as a Medium for Explor ing Mathematics MIT Press June 1981 Since I finished formatting Turtle Geometry I have been thinking about computer text formatters In the second part of this article I discuss some of my ideas on the design of text formatting systems My experiences formatting Turtle Geometry give me an interesting perspective for looking at this area First I talk about the problem of designing format ting languages which give tbe user the correct level of control over the formatting process Then I dis cuss the problem of integrating high level aesthetic formatting goals into a computer formatting system I don t claim to have any great answers to these problems I just want to point out some problems that future text formatte
3. Qpasc20 sysdep sysdep texpre texpre tex tex vmktfh mktfh nktfm nktfm mkfnt mkfnt dvibyt dvibyt bytdia bytdia TZ Oload texpre sysdep Qsave Qload tex sysdep Qsave Qdelete sysdep pas texpre pas ter pas Odelete sysdep rel texpre rel ter rel Odelete strini tbl Oappend sysdep str texpre str strini tbl Qexe mktfh diablo aux diablo tbl diablo tfh Qexe mktfm 18 diablo tfh diarm tfm sdiait tin ediasy tin sdiaox tin diatt tfn Qexe mkfnt disblo tbl diablo fnt Orun tezpre input diablo Vend Odelete strini tbl Gappend sysdep str tex str strini tbl TEX MIC Oconnect scratch eru tez input A Vend Orun dvibyt A dvi A byt Orun bytdia A byt A dia Appendix B Excerpts from DIABLO TBL 00008 wz n3 bl vs u d r Gama 0001B 10 Mh2 Av39Md Var Delta 0002B w i0 b3 b b h2 r Theta 0003B wz12 NABA r Lambda 0004B ws12 NhO ArWM Va 0005B wz12 b3 v8 u_ di r Pi 0006B w 10 h0 gt vS u d d u r Bi gara 0007B w10 ye Upsilon 00108 w i0 nOo r Phi 0011B wziO U bi Pei 0012B ws10 MhO0Nv2NuU Vr Nd Osega 0060B wz10 0 0 0101B w 10 A A 01328 w 10 Z 2 0137B ws12 Nb8 r koaj 0141B vwz1O a a 0172B ws10 z 3 02008 wz9 h3 b i vS u d Vr AGammait 02138 w 12 NiMc Vr alphe 0214B w 10 b3 b0o w3 00 d h7 r beta 0215B w 0 0216B w i0 c delta 0217B w10 h0 lt r
4. size Proofs Recursion Roman numerals uppercase Spanish Table of Contents Tables Testing math style display script or scriptscript integral values Theorems EE va Top beseline set to of box TUGbost submissions Underlining Uppercese letters large st beginning of paragraph Roman numerals Verbatim mode program SAIL program Pascal eee It 59 60 74 76 A Keller 12 A 16 16 36 M D az WA 57 93 Iki 94 97 12 43 44 I1 60 76 65 n2 425 I1 60 77 IL2 51 52 11 57 10 71 L Price P Miligan L Price P Milligen A Keller M Dfaz A Keller M Spivak A Keller I1 57 58 60 62 A Keller 71 82 85 12 A18 40 2 A13 NA 57 70 71 H 2 A IO 23 Wai 60 78 1 2 4 16 H 1 58 72 I2 A 13 15 n2 AN 12 48 49 M Diaz M Diaz A Keller M Diaz A Keller M D az A Keller M Diaz M D ez B McKay Iki 56 57 65 66 A Keller T2 AU n2 4 31 32 1 2 46 48 I2 53 T2 AB T1 120 121 I2 A 12 I1 60 62 86 Il 111 118 T2 amp 27 28 2 A 25 27 1 2 46 Trl 119 120 H2 A31 32 Wi 60 77 1 1 53 54 1 2 59 73 I2 A 13 Hi 60 78 I2 A16 H1 120 121 M D ez M Dfez B McKay M Spivek M D az P Milligan L Price M Diaz Keller L Price M Diez M Diaz B McKay P Milligan L Price M Diaz A Keller B Beston A Keller M Dfez A Keller M Diaz P Milligan L Price IE 1 59 6
5. Rather listen to the sad story of mankind who like children lived until I gave them understanding and a portion of reason Numbers I invented for them the chiefest of all discoveries I taught them the grouping of letters to be a memorial and record of the past the mistress of the arts and mother of the Muses Aeschylus Prometheus Bound translated by Paul Elmer More Complete Greek Drama Random House 1938 THE TEX USERS GROUP NEWSLETTER EDITOR ROBERT WELLAND VOLUME 2 NUMBER 3 NOVEMBER 1981 PROVIDENCE RHODE ISLAND U S A 2 TUGboat Volume 2 No 3 ADDRESSES OF OFFICERS AUTHORS AND OTHERS BEETON Barbara INCERPI Janet PIERCE Tom SMITH Berry American Mathematicel Society Computer Science Department Rohm amp Hass Research Labs Oregon Software P O Box 6248 Brown Universi 727 Norristown Road 2340 SW Canyon Road Providence RI 02940 Box 1910 Spring Howe PA 19477 Portlend OR 97201 401 272 9500 Providence RI 02912 215 641 7875 503 226 7160 BLAIR John wasana PIZER Arnold SPIVAK Michael CALMA JACKSON Colvin W Department of Mathematics 2678 Woodridge Drive Ressorch and Development Computer Science Department University of Rochester Decatur GA 30033 212 inrer Apis Californie inst of Tech NY 14627 404 329 0372 iu Pasadeno CA 91125 PLASS Michael F anang io Klon Road CARNES Lanco 213 356 6245 o M TX ISO Ma Valey CA 94941 KNUTH Donald E BS Coe fal MA STROMQUIST Ralph 415 388 0053 e Sie
6. def stringeq i 2 xdef stringa i xdef stringb 2 gdef endap enda gdef endbp endb gdef compcharp compchar Venda 4 Test if at end of first string def enda if stringa gdef endbp nulitest else endbp Test if at end of second string def endb if stringb false gdef compcharp eise compcharp Compare next characters def compchar Apply First to stringa gt firsta Apply First to stringb gt firstb if firsta firstb Apply Rest to stringa gt stringa JMppiy Rest to stringb gt stringb else false gdef endap endap 4 When at end of first string 4 test if also at end of second def nulitest if stringb true else false 61 PROBLEMS FROM THE TEXARCANA CLASS ANSWERS AND ANOTHER PROBLEM These problems are from the videotaped TEXarcana Class taught by Don Knuth last March The solutions given here are based on the ones dis tributed in class Some parts of the solutions may depend on features which although installed in the current version of TEX at Stanford may not yet have been implemented elsewhere an attempt has been made to note such features Problem no 1 Type vskip 12pt noindent hide Allan Temko vskip 2pt noindent Architecture Critic To get Allan Temko Architecture Critic def hide i hbox to Opt hss 1 62 3 TUGboat Volume 2 No 3 Problem no 2 Type fancy
7. epsilon 0220B wz10 hOc w3 u lt d r seta 0221B w 10 h2n v2 d h6 Vr Meta 0222B wz10 h0O r theta 02238 4w 10 1 Mota 0224B w 10 k kappa 02258 wz12 XvSAdVi NriNa N Na NAA Mambda 02288 w 10 8 b2 b ru Mau 0227B ws13 h3S r Mau 0230B w 9 h0c v2 uc vi d bi b b0 ka baa vt u 0231B w 10 hO wi u w8 d vilda r wS a e pi 02328 w 12 h2 b v2 d u ro rho 0233B w 12 h2o vi d r u signa 02348 w i3 tau 0235B w 10 upsilon 0236B w 10 MERE phi 0237B w 10 x Mehi 0245B wi0 AhOoMXr iMd No partial 0260B 10 0 0 04118 04128 04136 04148 0415B 0416B 0417B 0421B 04228 0423B 04248 0426B 04308 0431B 04328 0433B 0435B 0437B 0441B 0442B 0445B 0447B 0450B 0451B 0457B IHHHHHEHIIH w 10 10 w 12 w i3 w 10 10 w 10 ws10 w 10 w 10 w 10 w 0 w 10 weld w 10 w12 v 10 w 14 w 10 w 10 w 10 ws14 wz10 w 10 w 10 w 10 w 10 w 10 wz10 10 w 10 w 10 w 10 w i0 w 10 w 10 w 10 w 10 w 12 w 16 w 16 w 10 wz12 12 w 18 w i0 w 12 w 10 ws10 w 10 w 10 w i2 w 14 ws9 w 10 w 10 w 10 w 10 w 16 w 18 w 16 w 16 TUGboat Volume 2 No 3 A g a b0 h2 nO 2 6 vaya Me psi h u ru Vonega I v2 u d Medot x times vi de u ast i relash vi uo d cire h0e w3 r d u pa n0 v3 r u d mp QWe oplus 0 b oninus INDO Notimes bi vi u d0 wS u r d odi
8. ter widths from PXL files rather than TFM files The purpose of the CHECKSUM is to ensure that ihe TFM files used by TEK when writing the DVI Ale are compatible with the PXL files the DVI to device program sees so if someone changes a font amp nd makes new TFMs but not new PXL files you ll have sorne way of knowing other than seeing ragged right margins In the places where DVITYP would print a mes sage indicating that Character C in Font F should be placed at location H V on the page where H and V are in RSUs the DVI to device program should cause character C to be put on the paper at the point closest to H V that the resolution of the device allows The important point is that the DVI to device program should not attempt to keep track of the current position on the page in device units since this will lead to big roundoff problems that will show up as ragged right margins Note again that the character widths are different things than pixel widths The width of the character A in CMR10 is say 6 7123 points independent of the representation of that character on the page For a 100 dot per inch device the raster representation of A might be 18 pixels wide while for a 200 dot per inch device the best representation might be 33 pixels wide Here is some more information to help clear up misunderstandings concerning magnification Much of this is taken from TpEX s errata list and is destined to be inc
9. 4 Here is a simple example Now is the time for all good men to come to the aid of their party Now is the time for all good men to come to the aid of their party Now ia the time for all good men to come to the aid of their party Now ie the time for all good men to come to the aid of their party Now is the time for all good men to come to the aid of their party Now is the time for all good men to come to the aid of their party And continue Here it is assumed that there is text extending across the full page width above or below the trans lations This macro must be modified if the text seg ments include multiple paragraphs A similar macro Now is the time for all good men to come to the aid of their party Now is the time for all good men to come to the aid of their party Now is the time for all good men to come to the aid of their party Now is the time for all good men to come to the aid of their party TUGboat Volume 2 No 3 could be used to redefine hsize if the entire text has this form Input Dependent Macro Redefinition Also in the last issue Mike Spivak asked about a pair of macros data and Mist Successive calls to data would save text that could later be retrieved by calling list so that list 1 would produce the parameter passed on the first call to data list 2 would produce the parameter passed on the second call to data and so on Macros to solve this problem are fairly stra
10. And just to be sure file name as the first line of each file will make it easier to check the disc copy Once files are safely on disc properly identified they undergo some editing as little as possible to ensure that they conform to TUGboat requirementa Of particular importance for compatibility is the use of a standard font set For TUGboat in fact for all the Society s TEX work our standard set is based on the one used for the book format TEX manual Appendix E p 152 except for font cnti10 as in basic tex Only font codes G through Z are free to be used for job specific fonts so if a TUGboat author has special font requirements he should note them in comment lines at the beginning of his file and if possible identify them by letters G Z To permit automatic cross referencing and inser tion of page numbers in the Table of Contents a ref erence is added just following the title which allows page numbers to be sent to a separate file n error in the second T of C page in vol 2 no 2 should give you an idea how this works when it s done right but here are the details anyhow In each file a line is inserted Mpagexref filnam which invokes the definition def pagexref 1 send9 def 1 curpage At the beginning of a TUGboat run the page number file from the previous run is read in is chcoded to type 0 for the duration so that these definitions really do become control sequences
11. PROCEDURES only 1 body is listed Also horizon tal and vertical movements are treated in much the same way so only one of these is detailed Our PASCAL compiler P SC20 allows the inclu sion of header files containing CONST and TYPE declarations This useful feature greatly reduces the risk of incompatible modifications being made to different modules Our header file TEXDIA H is listed in Appendix C after the driver BYTDIA PAS Our only real design decision was to accumulate movements TEX puts out a large number of redun dant movements e g successive DVI instructions might order an upward movement of 2 points fol lowed by a downward movement of 10 points To prevent the Diablo from doing a St Vitus dance we accumulate all movements until printing is im minent Thus a record is kept of the point realH realV on the page where the cursor actually is as well as the point H V where it should be if all movements to date had been implemented The actual position is only updated by making the appropriate horizontal and vertical movements when a print instruction is received Appendix A The 2 command files TEXPRE MIC Odefine 8 scratch Ocopy sysdep pas texpre pas ter pas s Ocopy ascii tbl s Ocopy sysdep str texpre str tex str s Qcopy texdia h mktfh pas mktfm pes 6 Ocopy mkfnt pas dvibyt pas bytdia pas s Ocopy diablo aux diablo tbl s Ocopy diablo tex basic tex 8 Ocopy tex mic s Oconnect 8
12. and the directory in which the TEXing is to be done With MIC s help we need only type in 2 com mands On first setting up TEX we type Odo texpre scratch This installs TEX in our public directory scratch To TEX a file say MATHS TEX supposing both ourselves and this file resident in the directory scratch gt we give the command Odo tex maths The output for the Diablo is written in the file MATHS DIA These 2 MIC files are listed in Appendix A since they provide a good summary of the relations be tween our numerous programs Tt is not necessary to study MICology in order to understand these files Suffice to say that lines start TUGboat Volume 2 No 3 ing with 6 represent commands normally entered at the terminal while lines starting with correspond to entries made in response to requests from within programs The Diablo table Most of our time and effort has gone into 2 modules the Diablo table and the driver Looking first at the table DIABLO TBL takes the form of a textfile with 1 line for each of the 5 X 128 640 characters in our 5 fonts The first 2 lines should make the pattern clear 0000B w 9 h3 bl v3 u d Ar Gamma 0001B w 10 h2 v3 d u r Delta The figure following w is the width of the character At present we take all characters to have the same height 6 vu and the same depth 0 vu For the meaning of vu see the next section It will be easy e
13. box subchartboz semicolon Fil EndDef wfil eject det funorvar TwoAlts WW function K var def fornaiparmgroup TAAlternatives Middle funorvar idlist colon W type identifier ALower AKI procedure N ARBM commal19 Define Parameter list save subchartbox hbox formalparagroup 1 again too complicated Optional lpar RAW senicolon boz subchartboz rpar Fil EndDeft end of Declaration Extras NvfilNeject Statement dof varorfunid TwoAlte H variable function identifier dof assignment varorfunid gets expression def procid W procedure identifier def actualargiist i1par NA MAM comma Miternatives Middle expression Lower procid rpar def proccali procid 0ptional actualargiist dof ifstatement K if expreesion Ki then statenent optional K else statement def casepart RBW comma constant colon statenent def cases Optional RAW semicolon casepart def casestatement K case expression KW of cases K end def whilestatonent KW while expression K do statement Adefrapoatetatenont WW repent A ARAN semicolon statement 50 WW until empression def toordomto TwoAlts UO to NK downto def forstatement KW for N varsable identifier gets ezpression toordamto expression K do statement def withetatement K with RA comma variable K do ateten
14. dats has so far received listitens is constructed with the undefined mac ros Na Wb Nc etc After Mist has selected the appropriate item Na is locally defined i e defined within a group to invoke aa b to in voke bb and so on through the ugly macro equivalences The selected macro is then invoked within the group that defines these equivalences To allow all this macrolist is really initialized to aa a bb b ce c dd d These macros also use the Apply First and Rest macros used by Patrick in DefineFont 59 Mist uses the recursion macros Brendan McKay described in the same issue of TUGboat The ob vious restriction that these macros are limited to 26 calls to data can of course be extended by reinitializing macrolist A less obvious restriction comes from the local equivalence of a and aa etc A macro defined with def within an argument text is usable only from within the same argument since the argument is invoked within a group gdef and xdef of course have more permanent effects This restriction can be surmounted by redefining list to explicitly test its argument and to call aa if the argument is 1 bb if it is 2 etc Unaesthetic as such an approach may be it is not much worse than the current definition of equivalences Note that a groupless if such as McKay and Spivak also dis cuss in the last issue must be used to avoid the same problem xdef listitems def data i Mf m
15. rjn chcode 15 5 def endrightjustify gdef rjn endrj def endrj chcode 15 5 penalty1000 vskip 12pt 64 TUGboat Volume 2 No 3 Problem no 6 Type How do you do this lineskip 2pt baselineskip 1 3ex vcenter halign hfil hfil er linedown Look at this strange pile qquad weenter halign hfil cr lineup And at this stranger one To get How do you do this PUO Der d ono a amegat cet WOSE chcode 44512 def linedom i gdef ans Linedown 1 def Linedown 1 if 1 gdef next ans else xdef ans ans 1 cr gdef next Linedown next def lineup 1 gdef ans Lineup 1 def Lineup 1 if 1 gdef next ans else xdef ans 1 cr ans gdef next Lineup next chcode 4453 How do you do it faster veenter halign hfil hfil er linedn Look at this strange pile def linedn i gdef ans Linedn 1 def Linedn 1 if 1 gdef next ans else gdef nans 1 cr gdef next ans Lndn next def Lndn 1 if 1 gdef next nans else gdef ans 1 cr gdef next nans Linedn next On the next page appears the Challenge problem presented to the TEXArcana attendees The solution will appear in the next issue kia seja this 3 Mar 1981 21 66 TUGboat Volume 2 No 3 C ha en ge Pro LI Cw 65 Wok pag o output elf I have all the eloquence of men or of angels but speak without love I am simply a gong booming or
16. the total effect was horrendous The book was unreadable of much lower quality than you would get using traditional human typesetting I had to find some way to correct this situation First I tried coercing TEX into doing the correct page formatting by adding formatting commands at places where it broke pages and placed figures incor rectly This proved to be very difficult The problem was that I could easily prevent TEX from breaking a page at a particular bad place but it was harder to ensure that it would break it at a good place I was never sure of the effect of adding any particular for matting command until I saw the text reformatted Coercing TEX involved endless experimentation just to get around the inadequacies of TEX s page format ting algorithm I realized quickly that this method was unsuitable I was spending my time fighting TEX trying to merge its page formatting with my aesthetics rather than worrying about the format ting of the book Rather than having both TEX and myself handle the page breaking and figure placement I decided to simplify things by doing all of the page breaking by myself To be exact I inserted an eject com mand every place that I wanted a page break and specified to TEX that it shouldn t do any page breaks itself So that I would not have to figure out by myself where all of the page breaks should go I de veloped a macro called bookmark which I inserted into each file containing a cha
17. 1 V stack SP SP SP 1 H stack SP SP SP 1 END PROCEDURE new page BEGIN write FF H 0 V 0 true H 0 true V 0 page no page no 1 END PROCEDURE store font VAR fnt file fnt store VAR i integer b byte f font range BEGIN i 0 b s0 f 1 WHILE WOT eof fnt file DO BEGIN char width f b fnt filet get fnt file char base f b i REPEAT font mem i fnt file get fnt file 1 i 1 UNTIL font mem 1 1 0 b s b 1 MOD 128 IF b 0 AND NOT eof fnt_file THEN f f 1 END END PROCEDURE change font VAR f font range ch char TUGboat Volume 2 No 3 BEGIN IF ch IN l r i a e t D THEN CASE ch OF x 1 1 tt f 5 END ELSE writeln tty Undefined font f used END BEGIN main initialise reset fnt file DIABLO FNT store font fnt file WHILE NOT eof AND b lt gt 131 DO BEGIN read b IF b 127 THEN BEGIN IF NOT printing THEN BEGIN move to H V printing true END i char base f b WHILE font mem i lt gt 0 DO BEGIN write chr font mem i 2 d si 1 END IF overprinting THEN BEGIN printing false overprinting false ELSE H H char width f b true H true H char width f b END ELSE IF 128 b AND b 153 THEN BEGIN printing false CASE b OF 128 NOP 129 BEGIN BOP FOR i 0 TO 10 DO
18. Computer met Depertment 401 212 9500 FUCHS Devid MORRIS Robert Margaret Jacks Hall 436 Department of Computer Science e Department Stanford C 94305 WHITHEY Ronald Stanford Unversity Boston ican Mathematical Society Stanford CA 94305 Boston MA 02125 SANNELLA Michael P O Bou 6248 415 497 1646 617 287 1900 ext 2545 Xerou PARC Province R1 02940 GOUCHER Reymond E MURPHY Timothy Ha Road American Mathematica Society Unversity of Dubin ZABALA Ignacio P O Bo 6248 School of Mathematics SAUTER John Deportment of Computer Sciance Prondence RI 02940 39 Tresty College 801128 Bates Road Stanford Univers 401 272 9500 Dubin 2 Iratend Merrimack NH 03054 Stanford CA 94305 77 HODGE D i Dubin 772941 sut 1983 603 424 1637 ZAPF H mone ee NICHOLS Monte C SHERROD Phi University of Minnesota Exploratory Chemistry Divesion Box 1577 Staton B D 6100 Oarmetedt Fed Rep Germany Minneapolis MN 55455 Sandia National Laboratoris 6313 Vanderbilt University 612 373 4599 Livermore CA 94550 Nes TN 37235 TIPPEL Richard 415 422 2906 615 322 2951 Massachusetts instituta of Technology HOWERTON Cherles P 545 Tech Square National Bureau of Standards PALAIS Richerd S SIEGMAN Anthony Cambridge MA 01239 Boulder Labs room 3552 Department of Methematics Ginzton Lab 35 325 South Brosdway Brandeis University Stenford University Boulder CO 80303 Waltham MA 02154 Stanford CA 94305 303 499 1000 ext 4433 On leave through June 1982 4
19. Contents November 1981 Addresses of Officers Authors and Others 2 Official Announcements svssisssssssessesos EIUS Kar Pana Ba 3 General Delivery Michael Spivak Message from the Chairman 3 Samuel B Whidden TUG Treasurer s Report REN bic eate Mus oe e a ens E Donald Knuth The Current State of Things eee n n 5 Tom Pierce TEX Users Group Winter 1982 Meeting January 11 12 1982 Cincinnati Ohio 7 Boftware Arthur Samuel PASCAL Coded TEX Errata sl 7 David Fuchs The Format of PXL Files s s sssisstestsvsseseisscoes 8 Output Devices John Sauter Sample of output from an IDS 640 13 Rilla Thedford Output Device Index eu rain es 14 Jim Mooney A Varian Output Driver in VAX VMS FORTRAN 14 Timothy Murphy DiabolioTEHK s e sss ss sssstsssesresseresssso 15 Site Reports David Fuchs News from the Home Front Stanford 21 CDC Cyber Michael J Frisch TEX Under the North Star AXE 22 DEC 10 and 20 Barbara Beeton A TUGboat Tour Excerpts from the TEXnician s Log 23 Hewlett Packard HP3000 Lance Carnes TEX for the HP3000 25 IBM 370 and related architectures Susan Plass TEX for the IBM 370
20. a brief outline of the changes we have made to PTEX in order to compile under Pascal VS to run on an IBM processor under MVS and to fix a few known CSD version bugs We have made no changes to TEX specifically to run under ORVYL TUGboat Volume 2 No 3 that was achieved merely by compiling TEX with an interactive version of Pascal VS 1 TEX a All integer subsets were changed to PACKED in teger subsets b All REALs were changed to SHORTREAL c EXTERN was changed to EXTERNAL throughout d OTHERS was changed to OTHERWISE throughout e INITPROCEDURE was changed to PROCEDURE INIT and a call to INIT was added as the first executed statement f In DEFINEFONT the label 0 on the statement LABEL 50 31 0 is never referenced causing a warning from Pascal VS this label was removed g In the loop from N 1 to 30 within LEXICALORER the initialization of TRUNCWORD 1 0 was added to the existing in itialization of HYPHENATIONWORD 2 TEXPRE Changes a through e of TEX above are iden tical for tie TEXPRE module f There are a few lines longer than 72 characters These were broken up rather than expand the MARGINS option to 80 g At the start of XENT the statement SWORD NULWORD was added h The following were added to INITSUF VAR I INTEGER FOR I O TO 115 DO SUFFIX I ALPHASET i The following were added to INITPREF VAR I INTEGER FOR I O TO 108 DO PREFIX I ALPHASET 3 SYSDEP Cha
21. a cymbal clashing elf have the gift of prophecy understanding all the mysteries there are and knowing everything and if I have faith in all its fulness to move mountains but without love then I am nothing at all elf I give away all that I possess piece by piece and if I even let them take my body to burn it but am without love it will do me no good whatever eLove is always patient and kind it is never jealous love is never boastful or conceited eit is never rude or selfish it does not take offence and is not resentful eLove takes no pleasure in other people s sins but delights in the truth eitis always ready to excuse to trust to hope and to endure whatever comes eLove does not come to an end But if there are gifts of prophecy the time will come when they must fail or the gift of languages it will not continue for Sem poe of 2R ever and knowledge for this too the time will come when it must fail eFor our knowledge is imperfect and our prophesying is imperfect ebut once perfection comes all imperfect things will disappear eWhen I was a child I used to talk like a child and think like a child and argue like a child but now I am a man all childish ways are put behind me eNow we are seeing a dim reflection in a mirror but then we shall be seeing face to face The knowledge that I have now is imperfect but then I shall know as fully as I am known eln short there are three things that last faith hop
22. argument to a figure generating macro In most cases this produced a good looking figure with just enough blank space to paste in the appropriate drawing However there were a fair number of figures which didn t have labels for the subfigures Because of the way that TEX macros are implemented there is no way for a macro to detect when it is given a null argument When given a null label argument my figure formatting macros still al located space for a label which resulted in a figure with too much space Eventually I solved this prob lem by subtracting an appropriate amount from the size I gave as an argument to the figure macro to compensate for the extra space added for the non existent label This was a rather inelegant solution In retrospect it would have been better for me to have defined separate macros for figures with labels and figures without labels The best solution if TEX had had the capability would have been to define a figure macro that could detect when it is given a null label and format the figure accordingly TEX could be greatly improved by extending its macro facility so that a macro could test its arguments 70 PAGE BREAKING AND HIGH LEVEL FORMATTING As I have mentioned before I didn t encounter many problems with formatting most of the in dividual objects in the book To format a figure or a program listing or an equation I just had to use the appropriate macro from the set I developed Admitt
23. block When reading one of these tapes we assume that no carriage return line feeds are present and that all terminal spaces can be stripped from each record We therefore recommend that input lines not end with the XJ control sequence since it cannot be dis tinguished from cr after stripping in practice this has occurred only rarely and was easy to cor rect although inconvenient Another tape problem is what to do about labels The utility program we use to read foreign tapes isn t very clear about label formats so the easiest thing to do is omit labels We have just successfully read a IBM 370 generated tape with ANSI standard labels which are not among those defined in the utility manual and for which Susan Plass had to try long and hard to find a description and make several attempts before a good tape was actually written we finally treated the labels as a separate file which was discarded once the real file was safely on disc Suggestion forget about labels They re probably really necessary only for multi volume tapes and no single TEX file should be that big anyhow it would probably be big enough to contain the entire Encyclopedia Britannica Finally there is the matter of identifying what is on the tape It would be appreciated if every tape were accompanied by a transmittal form one is bound into every issue of TUGboat and by a list TUGboat Volume 2 No 3 of what files the tape contains
24. file However if this word is zero no validity check will be made In general this number will appear to contain 32 bits of nonsense Next is an integer representing 1000 times the magnification factor at which this font was produced If the magnification factor is XXXX the extension to the name of this PXL file should be XXXXPXL Next comes the design size just as in the TFM file in units of FIXes 27 unmagnified points remember that there are 72 27 points in an inch The design size should also be indicated by the last characters of the PXL s file name The design size is not affected by the magnification For instance if the example font is CMR5 at 1 5 times regular size then the PXL file would be called CMR5 1500PXL word 12513 would contain 1500 and word 12514 would contain 5 220 The word after the design size should be the pointer to the Directory Information and the word after that should be the final PXL ID word Thus if the number of words in the PXL file is p i e word numbers zero through p 1 then the Directory Information Pointer should equal p 512 5 All of the PXL file from word 1 up to the Font Directory contains Raster Descriptions The Raster Description of a character is contained in consecu tive words Bits containing a 1 correspond to black pixels The leftmost pixel of the top row ofa character s pixel representation corresponds to the most significant bit in the first word
25. font a CMR10 at 10pt assuming that the designer of CMR10 has indeed told TEX that CMR10 is a 10 point font Caveat This extension allows the TEX user to request any magnification of any font In general only certain standard magnifications of fonts will be available at most raster printers while most high resolution devices have scalable fonts The user of TEX at any particular site must be careful to request only those fonts that the printer can handle Caveat As mentioned above you shouldn t change the value of parameter 12 in the middle of a run TEX uses the value of parameter 12 in the following three ways i Whenever the scanner sees a true distance it divides by the current magnification ii At the end of every page TEX s output module may scale ali distances by the current magnification while converting this page to for mat for an output device this doesn t happen with DVI output iii At the very end of the TEX run the output module uses the current magnification to scale the requested sizes of all fonts Given this state of affairs it is best not to change parameter 12 once any true distance has been scanned and once any page has been output Some device drivers give the user the option of overriding the magnification at which the TEX job was run Note that running a given TEX job with magnify 2000 is not the same as running it with magnify 1000 and then asking the driver to over ride the
26. for mat a book they had written Turtle Geometry The Computer as a Medium for Exploring Mathe matics They had used a computer to write and edit the book the text was stored on line and they wanted me to use TEX to produce the final formatted copy In part they hoped that using a computer for matter would be cheaper than traditional typeset ting However they were also interested in the ex periment of publishing a computer formatted book and curious about the ways that computer format ting systems could change the relationship between authors and publishers giving an author more con trol over a book When I was hired I didn t know anything about TEX or about book publishing In the process of formatting the book which took more than a year I learned a lot about TEX about the prob lems associated with book quality formatting and about the interaction of computer formatters with the world of book publishing This article is an at tempt to record my experiences formatting Turtle Geometry and some thoughts I have had concerning computer formatters in general I hope that infor mation will be useful to other people who are try ing to format large documents such as books us ing computer formatters I will try to talk about general problems I encountered rather than about the details of how I fixed each problem Also I will try to be as simple as possible you won t need to know anything about TEK to read this article
27. formatting at a higher level while still retaining control over the formatting People who design text formatting systems need to worry about this issue One way that format ters could be improved is by giving more control to the user at different levels of detail so that it is not necessary to specify document formatting at more than the minimum amount of specificity Looking at TEX in particular one way to improve it would be to introduce smarter boxes objects that are not quite as explicit and low level as boxes are in TEX For example you could have an object called a paragraph box which contains text that should be formatted as a paragraph Eventually this may not be formatted as a single rectangular box the paragraph may eventually extend across several pages Without explicitly specifying the ex act formatting of every character in the paragraph you could express parameters appropriate to the level of abstraction of a paragraph such as line length degree of raggedness whether the paragraph can be broken etc To format any particular object in a document simply express it in terms of a for matter object which deals with the correct level of abstraction One problem with implementing this scheme is that it could lead to a complicated formatting lan guage with an unmanageably large number of ob jects defined A way to deal with this is to only define a few objects which can be used to specify formatting at di
28. found that most of our problems were due to lack of experience with Pascal and machine dependencies in Pascal data representation The DOC listings were essential we are impressed with their quality and completeness Compilation Problems Source Configuration After reviewing the DOC listing and some code samples in the UNDOC version we performed some tests to determine how some potential problem areas are handled by the Berkeley compiler After this analysis we made some basic decisions A preproces sor would be developed to perform some desired source transformations separate compilation units were desired and the SYSDEP program would be divided into smaller compilation units A simple lex program was prepared to do the source trans formations it is referred to as pedit in the fol lowing discussion The decision to use a preproces sor was strongly influenced by the regularity of the UNDOC version if some other source form is used the preprocessor might not be so simple The separate compilation unit decision was based on compilation time and the expectation that we would be doing a lot of compilations of areas of SYSDEP Following are the observations and the approach adopted to cope The type allocation model used by Berkeley is the following char 8bits This type will perform as expected as long as the value range used is 0 127 real 64bits integer 8 16 or 32bits Integers are signed as stated in the Repo
29. gt X Relief extreme dispersion resembles horizontal dispersion o 2 105 5 yellow B 2 32 2 yellow q 2 65 2 orange 2V meoa 929 2V ate 88 TUGboat Volume 2 No 3 ok ko k s k k x Problems Send Submissions to Lynne A Price TUG Macro Coordinator Calma R amp D 212 Gibraltar Dr Sunnyvale CA 94086 Balancing Columns of Text and Translation In the last issue Johnny Stovall asked about a macro that could adjust the width of each column of two column output so that the lengths of the two columns will be equal His application involves typesetting original texts in parallel with transla tions As long as reliable estimates of the relative length of the two segments are available a simple technique can be used varunit can be set to the width available for text in both columns excluding margins and the actual width of each column can then be set in terms of a percentage of vu The following macro illustrates this approach us ing hbox par Minput basic varunit in 4 Space available for both 4 columns exclusive of margins def intercolumnspacing hskip 5in X Arguments to trans are percentages of total width for first column contents of first column percentage of total widtb for second column and contents of second column respectively The two numbers should sum to 100 def trans 1 2 384 hbox hbox par 0 ivu 2 intercolumnspacing hbox par 0 3vu
30. has succeeded in running TEX compiled under the Berkeley VAX UNIX Pascal Compiler By the time you read this I hope we will have CIT s work at test Bites and be working toward a clean public distribu tion through one or another traditional UNIX dis tribution arrangement The work at CIT was done by Calvin Jackson whose report I have included below slightly edited Following Calvin s report is one on device driver work at Brown University TEK AT CALTECH Calvin Jackson We have PTEX running on the VAX 780 at the Computer Science Department of CalTech The operating system is Berkeley UNIX Version 4 0 We have compiled with Version 4 1 and corrected a minor problem an octal constant gt maxint We acquired a version of PTEX via the ARPANET in May 1981 after the TEX workshop at Stanford In July we had DVI output consistent with Stanford test cases new version of TEX was retrieved from Stanford in July and approximately 6 hours was required to make the local modifications and produce acceptable test results The Department has a DEC 20 and a VAX 780 Output devices are a Trilog C 100 100bpi VAX XGP 200bpi DEC 20 Applicon plotter 125bpi tape and various HP plotters Some specialized graphics terminals are also available 29 Our experiences with PTEX are similiar to those reported in previous issues of TUGboat We agree with many published suggestions regarding better tutorial information about SYSDEP concepts We
31. it still requires the user to specify the formatting in excruciating detail In general I would characterize TEX by saying that its output is good but its input is bad It is possible to produce beautifully formatted copy but the specifications necessary to achieve this are very complex Rather than explicitly specifying the exact formatting for every object in a document TEX provides a macro facility which allows one to en TUGboat Volume 2 No 3 capsulate and name a sequence of commonly used formatting specifications and to refer to them by using the macro name TEX s macros are imple mented using simple text substitution when you reference a macro TEX acts as if the macro text were substituted for the macro reference Macros can be defined to take arguments which are in serted into the text of the macro in the same way that the macro is inserted into the text file It was obvious that I should use macros to specify all of the different objects that would appear in Turtle Geometry I began creating a file of mac ros Initially they were very simple and I was able to get them working very quickly I gradually refined them changing the macro definitions until they fulfilled the specifications for the book I had a lot of problems using macros because of the way that they are implemented in TEX In most cases simple text substitution worked well but sometimes I wished that it were possible to write smarter m
32. macros take an hlist as a parameter box it and then take a little off of the top or the bottom Look at Appendix B to see how these can be used TUGboat Volume 2 No 3 41 Appendix A Listing of SynChart TEX XQ Beginning of SynChart TEX X editor s note fonts have been adjusted to conform to TUGboat usage the original values are retained commented out Mont G dragoni0 X Mont MANFNT X font U CNTTS 5 Mont c CMR8 X4 The following macros declare how white space is treated def Ignorel inebreaks chcode 15 9 chcode 11 9 def IgnorefhiteSpace chcode 15 9 chcode 11 9 chcode 4079 def Dont IgnorewhiteSpace cheode 15 5 chcode 11 10 chcode 40 10 MignorefhiteSpace so the macro definitions may be freely formatted def NonterminalFont c font to use for nonterminal symbols def TerminalFont U X font to use for terminal symbols def GraphicFont gt X font to get quarter circles from def GraphicFont 6 X font to get quarter circles from should have characters a b c and d like the DRAGON font in the metafont manual The MLeftirrow RightArrow and ArrowLine macros define the stems 4 that get put on each terminal or nonterminal bor The appropriate arrow is put on the entry side of each box and MArrowLine is put on the exit side 4 to balance out the arrow These definitions supply a rather small arrow with a long stem using characters from the standard CMSY10 fon
33. of dots using the graphics mode on the Diablo In effect this would make the Diablo analogous to amp digitalised type setter albeit one of very low resolu tion Our calculations seemed to show that tbe third solution would be impracticably time consuming each page taking more than half an hour to put out We hope to implement the first solution shortly 16 This could presumably give output of quite good quality But we began by writing amp driver to the second specification and that is what is described here Minimal font requirements for TEX TEX can be run with only 1 font presumably roman provided the text does not include mathe matical formulae If full mathematical mode is re quired so that all the control sequences in the TEX manual can be used then 10 fonts must be supplied namely 3 roman fonts for ordinary size acript size and script script size 3 italic and 3 symbol fonts similarly and 1 font for outsize characters including those built up from smaller parts However the fonts for different sizes need not really be different e g roman script and roman script script may well be the same But roman and italic cannot coin cide since entirely different characters occur in cor responding places on the 2 fonts Thus the minimal number of fonts needed is 4 roman italic symbol and ex for extra large characters We provide these 4 plus a typewriter font which allows us to print files e g of m
34. pre release state Release and user support encouragement are key items We desire to have equivalent facilities on the DEC 20 an effort has been started to host PTEX on that machine We plan to retrieve METAFONT and attempt to host it on the DEC 20 k x x x x 5 THE STATUS OF VAX TEX AT BROWN Janet Incerpi We received a tape from Calvin Jackson contain ing some TFM files and the TEX source and binary We were able to get TEX running simply by read ing the tape and putting the files in the directories specified Since we had already installed VNT files and debugged software to take DVI files and send output to the Benson Varian see TUGboat vol 2 no 1 p 49 we were able to print papers within a few days lt was necessary to change the pro grams DVIVER and VERSER to handle the new DVI file format We have not recompiled TEX we are just running the binary we received but don t expect recompiling to be a problem VAX VMS SITE REPORT M C Nichols Sandia National Laboratories There are now 40 sites that have received the Oregon Software VAX VMS version of TEX The VMS group is presently in a holding pattern while deciding whether to bring up an intermediate ver sion of TEX the current VMS version is the one which existed at Stanford as of 11 80 it uses tfx fonts rather than tfm ones or to wait for the most recent Pascal version Rumor has it that the most TUGboat Volume 2 No 3 recent version will
35. the book designer were not computer scientists they were mainly interested in produc ing a book However they were intrigued by the idea of using computer formatting system instead of traditional typesetting and were willing to par ticipate in the experiment of formatting the whole book by computer They made a few things clear first the quality of Turtle Geometry must not suffer as a result of doing the formatting by computer In the past a few people have published books mainly computer science textbooks formatted using primi tive text formatters and low quality printers which looked horrible and were impossible to read The MIT Press was not willing to publish a book of such low quality I was expected to produce computer generated output fine enough so that when it was photographed and printed the book it would be virtually indistinguishable from a book typeset us ing the normal methods They were not willing to sacrifice quality for the sake of our experiment A second condition was that they did not want to put more work into this book then they would have if it was typeset normally There would be little reason to use the computer if it took more work on their part Within these restrictions however they were willing to be flexible They were interested in what we could do using a computer formatting system The book designer gave me a set of specifications written on a standard form This in cluded such informat
36. to be instead TEX I did this because I didn t want the administrative hassle of setting up TEX as a top level directory so instead I put TEX into sub directory and defined the logical name TEX to point to it I recommend this to all users TUGboat Volume 2 No 3 of TEX on VMS since it makes using TEX more con venient I had one problem with TEX I compiled SYSDEP with CHECK and sometimes when a font 1 get a subrange error in MAKEPTS I am looking forward to the final version of TEX for the VAX 11 which will let me run the fancy macro packages published in TUGboat and let me build font tables for my low resolution printer Keep up the good work TEX fans and from now on count me in John Sauter 801128 Bates Road Merrimack NH 03054 603 424 7637 Computer VAX 11 Output Device IDS 460 Application TEX posters Editor s note The hard copy of this report printed on the aforementioned IDS 460 is too appealing not to share with the readership One page of 44 is reprinted as an exhibit on page 13 k k k x Fonts 5 k 4 k x k k X X FONT UPDATE Ronald Whitney Probably the most important development con cerning fonts since the last issue of TUGboat is the limited access that TEX users now have to the Autologic and Mergenthaler fonts see the article by Fuchs page 21 While this is very good news to those with APS 5 s and Linotron 202 s and at least a point of leverag
37. will be pretty close to the finished product hardcover book will be published containing both the manual and the complete program documentation The manual by itself will also be published separately in paperback Naturally I want to make sure that no bugs are present in either the manual or the system so I will be distributing numerous preprints of all the matrial for comments and testing until a high level of confidence has been reached The present implementations of TEX in SAIL and in PASCAL seem to be quite stable With thousands of users many of whom arc quite sophisticated no bugs have been reported for several months The new implementation will make the present ones obsolete of course but we are still distributing copies of the current implementations to new users At the moment I am completing the development of a new documentation system call WEB This is a greatly improved version of the 1979 DOC UNDOC TEXDOC system used for the first implementation of TEX in PASCAL the new names are WEB TANGLE WEAVE Basically the WEB language describes a program s structure using a mixture of TEX and PASCAL that can be considered as an extension of both languages to do much morc than either language can do separately The TANGLE program inputs a WEB description and rearranges everything so that a syntactically correct PASCAL program is obtained as output The WEAVE program combines the TEX and PASCAL portions of WEB description with TEX for
38. 0 74 76 A Keller D 2 A 16 18 36 M Dfar I 67 93 IMi 94 97 L Price P Milligan L Price P Milligan 37 BUBBLES A TEXTENSION IN SEARCH OF A TEXPERT Timothy Murphy Trinity College Dublin Preamble The bubble notation used in particle physics is identical in format with a notation for tensors due to the relativist Roger Penrose This language is strictly formalised with the possible diagrams governed by a few simple rules In effect a diagram consists of a number of boxes joined together by lines A TEX extension is proposed in which Penrose or bubble diagrams can be displayed in exactly the same way as mathematical formulae Analysis of the notation There are 2 elements in the diagrams First there are the tensors or bubbles Each of these consists of a container of some kind usually a rectangle or a circle Inside there may be an iden tifying name or symbol Emerging from the perimeters of these containers are the second element of the diagrams the arms An arm may join 2 tensors or it may extend to the edge of the diagram The relative positions of the arms on a tensor are significant e g if the tensor T is represented by a rectangle with 2 upper arms and 1 lower then the left upper arm must be distinguished from the right upper arm and both are quite different from the lower arm If only that sought for TEXpert could tell me how to replace this pedantic description of a box by a m
39. 000000000 As an example of the case where the Pixel Width is greater than 32 consider a character with Pixel Width 40 and Pixel Height 30 The first word of its Raster Description contains the the leftmost 32 pixels of the top row in the character The next word of the Raster Description contains the remaining 8 pixels of the first row of the character in its most significant 8 bits with all remaining bits zero The third word contains the left 32 pixels of the second row of the character etc So each row takes 2 words and there are 30 rows so the Raster Description of this character requires 60 words Finally some implementation notes and advice for DVI to device program writers First please note that PXL files supersede our older raster description VNT files One notable difference is that VNT files claimed to have two representations for each charac ter one being the 90 degree rotation of the other While a rotated copy of every character is useful in many circumstances there is no reason that installa tions using only one character orientation should be burdened with so much wasted space METAFONT outputs PXL files as described above and there is a separate utility that can read a PXL file and write a rotated version into a new PXL file Naming con ventions to keep various rotations of the same font straight are currently under consideration Another item still under consideration is alternate packing schemes You
40. 1 END PROCEDURE vert tab b byte PROCEDURE initialise BEGIN BS chr 8 HT chr 9 LF chr 10 VT chr 11 FF chr 13 ESC chr 27 RS chr 30 US chr 81 page no 0 SP 0 hmi reset vmi reset END PROCEDURE read 2 bytes VAR p pts PROCEDURE read 3 bytes VAR p pts PROCEDURE read 4 bytes VAR p pts VAR c d e 2 byte BEGIN read c d e f p c 256 d e 2 256 256 IF c 128 THEN p p 2564256 END 7 PROCEDURE move to H V pts VAR xx hb hhq hhr yy vv vvq vvr integer BEGIN xx hu from pts H true H IF 0 THEN IF abs xx lt 127 THEN BEGIN hmi set abs xx IF xz gt 0 THEN write ELSE write BS true H 7 true H hu to pts xx hmi reset ELSE BEGIN hh hu from pts H H m mm pn a Te I a CIO ME 20 PROCEDURE hor line length p pts PROCEDURE vert line length p pts VAR yy yya yyr i integer BEGIN yy vu from pts V p true V yy DIV 4 yyr yy MOD 4 hmi set 0 vmi set yyr write LF vai set 4 FOR i 1 TO yyq DO write LP V Vep true V true V vu to pts yy hmi reset vmi reset END PROCEDURE push stack PROCEDURE pop stack BEGIN IF SP 6 THEN writeln tty Stack exhausted w 2 stack SP SP SP 1 2 etack SP SP SP 1 y stack SP SP SP 1 x etack SP SP SP
41. 15 491 0222 TUGbost the newsletter of the TEX Users Group TUG is published irregularly for TUG by the American Mathematical Society P O Box 6248 Providence RI 02940 Annual dues for individual members of TUG 15 00 for 1982 include one subscription to TUGboat Applications for membership in TUG should be addressed to the TEX Users Group c o American Mathematical Society P O Box 1571 Annex Station Providence RI 02901 applications must be accompanied by payment Manuscripts should be submitted to the TUGboat Editor Robert Welland Department of Mathematics North western University 2033 Sheridan Road Evanston IL 60201 subrnissions to the macros and problems columns should be sent to Lynne Price CALMA Research amp Development 212 Gibraltar Drive Sunnyvale CA 94086 items submitted on magnetic tape should be addressed to Barbara Beeton American Mathematical Society P O Box 6248 Providence RI 02940 Submissions to TUGboat are for the most part reproduced with minimal editing Any questions regarding the content or accuracy of particular items should be directed to the authors TUGbost Volume 2 No 3 OFFICIAL ANNOUNCEMENTS TUG Meeting January 11 12 1982 Cincinnati Ohio A general meeting of the TEX Users Group will be held at Stouffer s Cincinnati Towers on Monday and Tuesday January 11 12 1982 All members are urged to attend For more details see the article by Tom Pierce on page 7 Individual Membersbi
42. 44 The most important are the following hashsize 1009 memsize 32768 varsize 11500 One or more of these changes may by now have been made in the official SAIL ver sion at Stanford In the SAIL implementation of TEX memsize is restricted to a maximum of 215 this will be lifted in Pascal TEX but we won t be using that un til the definitive version is published varsize is effectively a subset of memsize and therefore the actual capacity of memsize is really only about 21 200 All these values represent 36 bit words on our DECSystem 2060 The original value of var size was 17 000 but much of our work involves large pages of small type and being unable to in crease the absolute value of memsize to avoid ex ceeding it we had to increase its capacity by reduc ing varsize hashsize can be no larger than 2 9 and Don Knuth recommended that its assigned value be a prime it used to be 797 he suggested 1 009 equal to roman MIX of which he is particularly fond since he finished TEXing Volume 2 of The Art of Computer Programming TEX manual Appendix E pp 161f These changes must be made in the SAIL or Pascal source and the modules recom piled To provide more facts on just how much of hashize varsize and memsize are required by troublesome jobs we ve also created a diagnostic version of TEX which reports at the end of each completed output page and at each occurrence of ddt the current and maxim
43. And please enclose 25 00 if you can since that will defray our expenses of making and sending the tape DEK pw TUGboat Volume 2 No 3 TEX USERS GROUP 1982 WINTER MEETING Monday and Tuesday January 11 12 1982 Stouffer s Cincinnati Towers Cincinnati Ohio A TEX Users Group meeting will be held to dis cuss TEX issues of general interest The Steering Committee will also meet with the membership to discuss dues and the future development of the Users Group The meeting will cover three areas of interest in Pascal with demonstrations of TEX on the Canon Laser Beam Printer macro packages both development and ex change methods and output devices and interfaces Manufacturers of phototypesetters are invited to dis cuss their equipment and its TEX compatibilities Seminars for the different computer architecture groups will be mediated by the Site Coordinators Donald Knuth will speak on a subject yet to be decided Other members of the Stanford group will also be present both as speakers and to participate in computer and output device sessions The first copies of version 0 of The Joy of TEX the 4MS TEX manual are expected to be available for sale Pre register early as the hotel reservation dead line is December 15 1981 A meeting registration form is included with this iasue For additional in formation contact Thomas Pierce 82 Winter Meeting Coordinator Rohm and Haas Research Laborator
44. B until you can get TANGLE to reproduce itself Then you make the same changes to the system dependent parts of WEAVE WEB Then you can use TANGLE to create a working program WEAVE PAS Then you can use WEAVE to create the files WEAVE TEX and TANGLE TEX from which the TEX compiler that you now have will generate beautiful documenta tion listing Next year when you get TEX WEB your job will be to make similar changes to its system dependent parts after which WEAVE and TANGLE will produce the TEX TEX and TEX PAS files you need to get TEX82 going Our preliminary experiments with software generation using WEB have proved to be quite successful so you may in fact get some use out of this before TEX82 arrives Of course the WEB system will only be a few wecks old in mid November so you will also be able to help us diagnose any bugs that it may contain if you are interested I hope to have TEX WEB ready for testing by the end of this year and to have a draft of the new manual done by the end of January After TEX is finished the same will be done for METAFONT but that will take some time Now I have a question for you Do you want to be one of the guinea pigs who reccive the first WEB system in November If so please send a letter as soon as possible to Dr Arthur Samuel Dept of Computer Science Stanford University Stanford CA 94305 telling a where to send the material b if you can get it over the ARPANET or if a tape should be sent
45. HorzAlternative else gdef HAlt HorzAlternstive MALL def HorzAlternative def HorzAlternative MiddlelorzAlternative FirstHorzAilternative AllocBox TopTrack AllocBox BotTrack save TopTrack null save BotTrack nuli save0 hbox 1 wbox box TopTrack hboz vtop box0 boz BotTrack def FirstHorzAlternative 1 save0 hbox QLine 1 1 save TopTrack hbox box TopTrack ForwQ hbox to 1wd0 II F11 save BotTrack bbox box BotTrack Forw hskip 1wd0 IV BackQ Q1ine LinetoTop box0 LinetoBot def MiddleHorzAlternative 1 eave0 bbox II1 1 I save TopTrack hbox box TopTrack I hbox to twd0 BackQ Fil save BotTrack hbor boxz BotTrack III hbox to 1wd0 F11 BackQ ForwQ LinetoTop box0 LinetoBot def LastHorzAlternative 1 save0 hbbor I11 1 Q Line Backg save TopTrack hbox box TopTrack I save BotTrack hbor box BotTrack III hbox to 1ed0 Fi1 IV ForwQ LinetoTop box0 LinetoBot II def SyntazChart par varunit QThickness lineskipopt baselineskip ipt parfillskip Opt plue 3000pt parskip QQsize plus Qsize IgnoreLinebreaks LeftToRi ght DontignoreWhiteSpace X so the user can space significantly KAN End of SynChart TEX TUGboat Volume 2 No 3 41 Appendix B Here is a non trivial example of the use of the syntax chart macros XXXWXX Beginning of PascalSyntax TEX Mont K CMSSB for the keywords in the chart SyntaxChart AllocBox subchartboz for saving pieces of th
46. Line defines one twice as long Wii defines a line that stretches like glue with a normal width of zero and the same stretchability as til NF111 is similar but with the stretchability of an Vhfi11 Each component of a repetition or vertical alter nation construction implicitly has F11 on each side 80 if the components are not all the same width the available space in each of the shorter ones will be distributed evenly between the embedded F118 and the ends of the component By using these macros in various combinations you can get any kind of horizontal spacing you want When a terminal box contains only special character or only upper case letters the result looks best when the contents are centered vertically in the box this is the default However if the same thing is done for lower case letters the baselines of the words in different boxes may not line up due to the pattern of ascenders and descenders The way to fix this is by using a strut which is a zero width box whose height and depth match the extremes of the font If the keywords in your language are in lower case say Strut after the keyword in the ter minal box or better yet define a macro that does this as in Appendix B Struts are already included in nonterminal boxes because these contain mostly lower case letters Sometimes two rows would look better if they were moved a little bit closer together You can do this by using NTrinTop or NTrimBot these
47. NTRY and TABLEREADOUTTYPE so as to be com patible with the corresponding SYSDEP decla rations 7 The name INPUTFILE was used in TEX both as a procedure name and as an identifier of an enumerated type To allow compilation the identifier name was changed 8 FILES OF ASCII had to be changed to FILES OF CHAR 9 The ORD and CHR functions in Imperial College Pascal map to and from the EBCDIC character encoding scheme This conflicted with TgX s expectations of an internal ASCII 28 encoding of all characters Two translation ar rays were utilized to convert characters to and from ASCII thus satisfying TpEX s needs 10 PRINTOCTAL was altered so as to work on a 32 bit machine 11 The procedure CONNECT was used to link internal Pascal file names to real world files replacing TEX s multiple parameter RESET and REWRITE procedures 12 All code that looked for an end of line charac ter usually a carriage return was changed to utilise the EOLN function This was neces sary due to the record oriented structure of IBM files Likewise instead of writing a carriage return onto a file to signify an end of line the procedure WRITELN was used to finish off a record and transfer it to a file 13 Imperial College does not pack records as ex pected in the SYSDEP module code To overcome this the PTEXINI TBL file was changed from a file of INTEGER to a file of MEMORYWORD extra routines were intro duced to build corr
48. PXL This means that the PXL file represents the font FOO in an 8 point face for a 200 dot per inch device with a magnification of 1 If you don t fully understand the term magnification as it is used in the TEX world the rest of this paragraph might not make a lot of sense The end of this document contains more information on magnified fonts If we also had a 100 dot per inch device we would also want to have the file FOO8 0500PXL which we can get by asking METAFONT nicely This PXL file could also be used by the higher resolution device s driver for any TEX job that asked for font B FO008 at Apt or one that used font C F008 but then got TEXed with magnification 500 or one that used font C F008 but then got spooled with magnification 500 Note that we are assuming that the font FOO is like the CM family in that it does not scale propor tionately in different point sizes we are only talking about the 8 point face If it turns out that 8 point FOO magnified by 1 5 is exactly the same as 12 point FOO then we can also use FOO12 1000PXL in place of FOO8 1500PXL and so forth For fonts that scale proportionately like this a point size should not be included as part of the font name and FOO 1000PXL is by convention the 10 point size of FOO for a 200 dot per inch machine Now for an explanation of where the bits go A PXL file is considered to be a series of 32 bit words on 36 bit machines the four low order bits of each
49. Senator and Mrs Stanford had reserved to themselves control of the University s affairs during their lifetimes including the parceling out of all the money that could be wisely used Mrs Stanford had remained in her husband s shadow on opening day she could not bring herself to deliver the short speech she had written out But following the death of the Senator She at age 65 took on full responsibility for the University with unsuspected strength To get So and Mrs Stanford had reserved to themselves control of the University s affairs during their lifetimes including the parceling out of all the money that could be wisely used Mrs Stanford had remained in her husband s shadow on opening day she could not bring her self to deliver the short speech she had written out But following the death of the Senator she at age 65 took on full responsibility for the University with unsuspected strength Mont H cmr10 at 30pt def fancy 1 H saveO hbox chop to Opt hbox lower i2pt hbox 1 hskip 1em hangindent 1wd0 for 2 noindent hide box0 hskip iem The font specified here requires that magnification be implemented it is also possible to use car30 if that is available At the AMS neither is available for the Alphatype on which this page was prepared and the large S has been obtained from another source and pasted in Note the use of hide in the last line of this solution alternatively this l
50. ackQ else Mf O RowsToGo else LinetoBot II BackQ nfil Empty cr def state L def Repeat Body 1 save0 hboxr 1 Empty xdef RowsToGo count AltCtr save L vbox box L hbozx vrule height ht0 depth idpO width Opt Mf U etate LinetoTop ITI BackQ else M O RowsToGo else LinetoBot 11 BackQ QLine save R vbox box R bbox vrule height ihtO depth idpO width Opt AQLine Mit U state BackQ IV LinetoTop else Mi O RowsToGo else BackQ I LinetoBot Fil unboz0 Fil cr def state L def LowerAlternative 1 save0 hbor 1 xdef RowsToGo count AltCtr save L hbox vtop box L bbox vrule height 1ht0 depth idpO width Opt Mf O RowsToGo LinetoTop slse Fi1VertLine 111 aave R bboz vtop boz R hboz vrule height 1ht0 depth idpO width Opt MIVAif 0 RowsToGo LinetoTop else FilVertLine Fil unbox0 Fil Empty cr der state L X editor s note page break for TUGboat publication 46 TUGboat Volume 2 No 3 Horizontal alternatives work in much the same way as the others N but are a little simpler because we don t have to worry about a Middle X and we can just use an bbox instead of vboring an Nbaliga and fooling around with the position of the baseline daf HorzAlternatives i 1 AllocCtr AltCtr setcount AltCtr 0 def Alternative i advcount Altctr 1 count the number of alternatives def Alternative advcount AltCtr by 1 xdef AlteToGo count AltCtr if O AltsToGo gdef HAlt Last
51. acro column is off to a good start Readers pes i dan 1 1 57 61 70 A Keller are commenting on published macros as well 28 Columns multiple i2 A 38 40 M Diar sending in descriptions of problems they have en Comparison of integral values Il 119 120 P Miligen L Price countered However no one has yet submitted solu counters pedo til 60 77 A Keller tions to posed questions og Mae MAH HA 120 P Milligen L Price Errata Deferred output I1 60 86 86 A Keller Ti J Division MI B McKey ere are two minor corrections u a i a t IMO Up lished in TUGboat Vol 2 No 2 E MIU ee 1 Mike Spivak notes a subtle error in McKay s fi definitions for t and 4 Since the macros classify deciaring families of a these characters as type 13 spaces after them are point size ae not ignored even in math mode As a result definition Ml 119 P Milligan L Price 21 x 1 exa Ko ges can d 12 44 45 P Milligan i Footnotes 5 252 pego I1 56 71 72 A Koller eve 2r EE REOS 1 2 42425 M Diaz because the superscript is the space For AMS TEX VELIM TH M Daz Mike has fixed this problem by having f first check CMa gt gt 1244 O McKay whether 1 is a space using compare 41 ia na ERa Mahar 2 When used in horisontal mode Patrick comparison af integral vlan Ii 119 120 P Milligan L Price Milligan s Apply macro may cause extra space to Lies Ma A L2 46 B McKay be inserted The carriag
52. acrolist send9 Error Maximum number of data items exceeded else Apply First to macrolist gt macro Get macro name Apply Rest to macrolist gt macrolist Remove code from list Apply First to macrolist macroprime Get macro name Apply Rest to macrolist gt macrolist 56 Remove code from list xdef listitems listitems macroprine define macro 1 def define 1 2 Met Gdef let xdef Define Gdef 1 Met Gdef gdef Define 2 def list i xdef temp listitens repeat 1 tines Mf temp setcount9 0 gdef macro else Apply First to temp gt macro Apply Rest to temp gt temp endrepeat equivalences macro The macro macrolist describes the set of macro names available to list and data These macros should never be explicitly invoked by the user 60 def macrolist aa a bb b cc c dd d ee e ft f gg g bb b ii i j j Nj KRAKI nm n nn n oo o pp p qa q rr r ss s tt e uu a vv w ww e xx z yy y zz z equivalences equates pairs of consecutive macros declared in macrolist def equivalences def a aa def b bb def c cc def d dd def e ee det f f1 def g gg def h hh def i ii def j jj def k kk def 1 11 def m mn def n nn def o oo def p pp def q aq def r rr def s ss def t tt def u uu def v vv def w ww def x xx def y yy def z zz A Macro That Pr
53. acros One problem was that the exact effect of a set of formatting commands depends on where they occur A TEX macro has no way of detecting where it has been placed so you can get very strange results by putting a macro in the wrong place A similar problem occurred because the arguments to a macro are blindly in serted into the macro text and there is no way to check whether they are appropriate If the argu ments are not of the correct form the macro may do something quite unexpected I give an example of this second problem below in the section on for matting figures Both of these problems happen as a result of people making mistakes using macros incorrectly so it could be claimed that this is not a deficiency of TEX However this situation influences the way that people use TEX In order to use a macro correctly you need to know exactly where it can be used and the precise form of all of its argu ments Therefore all macros need to be supplied with extensive documentation concerning their use This is the same documentation problem that people have to deal with when maintaining programs writ ten in computer languages raised to a higher de gree Most computer languages allow programs to be somewhat isolated from each other with only min imal communication between them this allows one to consider the effects of one program apart from the others Macros in TEX get much of their meaning from the context within which
54. acros exactly as they are written Our solution an overview As remarked above TEX requires information about the particular output device in use both on input the widths heights etc of the characters and on output how to interpret the DVI bytes We keep all the information required in a single file DIABLO TBL This helps to ensure that the input and output modules match any changes made in one being accompanied by ap propriate modifications to the other Two programs MKTFM PAS and MKFNT PAS then construct the input and output information from this in the re quired format More precisely MKTFM PAS constructs from DIABLO TBL the 4 font tables needed for mathematical work DIARM TFM DIAIT TFM DIASY TFM and DIAEX TFM together with the typewriter font DIATT TFM These are written in the format FILE OF integer required by TEX Meanwhile at the front end MKFNT PAS constructs from DIABLO TBL a file DIABLO FNT which our output driver DVIDIA PAS takes as auxiliary input in addition to the DVI file produced by TEX and some details The account above is somewhat simplified In practice we have found it useful to split both the input and the output modules so that we have a readable account of what is going on at each stage TUGboat Volume 2 No 3 Thus for the input module we first produce amp single large file containing all 4 fonts in hexadecimal form A second program then converts this TFH
55. agical control sequence Meaning of the Penrose notation Although not strictly necessary it may help if 1 explain very briefly the interpretation of the Penrose notation for tensors In the classical Einstein notation a tensor T of type 1 2 for example is denoted by Tik Here z j and k are dummy suffixes so that e g be represents exactly the same tensor In the Penrose notation T is incarcerated in a box with 1 upper arm corresponding to the upper index 7 rising from the top of the box and 2 lower arms corresponding to the lower indices j and k descending from the bottom of the box The joining of arms on 2 tensors or on the same tensor in a Penrose diagram corresponds to the con traction of the corresponding indices denoted in 38 the Einstein notation simply by repetition of the in dex For example the tensor Si TK obtained by contracting the upper index of S with an upper index of T is represented by a diagram with 2 boxes one for S with a single upper and a single lower arm and one for T as above The upper arm of S is joined to the left hand lower arm of T to represent the contraction The remaining arms extend upwards or downwards as the case may be to the edge of the diagram Thus the resulting tensor is of type 1 2 with 1 upper arm corresponding to k and 2 lower arms corresponding to j and The relative positions of S and T are immaterial They may be side by side
56. am based on TF TOPL but lacking the robustness and elegance of output Produces a raw dump of a TFM Operates on the DEC 20 and VAX primarily used to prepare TFM files for transfer to the VAX tfmbin Program based on PLTOTF but lacking the robustness Produces a TFM file from the out put produced by tfmdec tfmprt Program based on TFTOPL but lacking the robustness and elegance of output Produces a satisfactory dump of a TFM file textoucb Converts a VNT file to the Berkeley vfont format ucbtfm Generates a partial TFM file from a Berkeley vfont file dvitriplot Converts a DVI file to the format required for plot mode printing on the Trilog printer Font files are in the Berkeley vfont format A page of text is set and output to the standard printer spooler raw mode option dvitrilog Converts a DVI file to the format required for standard printing on the Trilog The font used must be a typewriter style defined for the Trilog This program is unsatisfactory pedit Lex program that scans a PAS source and dis cards blank lines Inserts code to assist editing of case statements with OTHERS Transforms certain empty statements to begin end Changes keywords and standard identifiers to lower case Produces a directory of case statements with a complementary set constructor Produces a directory of procedure and function declarations This program makes significant assumptions about the nature of the inpu
57. as modified so that when a large array is referenced code is generated to bring in chunks of the array from disc storage Naturally a heavy performance penalty is paid with this implementation Currently it takes two to three minutes to compile a single simple page of text Additional optimizations will be implemented before distributing this version sometime in the next month November 1981 Anyone with ideas and or experience optimizing such an implementa tion is welcome to write to the address below This author has agreed to be the site coordinator for the HP3000 If you are interested in obtaining a copy of TEX for the HP3000 please write to the ad dress below Indicate which model and MPE release you have and any output device s at your site The initial release is scheduled for December 1 1981 Lance Carnes 163 Linden Lane Mill Valley California 94941 TEX FOR THE IBM 370 Susan Plass Stanford Center for Information Technology It s finally up and running Pascal TEX for the IBM 370 running in the MVS batch We have suc cessfully produced device independent DVI out put files which have been correctly printed on the Stanford Computer Science Department Dover printer We do not have output drivers for printing these files from an IBM 370 we hope to write those soon What we do have however is a version of PTEX which runs on our 3033 under MVS and under ORVYL Stanford s timesharing system The fol lowing is
58. at METC the Varian interface and the TEX sys tem are on two different VAX mainframes For this reason DVITOVAR actually creates a rather large file 1100 blocks per output page contain ing raw raster data which is transmitted to the TUGboat Volume 2 No 3 other VAX over DECNET and converted to QIO s by the separate program OUTTOVAR At an in stallation with everything on the same machine this headache can be eliminated by inserting the QIO s directly in DVITOVAR in place of OPEN and WRITE statements The peculiar structure of the Varian supplied driver program does not allow raster plot files to be spooled LVSPOOL set aside almost a full megabyte to hold character raster data far more than needed FORTRAN does not allow the preferred solution of dynamic allocation but we reduced the buffer to 200K bytes which is probably still lots too much DVITOVAR also defers font loading until a font is actually needed thus many fonts are never loaded although they are defined in the macros and thus appear in the postamble This is a considerable timesaver and reduces even further the buffer size needed DVITOVAR is rather verbose in announcing the processing phases it is going through These mes sages can be removed if desired The program has not been adapted to an equivalent of LHSPOOL which produces output horizontally on the page but such a project should present no difficulties DVITOVAR was also adapted into a similar
59. ay force us to deviate from this model somewhat First consider the plight of a TEX user who plans to print a document magnified by a factor of two on a printer that only handles 8 5 by 11 paper In or der to determine an appropriate hsize and vsize this user will have to divide the paper dimensions by the planned magnification factor Since computers are so good at dividing TEX offers this user the option of setting the magnification parameter to 2000 warning TEX of the anticipated factor of 2 blow up and then specifying hsize and vsize in units of truein instead of in When input ting a true distance TEX divides by the scale fac tor that magnification implies so as to cancel the effect of the anticipated scaling Normal units refer to distances in the design document while true units refer to distances in the magnified printer out put Secondly some existing print file format and printer combinations have no current provision for magnified printing This is not generally the case for DVI files but a Press file for example uses absolute distances internally in all positioning com mands and Press printers treat these distances as concrete instructions without any provision for scal ing There is a program that takes a Press file and a scale factor as input and produces as output 12 a new Press file in which all distances have been appropriately scaled But it is inconvenient to be forc
60. be nearly constant plus or minus a line In certain special situations I had to worry about other aes thetic considerations such as not having an equation directly under a figure but this didn t come up too often Mainly I was concerned with choosing page breaks and positioning figures so as to produce a document optimized with respect to those three aes thetic rules given above Certain problems arise when dealing with high level aesthetic formatting goals It is difficult to explicitly specify such goals in a form that a com puter can work with Consider what a human has to go through to format a document while consider ing these goals It is seldom the case given a tricky formatting situation with a lot of figures that all of these formatting goals are compatible Often they are contradictory For example suppose you have a page with a computer program listing in the middle and a figure reference near the top of the page Suppose that if you place the figure at the top of the page this pushes the text on the page down far enough so that the computer program has to be broken between this page and the next one Here you have a conflict between the rule that wants figures on the same page as their references and the rule that doesn t want computer program listings to be broken Exactly what I would do depends on the exact situation If the page in question was a left hand one it might be possible to move the figure to the faci
61. be followed by the Raster Description of the character A Of course a single character s Raster Description is always contained in consecutive words If a character is totally white then the third word contains a zero The Pixel Width Pixel Height X Offset and Y Offset of a totally white character must be zero too although the TFM Width may be non zero A non zero TFM Width would mean that the character is a fixed width space TEX s standard CM fonts do not contain any such characters For the Q example word 12326 might contain any number from 0 thru 12000 16 since Q s Raster Description is 16 words long let s say it is 600 The fourth word contains the TFM Width of the character That is the width that TEX thinks the character is exactly as in the TFM file The width is expressed in FIXes which are 1 220 th of the design size The TFM Width does not take into ac count the magnification at which the PXL file was prepared Thus if Q had a width of 7 points in a 12 point font word 327 in the PXL file would con tain trunc 7 12 22 See the TFM documenta tion for more information on FIXes After the 512 words of Directory Information come 3 words of font information First the checksum which should match the checksum in any DVI file that refers to this font otherwise TEX prepared the DVI file under the 10 wrong assumptions it got the checksum from a TFM file that doesn t match this PXL
62. boat Vol 2 No 2 800 copies Printing 1 234 Postage 515 Clerical 66 Reprinting TUGboat Vol 1 No 1 300 copies 195 Vol 2 No 1 300 copies 655 1 875 Microfiche TUGboat Vol 1 No 1 Vol 2 No 1 109 Miscellaneous postage express charges 489 Steering Committee luncheon meeting San Francisco January 81 170 Workshop expenses 346 Support for Stanford TEX Coordinator 3 600 8 831 TUGboat Volume 2 No 3 Estimate of future 1981 expenses TUGboat Vol 2 No 3 800 copies Printing 91 100 Postage 500 Clerical 70 1 670 Questionnaire membership renewal Printing 100 Mailing 150 250 Reserve for 1981 expenses for Cincinnati meeting January 1982 1 000 2 920 Anticipated receipts during the rest of 1981 against 1982 individual memberships 4 000 Balance estimate to December 31 1981 5 622 Notes 1 1981 memberships number 565 of which 22 are complimentary of the total 406 members are domestic and 159 foreign 2 1982 memberships to date number 65 of which 22 are complimentary Six members have sub scribed to the 12 foreign air mail postage op tion 3 The TEK Implementors Workshop held at Stanford May 14 15 1981 was attended by 92 participants 4 Not included in these figures are costa for ser vices provided by AMS professional staff in cluding programming reviewing and editing answering telephone inquiries maintaining the mailing list and other administrative cle
63. cm 10cm in the original and some line breaks and spacing were indicated manually where the ap pesrance of the copy would otherwise have been less than desirable the original column width was 3 5in the TUGboat column width 18 75pc 3 125in just enough of a difference to be troublesome The tables are built with ordinary halign cod ing especially attractive is the centering of headings aver multiple columns in the table following Powd Pat The most interesting control sequences defined for this document are for the chemical formulas and tke bar chart Chemical formula def F 1 if A whatptsize mathsy uzz mathit adf 1 else if 9 whatptsize mathsy vzz mathit bef 1 else if 8 whatptsize mathsy wzz mathit cef sous else This macro depends on the definition within the point macros cf basic tex of a control se quence whatptsize which allows the current size to be tested single digit sizes are represented by one digit and larger sizes follow the example of hexadecimal notation A 10 etc Notice that subscripts are defined to be the same size regard less of level and roman fonts are substituted for the usual math italic to simplify typing Double braces ensure locality of these substitutions Bar chart def i bbox to Sua NhfillVvrule depth 3pt def 2 hbox to 5mm hfiil vrule depth 6pt def e 1 2 Mhbor to imm nfili vrule height 2pt Ali dimensions i
64. colon def prochead procedure head def funchead N function hesd det pfhead Alternatives Middie prochesd Lower funchead det pf eclpart LongStar pfhesd sesicolon H bloct semicolon Define Block Fil labelpart constpart Fil NewLine Fil typepart varpart Fil NeuLine Fil pfdecipart blockbody Fil Fil EndDef 4 end of Block fil eject editor s note page break for TUGboat publication TUGboat Volume 2 No 3 TUGboat Volume 2 No 3 49 4 Declaration Extras def simpletype W siaple type Vethtgpel ist Vira NA oma tmp type A bra Define Type Fil Alternatives Middle Fil eimpletype Lower F11 T char 136 A AM type 1dentifier VLower Optional kW packed K array typeliat K Cof type Lover KW file KW of type Lower KW set K o2 simpletype Lower KW record N field list KWend Fil Fil EndDef Define Sinple type Fil MAlternatives Middie Fil Htype identifier Lower Fil ipar idlist rpar Lower Fil constant T CommaStrut constant FL1 Fil EndDef 4 NvfilNeject def varianthead KW case id colon H type identifier KW or def variant RAW comms constant colon ipar M field list rpar Define Field list Fil LongStar 0ptional idlist colon type semicoion NezLine save subchartbox hbox Optional variant this gets too complicated ptional varianthead LongStar
65. d fonts and since many of these fonts are often not used I hope the decision to always load them can be repealed An inconvenience we encountered here was caused by the OS TEX SYSDEP module which referred to the directory TEX explicitly This prevented us ing any other name far worse it made it impossible to run TEX while the default directory was on a different disk than the TEX directory This could easily be fixed by switching to a logical name such as TEX DIR which we would have done if we had a Pascal compiler There was also a tendency for the program to abort with Fatal errors when it should have known better e g when the installation limit for distinct versions of TEXOUT DVI was reached The Pascal driver program LVSPOOL was sup plied in a form which can be linked to a separate assembly language module to issue the actual driver calls Thus we could have substituted appropriate QIO s for the Varian driver and obtained out put However there were several advantages to rewriting the driver in FORTRAN It could be lo call maintained and adapted for other output devices Moreover some inefficiencies found in LVSPOOL could be eliminated For these reasons we wrote a new conversion program based closely on LVSPOOL in FORTRAN 77 The Varian conversion program is called DVITOVAR It currentiy translates only version 0 DVI files but conversion to the newly announced version 1 would be straightforward Currently
66. d developed a routine for producing the book We could have avoided a lot of problems and produced a better book with less effort if we had been more organized Thoughts on Text Formatters Current computer text formatting systems suffer from many deficiencies which become increas Ti ingly apparent as people attempt to use them in more and more situations Some of these prob lems are due to formatting languages that cannot cope with the aesthetic ideas that book designers have developed from long experience with document production Other problems result because format ters are designed with small documents in mind and cannot deal with the formatting concerns of large documents I don t claim to have the solution for all of these formatting problems However I have come up with a few ideas about how text formatters could be improved FORMATTING LANGUAGES AND CONTROL Computer controlled printers deal with docu ments at a very low level To a graphics oriented printer a document is a set of commands which specify the exact positions of individual dots lines and characters on a page Obviously people do not want to have to specify the formatting of their documents in such excruciating detail In stead they use a computer text formatter which could be considered as a translator between an abstract high level formatting language and the specific detailed language of a printer A format ter allows its user to specify
67. d out a section of the book several times defining vect a different way each time By chang ing that single macro definition I could represent all vectors in an entire section by letters with arrows on top of them or by boldface characters The only way to judge which notation was better was to see how it looked in print Using macros allowed me to experiment with very little effort FORMATTING FIGURES Of all of the objects in Turtle Geometry the hardest to format were the figures MIT Press and the authors had decided that the figures would be drawn by a technical illustrator and pasted onto the camera ready copy of the formatted document Therefore spaces had to be left for the drawings Formatting a figure proved more complicated than simply leaving a specified amount of space on a page however The book designer had specified that a single figure should contain a caption and an ar bitrary number of subfigures each with an optional label organized one or two or three in a row across the page I had to develop macros to allow me to construct complex figure boxes One problem I ran into was determining exactly how much space to leave for a particular figure If I put in too much space the drawing would look strange surrounded by emptiness If I didn t leave enough space on the other hand it would be im possible to paste the drawing into the final copy of the document Given a drawing I measured it and give its height as an
68. devices TEX it self knows nothing about PXL files Let s say a user creates a file called FOO MF which is the METAFONT language description of a new font called FOO In order for everyone to be able to run TEX jobs that use this font and get their output on our 200 dot per inch proof device we must first run the METAFONT program on FOO MF and ask it to make both a TFM file and a PXL file for it These files called FOO TFM and FOO PXL are then put in a public directory so that anyone using TEX may access them Now whenever a TEX job is run that refers to FOO font A F00 the TEX program reads in FOO TFM to get all the width height depth kerning ligature and other informa tion it needs about any font To get output on the proof device the DVI file produced by TEX must now be processed by a device driver program This program reads the postamble of the DVI file to find out the names of all the fonts referred to in the job and for each font it opens the corresponding PXL file In our example the driver would find the file FOO PXL which it would then use along with the main body of the DVI file to produce the actual out put The DVI file tells where to put all the charac ters on each page while the PXL file s tell which pixels to turn on in order to make each character In fact there is a little lie in the preceding paragraph The actual name of the PXL file would TUGboat Volume 2 No 3 be something like FOOS 1000
69. dies and determined that the preferred transformation is CASEARG case index if not CASEINDEX in LOWERLIMIT UPPERLIMIT then CASEARG LOWERLIMIT 1 case CASEARG of LOWERLIMIT 1 otherslist OTHERS code end This provides acceptable efficiency does not make an exception of the case index being a function call may require a few extra editing keystrokes and is compatible with the program that scans and alters the source One procedure VARSYMBOL contained some inaccessible code due to the omission of a case constant The instance was reported by the com piler We edited in the appropriate case constant This condition did not exist in the second set of sources we retrieved July 1981 Equivalence of type requires that each variable be defined by the same type declaration This was significant because of our decision to use the separate compilation feature We manually reviewed the programs for common type declarations and placed them on an include file Our first copy of PTEX May 1981 contained instances of the same types with different spellings A subsequent copy July 1981 had resolved these problems It was in teresting that we had guessed wrong on the eventual spellings This process was not very time consum ing there are surprisingly few type definitions and the lexical order of the program simplifies the task TUGboat Volume 2 No 3 The empty statement is incorrectly handled in the following const
70. document formatting in terms which are more abstract and general such as words and paragraphs and lines of text Us ing these specifications the formatter decides where each character of the document should be placed on each page An important characteristic of a formatting lan guage is the level of detail with which the user has to specify the formatting of a document Suppose that a formatting language deals only with high level for matting concepts and the user wishes to specify the formatting of a particular object a little more ex plicitly This could happen if the formatter doesn t format something exactly right automatically and the user wants to fix this Another possibility is that the user may wish to create a one time special case object which needs to be formatted strangely and the user is willing to take the extra time to specify it in detail As an example of this in Turtle Geometry there were only two or three tables and it was easier to specify them in detail rather than developing general macros for formatting tables In this case the only solution is for the user to try to coerce the system into formatting correctly This may in volve tricking the formatter making it treat some objects like other objects and trying to second guess the formatting algorithm This is very difficult to do it requires an intimate knowledge of the inter nal workings of the formatting system which not all users may have and it is
71. e weekend if one were sufficiently dedicated Since leaving Stanford I have learned that even a trivial change to a text editor can take a year to get into customer s hands It was with great joy therefore that I spent last weekena making TEX work on my IDS 460 Actually TEX itself worked with few problems The struggle was with the post processor to send the dvi file to the printer Even though I had LVSPOOL before me as an example getting everything straightened out wasn t simple Here are the most critical things I learned in case somebody should face a similar problem in the future First TEX seems to believe that the printer oper ates from high bit to low bit left to right across TUGboat Volume 2 No 3 the page This is the PDP 10 convention The PDP 11 convention is to operate from low bit to high bit The Versatec seems to follow neither of these conventions operating from low byte to high byte but within a byte operating from high bit to low bit There is some code at INSERTLV to scramble a bit string from PDP 10 format to Versatec format and my statements above about what the Versatec expects are based on it 1 have never seen a Versatec manual My printer follows the PDP 11 convention I con sidered modifying INSERTLV to convert from PDP 10 format bit strings to PDP 11 format but decided not to since it would involve reversing the whole string one bit at a time Instead I just ORed the bit string into
72. e Spivak A macro that prints its name Anthony Siegman Testing the equivalence of strings 58 Problems from the TEXarcans Class Answers and Another Problem 61 Letters et alia J M Colen sre CET RD Ron alk ae a os boek ne ate qo be De x 66 Michael Sannella Formatting a Book with TEX Experiences and Observations 66
73. e and love and the greatest of these is love If I have atl the elequence of men or of angels but speak without love I am simply a gong booming or a cymbal clashing UNU w on a 13 LOVE TEX 1 DEK PAGE 2 1 0 If I have the gift of prophecy under 4 tanding all th deine there are and knowing hegy underst if T have ha n fut fl soys Ss fulness to move mountains but wit a pthing at all without love Nam pubo basie e For our khbat I possess piece by piece Sand if I even Net Npiaes s 1 8 in eoe 1 was a child When child and argue Mike e me lt seent code d de ways are put refiectiontealous this ee ta y vede mlir e In short thero are N api oe Li ARI jegye i z g Now we are see Moe Tie io ri ki i be sesiet but sion I shall know as fully theee thi and the greatest of these is love love Nend I fiushpage ngs that last faith nce perfe a burn it but am without love it wi l hor 66 k k k kx x Letters et alia x x To the Editor I wonder how much serious interest there is amongst TUGboat readers in radically simplify ing and speeding up the capture and presen tation of complex mathematical text I have designed an unexpected mutation of the stan dard Qwerty keyboard which in mock up form allowed with generous allowance for making and correcting mistakes simulating the capture of a standard boo
74. e begin if msb true then begin if mob true then 1 22 7 i a borrow has propagated else begin if i gt 0 then begin i 8 i mbb true a borrow required end end end end case i of 0 s k zero 1 s k one 2 sik two 3 sik three 4 siki four 5 sik five 6 s k siz 7 s k seven end n n div 8 end Print k while k 10 and elk zero do Increment k ad k k to 10 do Print s k en 453 An error has been found and fixed in the main operating module of the PASCAL coded version of TEX as described in section 453 on page 157 of the August 1981 revision This error affected the use of leqno The correction involves replacing the word ling with link and adding a missing line of shift 0 0 as shown below 453 Attach equation number 453 begin q getnode gluenodesize tupla gluenode gluelink q filiglue qno then if le begin link q b link eqnoboz q b hpack eqnoboz dw shift false eqno will be left justified oo 0 0 else link q eqnoboz link g b hpack b dw shift false eqno will be right justified end end This code is used in section 444 ko k i OX k k KF X THE FORMAT OF PXL FILES David Fuchs A PXL file is a raster description of a single font at a particular resolution These files are used by driver programs for dot matrix
75. e diagrams parindent Opt def LeftArrow vrule height 0 5vu depth O 5vu width 2 5vu 4 Turn off the right arrows because they make the charts too Wide def RightArrow vrule height 0 5vu depth 0 5vu width 2 5vu det ArrowLine vrule height 0 5vu depth O 5vu width 2 5vu def NoArrows def LeftArrow def RightArrow def ArrosLine X T lt char gt yields a circular terminal node with the character aesthetically placed assuming CNTT8 is used The 4 5417pt is the height of plus and minus and 4 2pt is the character width Colons and periods should be followed by a CommaStrut to make X them line up with semicolons and commas For parens brackets and braces put an extra hse on the outer side to center them better X This macro may be used for multi character terminal symbols but KW should be used for keywords def T 1 Terminal vbox to 4 5417pt ves hbox expand 4 2pt hss 1 hss ves vfilneg def CommaStrut eaved hbox lower 14p0 nu11 def KW 1 Terminal K hskip 2pt 1 Strut hskip 2pt Use thie for keywords def N Nonterminal just an abbreviation def ptional i Alternatives Middle 1 Lower Empty def Rept 1 Repeat Upper BigLeftArrow Middle 1 def Star 1 Repeat Upper 1 Middle Empty def LongStar 1 0ptional Rept 1 MdefNTwoAlts 41122 Alternatives lt Upper TrinBot 1 Lower TrinTop 2 def RAW 1 2 Repeat Upper 1 Middle 2 Repeat Above W
76. e enclosed in braces and preceded by a control sequence These control sequences get defined as local macros and grab the subcomponents 54 as parameters Actually this happens twice the first time the argument is interpreted the local macros just ignore their parameter and the A second time through the real work is done The first pass is used to count the subcomponents since the last one has to be treated specially A and also does some validation of the arguments A There ere places in these macros where a gdef or xdef is used to get some information out of a local scope or to force expansion of a count since X the value is used before any other macros are expanded there is no danger of nested macro calls messing things up A If the structure of the macro isn t tricky enough for you you can try to understand the way the result is built up out of boxes Here is the basic idea while the stuff in the middle is being built up in an halign the 4 connectors on the side sre built up in two boxes one for the left and the 4 other on the right The baselines of the boxes on the sides are maintained to be correct for the final result by doing a vbox above and at the middle and a vtop after the middle The baseline of the stuff in the middle is 4 ignored and when it is all built it is boxed and forced to line up with the boxes on either side The halign is needed since each row has to be 4 expanded to the maximum width of e
77. e guae o so quu 9 INNA GED Eso e FO en Eie OO e an Ron begin and Editor s note As you may have noticed on the first two pages of this peper there are some problems with the foni used to draw the quarter circles The paper copy which Mike Plass sent in with his tape looks quite a bit better and the remainder of his diagrams are veproduced from that copy which was prepared on one oj Xeroz s printers f TUGboat Volume 2 No 3 53 l o Zoa o set of simple type Type 4 gI 9 o function E C LL MHO ee MEER procedure o6 Parameter list Statement TUGboat Volume 2 No 3 rara haaa expresion CIID 9 statement em fone eme HG spere 7 Ve expression MES statement Gownto TUGboat Volume 2 No 3 55 Expression Simple expression qM ANE Guy D je expression ig Rub Heater 9 GN Selector 56 TUGbost Volume 2 No 3 o LaJ I CD gem Q poe Q Q 9 Unsigned constant TUGboat Volume 2 No 3 CHEMICAL NOTATION USING TEX Monte Nichols Barbara Beeton The article below from a mineralogy handbook illustrates the fact that publishing in disciplines other than mathematics and computer science can benefit from the use of TEX A few changes were necessary to fit the copy into TUGboat s narrow columns the bar chart was truncated at 7 5
78. e return after the opening nage string left brace and the space after 1 in the redefinition aga 12 4 B McKoy L1 Appendix A T Winograd W Panton 1 2 42 M Diez 1 2 A 32 35 M D sz 12 3 M Diaz Iti 5972 72 A Keller 11 98 110 JL Price The following list catalogues macros that have 12 A15 M Diez of NFunc are significant Index Production Letters Letterheed Lits appeared in earlier issues of TUGboat Entries oom IRAR M Diaz Memes Msocellanaous U ks kk k k kk e ok TUGBOAT MACRO INDEX are listed by volume number and page as well as 12 4 30 M Diaz author s name Items that could not be catego IL2 43235 M Dfaz rised by an obvious headword have been listed under miscellaneous Many items refer to parts of large control sequence hee macro packages users of other packages may find an extra iL 50 M Spivek them valuable models for macros of their own i Readers comments on the format as well as the single tokens identifying IZ 52 M Spivak contents of this index are welcome Multiplication aA B McKay TUGboat Volume 2 No 3 Nofi macros program SAIL program P program EA m FR Notes Null string testing for Numbering pago Output routines Overlinng Page numbering Paragraphs beginning with large capitel letters indontad numbered see Lists Parentheses assorted sizes ticular s
79. e to others progress is still limited with regard to establishing a library of device in dependent font descriptions Work on Euler at Stanford and a Cyrillic alphabet at the AMS is con tinuing and other sites including Autologic have expressed an interest in METAFONT Of course not only alphabets but also other special fonts need our attention see the article by Murphy page 37 We hope that further developments and other on going research concerning fonts and METAFONT will be reported to the TEX community via TUGboat and TUG meetings 35 ki k k k x ko ok EF k Warnings amp Limitations x x kk k k x kk k x Don t Just let TEX Hang raise or Mower It Beware of repeating a let statement TEX may hang leaving you no alternative but to kill the run leaving you with no error file to help in your diag nosis These four lines cause TEX to hang let oldsize size def size oldsize let oldsize size size These don t let oldsize size def size oldsize size Nor do these let oldsize size xdef size oldsize let oldsize size size The above results were originally reported by Mike Spivak using the SAIL version of TEX They have been duplicated by Lynne Price using the Pascal version on a VAX An especially insidious variation has just occurred at the Math Society A job input a header file wherein let italcorr def unskip italcorr was lurking A second header file essen
80. e to read editable code and generate TEX code from that and assis tance facilities e g spelling as well also interacting with a host a Realistic Display Maths Terminal having the performance of an Intelligent Keyboard but giving realistic display of maths that is also fully editable on screen no coding shown and show ing typefaces and sizes in an immediately recognis amp ble way also assistance facilities and interaction with a host a T amp M Host also having a Realistic Position Maths Display graphics and a proofing printer A Realistie Position Maths Display ter TUGboat Volume 2 No 3 minal would allow any maths office typist or per haps any other easily to set the most complex material and automatically generate and edit TEX code for example I would very much like to hear from people who have a real interest in such units and or systems The nature of the response to this enquiry will very much determine whether there is significant interest Items would be expected to give substantial savings in salaries of dedicated programmers and compare well with currently available equipment J M Cole 17 St Mary s Mount Leyburn North Yorkshire DL8 5JB England ki k k x ok k xx k k k k FORMATTING A BOOK WITH TFX EXPERIENCES AND OBSERVATIONS Michael Sannella MIT Laboratory for Computer Science In January of 1980 I was hired by Professors Harold Abelson and Andrea diSessa of MIT to
81. ect font data structures and bytes were explicitly packed into integers for the DVI file 14 The SCANNUMBER routine in TEX and TEXPRE makes no check for overflow as it reads in a number from the user s TEX input file I the hapless user includes too large a number Pascal crashes and there is no way of knowing that the overflow was not internal to TEK i e some previously undiscovered bug A check was introduced in the SCANNUMBER routine so that if overflow is about to occur the ERROR procedure is called This gives a stan dard dump of the buffer and allows the user a graceful recovery Due mainly to Imperial College Pascal s lack of record packing facilities which causes MEMORYWORDs to each oceupy 4 words of memory it is necessary to have a runtime storage allocation of approximately 2000K to run TEX Production of raster files for the Versatec takes amp bout 700K As of this writing the system has been put through a series of relatively small tests and so far seems to be working without difficulty As with all those who have brought TEX up at various installations I have several suggestions for changes to the code these are intended solely to aid portability and increases in portability may of course be purchased at a cost to some other impor tant consideration such as efficiency Nevertheless if TEX in Pascal is really intended to be a portable program there ought to be more consideration of TUGboat V
82. ed to use this scaling program on a regular basis Instead the Press output module of TEX chooses to scale up all distances by the magnification fac tor when writing the output Press file Thus the Press files that TEX writes are not representations of TEX s abstract design document but rather repre sentations of the result of magnifying it by the fac tor parvali2 1000 On the other hand the DVI files written by other versions of TEX contain nor mal units of distances and the software that trans lates DVI files to instructions that drive various out put devices will do the magnification by themselves perhaps even using a magnification that was not specified in the TEX source program if the user has not specified true dimensions his or her DVI out put file will represent the design document regard less of magnification Caveat Due to the manner in which the current implementation of TEX writes Press files it is not permissible to change the value of parameter 12 in the middle of a TEX run If you want to produce magnifled output you should reset parameter 12 once very early in your document by using the chpar12 control sequence and from then on leave it alone Another caveat below discusses the situa tion in more detail The magnification mechanism has been extended to include font specifications as well in or der to print a document that is photographically magnified it is essential to use magnified font
83. edly constructing and debugging that set of macros was a slow and painful process but I only had to do that once The real problems began after I had formatted the individual objects and was try ing to bring them all together The book designer at MIT Press had given me certain aesthetic rules to follow when formatting pages Unfortunately TEX was not designed to deal with such high level formatting concepts As an example consider the placement of figures within a document Each figure is referred to at a specific point within the text The readability of a document is improved if figures are placed so as to minimize the amount of page flipping a reader has to go through to associate references with figures For this reason the book designer at MIT Press specified that a figure should be placed at the top of the page containing its reference if pos sible If that was not possible the next best choice would be to have the figure on the facing page to the left or to the right If that too was not possible then the figure should be on the next possible page later on in the document Unfortunately TEX cannot deal with figure placement in these terms For one thing there is no notion of facing pages in TEX This is a serious failing since commercial publishers design document formatting in terms of how each spread facing left and right pages looks More generaliy TEX does not give the user very much con trol over which page a fig
84. eed the batch system but in fact most people still use it instead of the inter active version due to the savings in time We could also use subprocesses to run TEX but the batch sys 33 tem allows us the flexibility of specifying how many jobs an run concurrently three or four TEX jobs running together tend to slow the system down a bit We had a problem using the Versatec printer due to the fact that normal print jobs and TEX jobs would both try to write to the device at the same time This was solved without writing a symbiont manager by running both types of jobs in a single batch job queue which only let one job at a time have access to the device The file name parsing routines contained the er ror of assuming that the first period encountered was the delimiter between the file name and the ex tension This resulted in the inability to use sub directories in file name specifications Fixing this allowed us to organize the TEX directory a bit by moving all of the fonts to TEX FONTS and using TEX INPUT as the default directory to try if an input file is not found in the user s directory As an aid to the interactive user I put in the hooks to the VAX help utility 1f the user enters Control H in his input line the user is passed to the help routine When the user exits help the command line is automatically reinstated up to the Control H and the user can continue the line The usefulness of this can be a
85. ent def gotostatement K goto N unsigned integer Define Statement Fil Optional W unsigned intager colon NerLine Alternatives Middle assignment Lower proccal1 Lower blockbody Fi1 Lower ifstatenent Lower casestatement Lower whilestatement Lower repeatstatement Lower forstatement Lower withetatement Lower gotostatement Fil Wil Lower Empty Fil EndDef end of Statement vfil eject 5 Expression def relop Fil No rross HorzAlternatives Alternative T Alternative T lt Milternative OTOJ Alternative T lt gt Alternative T lt Alternative T gt Milternative NKW 1n Define Expression Msimple expression optionsl relop N sisple expression Fi1 EndDef Define Simple expression Fil Alternatives Upper T Mtddie Eapty Loser T Repeat Upper T Upper T Middle MN term Lower KW or Fi1 F11 Fil Fil EndDef def mulop NoArrows HorzAlternatives Alternative T Alternative T Alternative KW div Alternative K mod Alternative KW and Define Term Fil Wfactor LongStar sulop s factor Fil fi1 Fil Fil EndDef 9 editor s note page break for TUGboat publication TUGboat Volume 2 No 3 TUGboat Volume 2 No 3 51 Mdef Vactualarglist 1par RAW comma ezpression rpar save subchartbor hbor lbrek 0ptional MRAW co
86. extremely inelegant The 72 problem is really that the way such formatters are designed there are simply some documents which cannot be produced In the interest of making a for matter easier to use the set of possible documents that could have been formatted with it has been constrained Now let us consider the opposite extreme where you have a very low level formatting lan guage and you wish to do high level formatting In other words you don t care exactly how your docu ment looks as long as it conforms to certain high level formatting goals such as having lines filled to a constant length etc Using a low level formatting language it should be possible to produce a docu ment conforming to these high level constraints but you will be required to specify a lot of low level details that you are not really interested in Aside from the inconvenience of specifying the formatting in this much detail this makes things very difficult if you wish to change your document later The more detailed your specifications the more work has to be done in order to change them When you work with specifications at a low level of detail you es sentially have to calculate the formatting yourself rather than letting a computer do it There is another rather subtle problem as sociated with formatting languages which use descriptions at a lower level than you need for a par ticular document The greater the detail in which you
87. f Middle adveount altCtr by 1 RepeatBody def Lower SwitchDirection adveount AltCtr by 1 LowerAlternative Al locBox L save L aull AllocBox R save R nul2 save0 hboxz vtop null balign cr 1 null cr bboz box L raise 1ht A box0 box R X editor s note page break for TUGboat publication TUGboat Volume 2 No 3 TUGboat Volume 2 No 3 45 def UpperAlternative 1 save0 hbox 1 Empty save L vbox box L hbox vrule height 1hto idpO width Opt Mf U state FilVertLine else LinetoBot II eave R vbox box R bbox vrule height ihtO depth idpO width Opt AIM U state FilVertLine else LinetoBot MF11NunbozONF11NcrVdefVstate U MdefNiddleilternative 1 save0 bbox 1 Enpty xdef RowsToGo count aAltctr save L vbox dox L hbox vrule height 1ht0 depth idpO width Opt Mit U state BackQ IV LinetoTop else M O RowsToGo else BackQ I LinetoBot BackQ QQLine save R vbox boz R bbox vruie height ihtO depth idpO width Opt QQLine BackQ Mf U state LinetoTop ITI BackQ else M O RowsToGo else LinetoBot IT Back Fil unbox0 Fil cr def state L MdefV0mittedluiddleAiternative save0 hbor Empty xdef RowsToGo count AltCtr save L vbox boz L bboz vrule height 1ht0 depth 14p0 width Opt 142 U state BackQ IV LinetoTop else Mf O RowsToGo else BackQ I LinetoBot ForwQ save R vbox box R hbor vrule height 1htO depth idpO width Opt ForwQ Mf U state LinetoTop III B
88. f the initialization as well as using Calma s interactive graphics systems to dump raster images in the form of a font so that we can incor porate drawings and shaded images directly into the TEX output for our internal documentation needs Im sending off a tape of my modifications to Barry Smith so that he can implement those that he feels are worthwhile into his future releases Anyone interested should also feel free to contact me directly i xx ok x k k POOR MAN S TEX John Sauter Greetings to all of you in TEX land from grand wizard to humble worker in the field I have joined your ranks I have become a TEX user I am running what must surely be characterized as a poor man s TEX system Although my host machine is a VAX 11 780 my printer is an IDS 460 with the graphics option which provides me with 84 dots per inch The printer was tax deductible because I also use it to help in the preparation of W2 forms on mag tape but that s another story After buying the printer I couldn t afford the 50 for Pascal TEX from Barry Smith so I convinced a department at DEC that they should order it They did and through the magic of DECnet I got it from them Putting up TEX was a real nostalgia trip My first computer job was with the Stanford A I Project in the late 1960 s and when I was there I felt that any project could be completed in 6 weeks and anything short of a major compiler could be done in a singl
89. facility of saving an interrupted job s core image for later con tinuation is not available in many environments including VAX VMS UNIX and IBM timesharing systems Consequently TEK users outside of the DEC 36 bit world have TEX re read TEXINI TBL each time it is run which is a significant time handicap To help rectify the situation TEX82 s data structures will change to require less initializa tion We also plan to make a program available that can read TEXINI TBL and produce Pascal language initialization code to be inserted into the TEX Pascal source before compiling Unfortunately variable initialization is not standard Pascal so there must be different versions of this program for the Hedrick compiler Pascal VS VMS Pascal etc 22 Of course the option of reading in a significantly smaller TEXINI TBL each time TEX is run will still be a possibility and will only use standard features of Pascal Scott Kim s INVERSIONS has appeared in bookstores The text was typeset with TEX using fonts leased from the Alphatype Corporation A few people in our department spent some of their summers porting Pascal TEX to a num ber of new machines Joe Weening has a version working on the Cray with output to a Versatec Jeff Rosenschein brought up TEX in Israel on an IBM processor running VM CMS with output on a Versatec I spent some time writing Pascal drivers for the Autologic APS 5 and Mergenthaler Linotron 202 In fac
90. ffering levels of detail For example consider a box object that acts in the following way given a set of objects as arguments it for mats them like a paragraph using default width raggedness etc values If these values are given as parameters to the box it will use them instead You can imagine a whole set of parameters and defaults set up so that a single box object could be used for formatting a paragraph at the most abstract level or used exactly like a box in TEX if everything in cluding vertical and horizontal sizes are specified A single object with many parameters and defaults could be used at many different levels of abstraction HIGH LEVEL FORMATTING GOALS One problem I have mentioned regarding cur rent text formatters is that they do not deal with some of the aesthetic rules that book designers have 73 developed after years of experience with formatted documents I had to explicitly specify page break ing for Turtle Geometry because TEX could not deal with some of these concepts Let us examine this problem more closely When breaking pages by hand I had to keep in mind several aesthetic con siderations First figures had to be positioned to be as near to their references in the text as possible on the same page or on the facing page or on the next page Second I didn t want a page break in the middle of a computer program listing if at all possible Third the length of each page should
91. file into the 5 requisite TFM files Similarly at output we first unpack the DVI file into bytes before translating these into Diablo instructions We also found it convenient to split off the constant part of DIABLO TBL containing the prefaces and epilogues to the TFM files into an auxiliary file DIABLO AUX This leaves DIABLO TBL to concentrate on the actual con struction of the 640 characters in the 51 fonta To summarise all font information is kept in the 2 files DIABLO TBL and DIABLO AUX The program MKTFH PAS constructs a readable file DIABLO TFH from these and MKTFM PAS then converts this into the 5 TFM files corresponding to the 5 fonts With these font files in place we can run TEXPRE We are then ready to put our manuscript file say MS TEX through TEX The program DVIBYT PAS unpacks the file MS DVI produced by TEX into its constituent bytes in the readable file MS BYT Meanwhile MKFNT PAS has constructed from DIABLO TBL a file DIABLO FNT for our output driver BYTDIA PAS This driver converts the file MS BYT into a file MS DIA ready at last to be sent to the Diablo Command files It would be tedious to go through the above rig marole every time we had a file to TEX So we make free use of command files to cut the slog We find the DEC 20 TOPS 20 MIC Macro Interpreted Commands file format particularly con venient since it allows us to pass parameters the name of the file to be TEXed
92. go a long way toward eliminating the 15 20 sec delay now experienced at the start of every TEX user s run Until now the Versatec was the only output device for TEX on the VMS system but an accom panying article by Jim Mooney see p 13 discusses the birth of a Varian driver written for the VAX in FORTRAN 77 FORTRAN STRIKES AGAIN It is hoped that the Varian driver will appear on the VAX TEX distribution tape soon along with any other drivers etc that have yet to be publicised Several people have called expressing interest in spoolers for the Linotron 202 and APS 5 for the VAX The current version of TEX for the VAX is still available from Oregon Software for a 50 reproduc tion charge see TUGboat vol 2 no 2 page 33 Their address is Oregon Software 2340 SW Canyon Road Portland OR 97201 You are to be encouraged to share this tape with other VAX users in your area but please contact Barbara Beeton AMS or myself if you obtain a VMS version in this manner so others in your area will be able to find out that you have TEX up and running I would like to solicit news specific to VAX VMS for possible inclusion in a TEX VAX VMS memo to be sent to VAX VMS users early next year Especially welcome would be problems comments programs or macros that bring to light or solve any of the difficulties with TEX that are peculiar to the VAX VMS system ENHANCEMENTS TO VAX VMS TEX AT CALMA John Blair Calma Calma has had TEX
93. have large penalties associated with them if they generate widows the first or last line in the paragraph alone on a separate page The badness of a paragraph is calculated as the sum of all of the penalties in the paragraph The formatting algorithme inside TEX are designed to make line and page breaks so as to minimize the total badness of a paragraph This is a fairly flexible system users can specify penalties explicitly at certain points to indicate places that are particularly good or bad to break at and it formats individual paragraphs very wel However this type of system would not be suitable for dealing with more complex formatting constraints Badness is a simple one dimensional score which can be easily calculated and used for comparisons but it is not powerful enough to ex press some of the more complex combinations of higher level formatting gosls Consider the aesthetic goals given above dealing with figure placement and computer program listings You can t simply take a TUGboat Volume 2 No 3 badness score with respect to one goal and a bad ness score with respect to another and sum them to get total badness This is like adding apples and oranges Aesthetic formatting goals combine in more complex ways than that In a particular situation it might be possible to represent a situa tion in terms of carefully adjusted penalties but this wouldn t work in general You need a more complex multidimens
94. he VAX 11 which will let me run the fancy macro packages published in TUGboat and let me build font tables for my low resolution printer Keep up the good work TEX fans and from now on count me in John Sauter Sample of IDS 460 output see next page 14 Fr s ks ks k Output Devices k x k k Editor s note Not every TEX user has o fast high resolution output device at his elbow it is surprising how modest is some of the equipment that has been 460 an impact printer with a resolution of 84 dots per inch driven by an Apple II Its most severe present limitation is a lack of fonts certainly not the ingenuity of its oumer John Sauter who describes a recent weekend s work on page 34 k ks x g k k DIRECTORY OF OUTPUT DEVICES Rilla J Thedford Mathematical Reviews To further the development of TFX TUG is com piling a directory of TFX output devices We hope this will be a useful tool The directory will identify manufacturers for TEX output devices and required software and hardware for TEK interfaces It will also include information about fonts device specifications contact people and installation sites The membership renewal form will have addi tional questions for ACTIVE TEX users Please com plete and return it to the American Mathematical Society with your renewal fee Please feel free to include additional information you feel will help in the purcha
95. he left end and the exit is on the right but not always as we shall see The simplest components are the boxes that rep resent the terminals and the nonterminals of the lan guage The terminals are the lowest level pieces of the language that the description deals with for ex ample keywords special characters letters digits and so forth Nonterminals are the names for the building blocks of the language Some examples of nonterminal symbols might be number identifier expression statement program 1f you are familiar with BNF the nonterminals are the things in the angle brackets The terminals in a syntax chart are enclosed in boxes with rounded ends and nonterminals are enclosed in rectangular boxes This is how you use the syntax chart macros to make both kinds of elementary boxes Terminal procedure gt procedure Nonterminal statenent statement Keep in mind that the case of the first letter in a TEX control sequence is significant You can control what fonts are used inside these boxes by defining the control sequences NTerminalFont and NonterminalFont to be the appropriate font selectors Notice each of these basic boxes have stems on the left and right sides one of them being an arrow and the other one just a line TEX will determine which direction to point the arrow in on the basis of how the box is nested inside of other constructions The definition of a nonterminal is specified like this Defi
96. he program arrays Previous to doing this rewrite we worked around the problem of not being able to run concurrent images of TEX by creating a batch job queue which ran TEX jobs one at a time To do this we changed TaX to scan the command line and automatically input the file name found there For example TEX foo is equivalent to running TEX and then entering input foo as the first command For the batch system to run properly foo ter should contain everything from the input basic to the Vend A side effect of this organization is that once the TEX job is submitted a command file handles all of the details the terminal can immediately be used for other work rather than having to wait for TEX to inish When the background job has finished a mes sage is broadcast to the user s terminal and if TEX exited normally the DVI file is automatically sent to the spooler Note that any TEX error which prompts the user for terminal input will cause TEX to exit abnormally since the batch SYS INPUT will indicate an end of file condition to the program The names TEXOUT DVI and ERRORS TMP which were hard coded into the source were changed to DVIFILE and ERRFILE so that the command proce dure could set the name through assign user foo dvi DVIFILE assign user foo err ERRFILE which gives the output files the same name but different extensions as the input file Now that multiple images of TEX can run con currently we no longer n
97. icFont c daf RightRound hbor GraphicFont a BackQ BackQ lower QQSize hbox GraphicFont b BackQ editor s note page break for TUGboat publication 42 TUGboat Volume 2 No 3 4 LeftSquare and RightSquare are the end caps for Nonterminal boxes def LeftSquare vrule height QQSize depth QQSize width Opt vrule height QSize depth QSize width tvu bskip 1vu def RightSquare hskip ivu vrule height QSize depth QSize width ivu These nacros are for moving forward and backward in Q units def BackQ hski p QSize def BackQQ hskip qQQsize def ForwQ hskip QSize de ForwQQ hskip QQSize Macros in this group are meant to be used directly by the user def Empty vrule height QSize depth QSize width Opt def Strut saveO bbox Bg vrule height ihtO depth idpO width Opt def QLine vrule height 0 5vu depth 0 5vu width QSize def Q QLine vrule height 0 5vu depth O 5vu width NQQSize def Fil leaders HorzLine hfil def Fill leaders HorzLine hfill use this to swamp e Wil def FollowedBy Fil use to separate symbols in a sequence def TrimTop i vbox expand Qsize vss hbox 1 def TrimBot 1 hbox vtop hbox 1 vakip QQSize Some useful formatting primitives used internally def HorzLine hrule height 0 5vu depth 0 5vu def Strikeout 1 save0 hbor 1 hbox to 1wd0 vrule height 0 5vu depth 0 5vu width 1wd0 bss unboxO def CenterSink 1 lower QSize vbox to QQSize vs
98. ies 727 Norristown Road Spring House PA 19477 k k ks kk k k g g Software ko k amp k k k g PASCAL CODED TFX ERRATA Arthur L Samuel Stanford University The rate at which errors are being reported for the PASCAL coded version of TEX has slowed down to the point that we seem to be approaching that famous last bug All known errors have been corrected in the DOC and PASCAL files available from Stanford and an August 1981 revision of the descriptive documents has been printed There are a few instances where suggested changes for example 7 as in the naming of variables have not yet been made One correction made since August is reported below Also reported is a suggested improvement to procedure PrintOctal 37 The following procedure should work on both 36 bit and 32 bit machines and specifically on those machines where the previous PrintOctal procedure caused overflow problems This may be used to replace procedure PrintOctal in section 37 on page 18 of the SYSDEP module procedure PrintOctal n integer Prints the rightmost 32 bits of an integer in octal var i k integer s array 0 10 of asciiCode msb mbb boolean begin msb false mbb false ifn lt 0 then begin n n mab end begin if msb then begin if 1 gt 3 then 1 7 i it was a 36 bit word else begin if i mod2 0 then i 3 t 2 end end else i mod4 end els
99. ight forward data can concatenate its successive ar guments on a single string separating them with some delimiter and then list can pick off the necessary text string The concatenation of the passed strings however is created with xdef and a problem arises when some of the arguments them selves contain xdefs that the user does not want evaluated until 1ist is invoked A solution is possible using the technique illus trated by Patrick Milligan s DefineFont macro published in TUGboat Vol 2 No 2 The macro macrolist is defined to contain a sequence of otherwise unused macro names e g Nam Vbb ce Each time data is called it removes the first item from macrolist saves it on a list listitems and then defines the specified macro to invoke the argument text Thus if macrolist starts aa bb cc the first call to data sets listitems to Maa sets macrolist to bb cc dd and defines aa to be whatever the argument to Ndata was The xdef to modify V stitems does not cause aa to be expanded be cause listitems is redefined before aa is defined To retrieve the stored macros Nlist must pick off the appropriate token from listitems and execute it The algorithm just sketched is the heart of the macros shown here The situation is somewhat more complicated however 1ist works by using xdefs applied to listitems To prevent Mist from expanding any xdefs that might be contained in the argument text
100. ine might begin Ahskip 1wdO Problem no 3 Type hsize 25em noindent This is a case where the name and address fit in nicely with the review signed A Reviewer Ann Arbor Mich vskip 8pt noindent But sometimes an extra line must be added signed N Bourbaki Paris To get This is a case where the name and address fit in nicely with the review A Reviewer Ann Arbor Mich But sometimes an extra line must be added N Bourbaki Paris def signed 1 2 parfillskip Opt unskip penalty 1000 hfil penalty 200 hskip 2em hbox penalty 1000 hfi1 s1 1 2 Npar TUGboat Volume 2 No 3 Problem no 4 Type point 00 point 1 2 point 2 1 point 5 5 point i 1 To get e 5 5 e 1 2 2 1 e 0 0 e 1 1 lineskip Opt baselineskip Opt Warunit 5in topspace 6vu def point 1 2 vbox to Opt vae vbox to 2vul hbox hskip 2vu hskip ivs bullet 1 2 8 vss 63 Problem no 5 Type hsize 20es End of a paragraph par rightjustifythefollowing This is the first line Mt This is the second line si The third bf The last endright justify Beginning of another paragraph To get End of a paragraph This is the first line This is the second line The third The last Beginning of another paragraph def rightjustifythefollowing par chcode 15 12 penalty1000 wekip 12pt let rjn rj rj cheode 15 12 Mef rj 1 rjustline 1
101. ints Its Name Anthony Siegman asks whether it is possible to devise a TEX macro that will process a one word argument as both a word of text and a control se quence Suppose the argument is entered as name or al ternatively as name one or the other not both He wants a macro that will a Accomplish the result xdef name count 4 b Put both the numerical value of name and the word name into the output text c Send both the numerical value of name and the word name to an external file Mike Spivak has written the following sequence def findname chcode 134 12 findit def findit 1 finditt 1 endd def finditt 1 2 endd gdef thename 2 chcode 134 0 which allows the input findname foo to define thename to be foo However despite appearances Mfindname has no parameters M00 is the text following findname This technique il lustrates that TEX can be made to treat what ap pears to be a control sequence as two tokens the text character X followed by a word of text It can not be extended to solve the complete problem presented by Siegman since once TEX has determined the character class of a symbol the character cannot be reinterpreted Thus any one occurrence of the four characters foo can be interpreted either as four text characters or as one control sequence but can not sequentially be interpreted both ways Nevertheless macros approximating what has been asked f
102. ion feature INITPROCEDURE not supported by the Berkeley compiler INITPROCEDURE was changed to a proper procedure and a call placed in the statement part of the program Goto statements in procedures ERROR and QUIT provoked a diagnostic during the assembly phase T he statements were sufficiently displaced from their target that the preferred instruction could not be used its displacement field is too short An assembly option is available that requests the longer jump We decided to move procedure QUIT adjacent to the program statement part and change the goto statement i in ERROR to an invoca tion of QUIT Support Tools Stanford and Berkeley were extremely helpful when support was requested We particularly ap preciate the efforts of I Zabala Stanford and P Kessler Berkeley We used a screen editor based on EMACS and many of the standard UNIX tools A lex pro gram was invaluable for performing simple source analysis and transformation The Stanford pro grams DVITYP PLTOTF and TFTOPL were also invaluable for understanding the interfaces and as roots for other programs Following is a list of auxiliary programs and their function DVITYP Stanford program that provides a for matted dump of a DVI file Converted to VAX without the random access feature Essentially no program changes required DVIDEC Stanford program that provides a raw dump of a DVI file No program changes re quired 31 tfmdec Progr
103. ion as the page dimensions the placement of headings and page numbers the fonts to be used with different types of text etc These specifications had been chosen so as to make the book as beautiful and readable as possible Book designers use their experience with book formatting and a long cultivated sense of aesthetics to choose a combination of design specifications such that the total effect is pleasing to the eye as well as ap propriate for the type of book being published This is the art of book designing Turtle Geometry is a textbook dealing with mathematics physics and computer science It con tains mathematical equations computer program listings and figures interspersed with paragraphs of text The book designer decided how each 68 of these objects should be formatted so that the book would be readable and would have the right style Each of these objects seemed to have fairly simple formatting there were no fancy footnotes or other objects requiring complicated formatting so I didn t anticipate any problems with the formatting of individual objects However the book as a whole was sure to present some problems because there were literally hundreds of figures and equations that had to be formatted I hoped that using a computer formatting system would allow me to cope with this problem better In retrospect formatting individual equations and figures didn t present many problems The hard prob
104. ional way of comparing two situations The fundamental problem with implementing high level abstract formatting goals in a text for matting system is the problem of achieving a goal Supposing that you have a way of unambiguously stating fairly complex aesthetic rules how is the computer to make sure that they are achieved Ex actly what can the formatter do if the formatting it chooses disobeys one of the aesthetic rules Consider the low level decisions that amp formatter makes when formatting a document The decisions about exactly which word to break a line at or exactly how much to stretch a line are fairly arbitrary Unless the user specifically specifies it the formatter has a fair amount of leeway as to exactly how the document is formatted Ideally the low level arbitrary decisions could be influenced by the high level aesthetic rules I admit that I don t know how this could be ac complished but this is obviously what text format ters should work towards As an intermediate step formatting systems should be designed that can ex press the concepts of high level aesthetic goals Even if they couldn t use these goals to influence the for matting process it would be worthwhile simply to flag violations of these rules pointing out to the user places in the document where one or another of the rules are broken This by itself would lead to better formatters producing better looking documents TUGBOAT VOLUME 2 NUMBER 3
105. ith def RBW 1 2 Repeat Middle 2 Lower 1 Repeat Below With def Fi1 dut QQLine def goodbreak vfillnull vfilneg def singiequote char 177 X4 symmetric single quote in tty font def 1par T bss NdefVrpar ATO bee det lbrak T hes de rbrak T hss def comma T det colon T Commastrut def eq T det senaicolon T def poriod T CommaStrut det gets T save0 hboz gt vboz bbox ConterSink CenterSink vhoz to tht0 nul2 editor s note page break for TUGboat publication def constant constant def type Mtype def statenent N ststement det id H identifier def idlist RAW coma id def expression K expression def variable W variable def character Alternatives Middle i character Lower T singlequote singlequote det digits hept l digit def blockbody Ki begin RAN semicolou statenent KH end def siga Alternatives Upper T Middle Lower T Define Progran KW program id lper RAB conma id rpar eenicolon iH block period Fil EndDef Block def labelpart Optional KW labe1 RA conna Hunsigned integer semicolon def c Optional K const Rept id eq constant senicolon def typepart Optional UI type Rept id eq type senicoloa def varpert Optional K var Rept idliet colon type semi
106. k k k x x k amp TEX AT THE UNIVERSITY OF MICHIGAN SUMMARY OF PROGRESS David Rodgers The University of Michigan Computing Center has installed TEX on an IBM 370 148 running un der VM CMS Work continues on converting the system dependent module to run under the MTS operating system on an Amdahl machine The in stallation process would have gone unhindered ex cept for our inexperience with Pascal the VM CMS operating system and the system editor The en tire installation process required about three weeks of full time effort spread over six weeks and prob ably could have been done in half the time by an experienced Pascal VM CMS programmer A device driver has been installed for a Linotron 202 phototypesetter in the Ann Arbor area and we are evaluating options for supporting other proof TUGboat Volume 2 No 3 and final quality output devices available in the University community or through local vendors We are especially interested in exploring the feasibility of using intelligent terminals eg ONTEL as a source of local intelligence for driving printing devices If anyone has had any experience with this sort of output configuration or wants to ex press a prejucide we would welcome an opportunity to discuss them Please write David L Rodgers University of Michigan Computing Center 1075 Beal Avenue Ann Arbor MI 48109 VAX ON UNIX Bob Morris UMASS Boston The Computer Science Department at Cal Tech
107. k page full of equations with double levels sub super scripts fractions differentials and integrals etc in a few seconds over twelve minutes Commercial typesetters estimate at least thirty minutes would be needed even on the most sophis ticated equipment presently available I have also found new and unexpected principles for dis playing several typesizes and typefaces in an im mediately and exactly recognisable way without using graphics that help increase error awareness The speed of the keyboard comes from its physical design rather than other tricks people quite in experienced in typesetting have remarked how easy it is to use and set complex work that would have completely puzzled them beforehand it is good for use by relatively unskilled people I would like to set up production for several kinds of units if there is sufficient interest of a serious nature However until the advent of TEX the worldwide interest in special maths terminals has been minuscule it is now uncertain but prob ably greater That is why I would like to hear of interest from TUGboat readers There are several useful units in mind An Idiot Keyboard for those well versed in TEX that merely generates editable code and or TEX code as a direct output amp Semi Intelligent Keyboard basically an Idiot Keyboard with a video output and able to in teract with a host an Intelligent Keyboard with a monitor and two floppy discs abl
108. leases and incorporate comments and criticisms into TEX 370 and will publish those changes periodically to users who have ordered TEX 370 No promises are made or implied about responses outside of such newlet ters but we do welcome feedback and will try to act on it We also plan to implement output drivers for several output devices attached to our 3033 3081 These will be announced as they are implemented TEX IN ISRAEL Jeffrey S Rosenschein Stanford University Over the past summer TEX was brought up at the Weizmann Institute of Science in Rehovot Israel It is running there on an IBM 4341 under CMS with the Imperial College Pascal P4 compiler and producing output on a Versatec 1200 A Many of the issues addressed in this implemen tation of TEX have been treated repeatedly in previous issues of TUGboat with regard to other machines and other versions of Pascal neverthe less for the sake of completeness I will briefly outline the major points of interest It should be noted however that this was an old version of TEX received from Stanford in January 1981 Editor s note David Fuchs comments H ia un fortunate that Jeff had to use an old version of TEX Pascal Most of the following points had already 2 been cleared up by Ignacio Zabala and Eagle Berns while Eagle was working on compiling TEX under Pascal VS Because Pascol VS packs records and has an OTHERS construct it seems more suitable for the curren
109. lems arose when I had to deal with the formatting of the book as a whole In part this is because TEX can handle low level details beauti fully but cannot deal directly with higher level for matting concepts I will discuss this problem more thoroughly later LEARNING TEX f After talking with the book designer I had to learn about TEX I knew that Donald Knuth at Stanford University had developed TEX in order to format his series of books The Art of Computer Programming Supposedly TEX was a book quality typesetting system particularly optimized for for matting mathematics So I picked up amp copy of Knuth s TEX manual and proceeded to read it My first impression was that TEX was very com plicated Knuth s manual tries to present the lan guage gently a little at a time so that the reader is not overwhelmed but it only succeeds in being confusing This style only served to make it difficult to use the manual as a quick reference Eventually I wound up reading the manual cover to cover three times until I had a good idea about how the whole TEX system worked TEX can be used to produce very high quality formatted output on a high resolution printer However this comes at a price The TEX user has to specify exactly how he wants to format his docu ment using a complicated formatting language TEX is an improvement over many other formatters in that it uses some of the vocabulary and concepts of printing and typesetting but
110. luded in the next TEX manual One point to keep in mind is that the character widths in a PXL file are exactly as in the TFM file Since the magnification factor is not taken into ac 11 count a DVI to device program should multiply the widths by the product font design size X overall job magnification X font magnification x 254000 RSU inch X 1 22 point FIX X 1 72 27 inch point to get the effective character width in RSUs Of course this multiplication should only be done once per character per job It is sometimes valuable to be able to control the magnification factor at which documents are printed For example when preparing document masters that will be scaled down by some factor at a later step in the printing process it is helpful to be able to specify that they be printed blown up by the reciprocal factor There are several new features in TEX to allow for greater ease in the production of such magnified intermediate output TEX should be thought of as producing as out put a design document a specification of what the final result of the printing process should look like In the best of worlds this design document would be constructed as a print file in amp general and device independent format Printing a magnified copy of this document for later reduction should be viewed as the task of the printer and its controlling software and not something that TEX should worry about But real world constraints m
111. ly the same way as alternatives Repest Upper one Middle two Lower three The same rules apply as before except that you are not allowed to leave out the Widdie This is not the same as specifing an empty middle which you might often want to do ven Repeat Upper one Middle Ropeat Middle one Lower Sometimes a chart gets too wide for the page and TEX breaks it up into lines as if it were a paragraph If this is want you want fine but if you are in unrestricted horizontal mode you can make a nicer transition to a new line by using WewLine Look at Appendix B for examples of this Now you know about all of the constructions They can be nested in any way you please up to a depth of four One way to get around this limit is to save away the innermost parts of the diagram in amp box and call it in when you need it You can say AllocBoz catrlseq to define catriseq to be a digit indicating a box that you can use this way your box usage won t conflict with that of the syntax chart macros Remember to use braces to enclose the section in which you use AllocBox 80 that the box number can be used again If you exceed TEX s varsize limit the usual solution is to force a page eject so TEX does not have to keep so much stuff in its memory To use the macros say input SynChart near the beginning of your file When you actually want to make a chart say NSyntaxChart to set up the baseline
112. magnification to 2000 The difference will be in the dimensions of the pages in the first case the output will be say 8 5 by 11 pages filled with double size fonts while in the second case the output will be 17 by 22 pages with double size fonts This is a new document so it is bound to con tain outright errors along with the portions that are merely misleading I would certainly be glad to hear of any errors but I am also interested in which parts of the explanation need clearing up either by add ing to or changing the text TUGboat Volume 2 No 3 13 so mine is driven through a 300 bit per second terminal line and my APPLE II I have constructed a protocol to compress the page image for transmission the way a FAX machine would during a previous weekend but even so it takes about half an hour to print a moderately complex page I made one change to SYSDEP and LVSPOOL for the sake of convenience I changed all references to TEX to be instead TEX I did this because I didn t want the administrative hassle of setting up TEX as a top level directory so instead I put TEX into a sub directory and defined the logical name TENG to point to it I recom mend thisto all users of TEX on VMS since it makes using TEX more convenient I had one problem with TEX I compiled SYSDEP with CHECK and sometimes when loading a font I get a subrange error in MAKEPTS I am looking forward to the final version of TEX for t
113. matting macros so that the resulting TEX file will generate a structured documentation The definitive TEX which will be officially known as TEX82 will of course be defined as a web At present I m finished with the hardest 20 per cent of this revision There will be no SYSDEP module as in the present implementation the system dependent parts will however be much simpler than they are now and their TEX specific features will be moved to systern independent parts of the implementation The best way to speed up the process of TEX82 installation seems to be to prepare for it in advance by installing the WEB system Therefore I plan to distribute preliminary copies of the following in mid November 1 WEB User Manual hardcopy 2 WEAVE WEB the WEAVE program in WEB language 6 TUGboat Volume 2 No 3 3 TANGLE WEB the TANGLE program in WEB language 4 TANGLE PAS the PASCAL program that TANGLE outputs when you apply it to itself 5 WEBHDR TEX macros used to print the output of WEAVE You need 4 for bootstrapping after which you can change TANGLE and WEAVE as needed for your system A few system dcpendent subroutines are present in TANGLE and WEAVE but the necessary changes are trivial compared to those in the existing TEX so I doubt if it will take long to instali this system The bootstrapping process is a little interesting First you change the system dependent parts of TANGLE PAS and TANGLE WE
114. may have noticed that the current way that rasters are stored is fairly waste ful of space Why should a new raster row begin in the next word rather tban the next byte of the raster description The answer is that this is for the sake of the poor people who are doing page painting for their Versatec Varian on their 32 bit mainframe computer All the extra zeros help them write a faster paint program An alternate as yet unimplemented PXL format would pack the rasters TUGboat Volume 2 No 3 tighter for the sake of those who have a minicom puter dedicated to doing the painting process Such byte packed PXL files will be identified by a PXL ID of 1002 A straightforward utility program can convert between word packed and byte packed PXL files For those of you still in a fog about character widths here s more prose The intent is that a DVI to device program should look like DVITYP always keeping track of the current position on the page in RSU coordinates DVITYP looks at TFM files in order to get the character width info necessary to interpret a DVI file in this way The DVI to device program shouldn t have to open a lot of TFM files in addition to the PXL files it will be needing so the system has redundant width information for each character a PXL file has all of the character widths exactly as they appear in the TFM file in units of FIXes Thus the DVI to device program can completely interpret a DVI file by getting charac
115. mma expression Optional T CommaStrut ezpression rbrak Define Factor Fil Alternatives Middle N unsigned constant Lower variable Lower N function identifier Optional actualarglist Lower 1par expression rpar Lover KiHnot M factor Lower box subchartbox Fi1 Fil EndDef Define Variable Fil Two lts N variable identifier W field 1dentifier Repeat Upper T char 136 Middle Enpty Lower N selector F11 Fi1 EndDef V efine Selector Fil Alternatives Upper period N field identifier Lower lbrak RBW comme ezpression rbrak Fil Fil EndDef end of Expression vfil eject Define Constant Fil TroAlts sign TwoAlts W constent identifier i unsigned number I T singlequote Rept character T singlequote F11 P4 EndDef Define Unsigned constant Fil A ternatives Middle N constant identifier Lower N unsigned number Lower KW ni1 Lower T singlequote Rept character T singlequote FAl F11 EndDer Define Unsigned nusber Fil digits Optional period digits 0ptional T E sign digits Fi1 Fil EndDef Define Unsigned integer F11 digits Fi1 F41 EodDef Define Identifer Fil W letter Repeat Upper W letter Middle Lower i digit Fi1 Fi1 EndDef H MfilVeject WANKER End of PascalSyntax TEX 52 TUGboat Volume 2 No 3 Block e semer res
116. n the original were true but since the AMS version of TEX doesn t yet support that feature they were replaced by ordinary dimensions 57 The input looks like this vbox bbox to 7 5cm vrule height 5pt Ve 10 09 4 Ne 1 74 3 Ve 4 25 9 Ve 0 38 3 end of hbox brule hbox to 7 5cem vrule depth Spt 4 2 1 2 1 2 1 241 2 1 2 1 2 1 Mass Send of bbor vskip ipt nbox to 7 5cm eightpoint American Mineralogist bf 55 1100 1970 hfi11 2 theta toright end of vbor The hss following the 1 2 line is used to avoid an overfull box exactly the width of the last vrule And finally here i is the artiele we ve been talking about HEMIHEDRITE ZnF Pbs CrO4 3SiO4 2 Morph Triclinic Pedial 1 C Habit Well formed doubly terminated crystals from 0 2 to 10 mm in length Elongated parallel to 001 with 80 forms reported Twins most com monly by reflection in 223 as penetrations of crystals of opposite hand to form an X V or Y shape with c inclined at B Less commonly by reflection in 010 also by reflection in 012 Phys H 3 pmeas 6 42 Peace 6 50 poor cleavage on 110 Color bright orange to henna brown to almost black Streak saffron yellow Munsell 5Y8 10 Struct The structure is similar to those of the tsumebite series and contains a Zn coordinated by four O and two F the Pb environments are quite varied Cr and Si are regularly four coordinated by O Occur In a secondar
117. n the tensor parameter lists and then join repeated indices by curved lines In conclusion There have been several suggestions some implemented for interspersing TEX output with computerised graphics It should be emphasised that our proposal is rather different from these We are asking for both more and less More in that we would like our bubbles to be device independent in the same sense as TFX itself Less in that our graphical requirement is modesty itself merely the ability to draw the crudest of boxes and to join them with the simplest of curves Yet it may be that this kind of extension the incorporation of graphical elements into the ac tual text will prove more significant in the long run than the ability to draw the most beautiful of diagrams 0 3 5 3 t 5 k o TUGboat Volume 2 No 3 CHARTING YOUR GRAMMAR WITH TX Michael F Plass Xerox Corporation Are you one of those people who would rather look at a syntax chart than a BNF grammar Do you avoid making a syntax chart for your language because it is too hard to draw or too hard to typeset If so this is the article for you Pay attention and you will learn how to use the macros below to create your own syntax charts with TEX First some basics Every component of the syntax chart is enclosed in a TEX box with the entry and exit points on the left and right sides of the box aligned with the baseline Usually the entry point is on t
118. n words 4 X through 4 X 3 of the Font Directory For ex ample if the second to last word in a PXL file con tained the value 12000 then words 12324 through 12327 of the PXL file contain information about the ascii character Q since ascii Q 7121 octal 81 decimal and 4 81 324 The meanings of a character s four Directory words are described below The first word of a character s Directory Information has the character s Pixel Width in the left half word and its Pixel Height in the right half word These numbers have no connection with the height and width that TEX thinks the character has from the TFM file rather they are the size of the smallest bounding box that fits around the black pixels that form the character s raster repre sentation i e the number of pixels wide and high that the character is For example here is a letter Q from some PXL file 00 01 x kkxxXck 02 O3 do 04 x eek 05 x kkx 06 kk 4 kkk OT Kee kkikkk aks 08 kkkkkkkxx kkeksk 09 kkkxx ee 10 Ree xe xL 11 1 kee 12 X xx x 43 ia sis kakak kakak 14 kaiki 15 2 iut xkkkx 000000000011111 012345678901234 The rows and columns are numbered and the ref erence point of the character is marked with an X but only the stars and dots are actually part of the character stars represent black pixels a
119. nas Palo Akto CA 94304 MACC COLE J M Stanford CA 94305 415 494 4810 e et Wacan Lee TS Mont PLASS Susan Madison Wi 53706 Leyburn McCOURT Scott Poe 203 08 252 8821 CR ve ne Beet in Center for Information Technology THEDFORD Rila J ka Elegy Tededogy Caner Corporate Drive Commerce Park rd A dar Caine ferry Rond Mere 415 497 1322 e Church Set Morgantown WV 26506 PRICE Lynne A Ann Arbor MI 48107 204 508 7178 MeKAY pisei 0 aM ere 313 164 1228 DIAZ Max Computer Scienca Department neo TRABB PARDO Luis TIMAS UNAM Box 70 Station B cA Department of Computer Science Apartado 20 726 Nashville TN 37235 3 Pul Stenford Universi Mexico 20 D F Meo 615 322 6517 Stanford CA DOHERTY Berry MILLIGAN Patrick RODGERS David L WELLAND Robert Amaran Mathemebesi Society Bell Northern Research lac ae Computing Conie C partment of Methemetics P O Bou 6248 685A Middiefieid Road kan Ace MI 48109 Northwestern University Providence RI 02940 Mountain View CA 94043 2033 Sheridan Rood 401 272 9500 415 969 9170 ext 2837 ROSENSCHEIN Jeffrey S Evanston IL 60201 FRISCH Michael J MOONEY James D Computer Sconce Department 312 064 2090 208 Union St S E Department of Statistics and Computer Science Stanford CA 94306 WHIDDEN Samuel B University of Mi West Virginia University American Methanatical Socisty imeepdia MI 55455 Morgantown WV 26506 SAMUEL Arthur L P O Bon 6249 eee 304 293 3607 Providence RI 02940 612 373 4599
120. nd dots represent white pixels Note that the Pixel Width is just large enough to encompass the leftmost and rightmost black pixels in the character Likewise the Pixel Height is just The first four words of the 9 large enough to encompass the topmost and bottom most black pixels So this Q s Pixel Width is 15 and its Pixel Height is 16 so word 12324 in the ex ample PXL file contains 15 216 16 The second word of a character s Directory Information contains the offset of the character s ref erence point from its upper left hand corner of the bounding box the X Offset in the left half word Y Offset in the right half word These numbers may be negative and two s complement representation is used Remember that the positive z direction means rightward and positive y is downward on the page The offsets are in units of pixels In our Q example the X Offset is 2 and the Y Offset is 12 so word 12325 of the example PXL file contains 2 216 12 The third word of a characters Directory Information contains the number of the word in this PXL file where the Raster Description for this character begins This number is relative to the beginning of the PXL file the first word of which is numbered zero The layout of Raster Descriptions is explained below The Raster Descriptions of consecutive characters need not be in order within a PXL file for instance the Raster Description for character Q might
121. ne Letter A Terminal A EndDef Letter A 1 More complicated charts are built up by means of sequencing alternation and repetition of simpler 39 charts To illustrate the way these work we will as sume that the control sequence Nane has been defined to be Wonterminal one and so forth Sequencing is easy to do just put the subcharts together Vae vires Alternation is a bit more complicated to specify Here is an example Alternatives Upper one Middle two Lower three Lower four There may be any positive number of choices listed as the argument to Alternatives and each choice is marked by enclosing it in braces and preceding it with Upper Middle or Lower Things marked with Upper go above the baseline things marked with Lower go below the baseline and something marked with Middle goes on the baseline It is permitted to omit any one of these three kinds of tags Alternatives Midd1e one gt Lower two Lower three Alternatives Upper one Upper two Lower three Alternatives Upper one Upper two Middle three Sometimes a stack of alternatives can get very tall in this case it might be better to spread them out horizontally HorzAlternatives Alternative one Alternative two Alternative three This one is especially appropriate for a long list of short choices 40 Repetition is specified in almost exact
122. ng at the same time It was very difficult to coordinate these separate activities Another problem which is sure to occur whenever a document is available on a computer system was that of freezing the text of the document When it is easy to change the text authors are very reluctant to finish editing There is always a great temptation to fix one more error At some point however it is necessary to decide that the text will not change any more A typical example of the organizational prob lems I had to deal with was that associated with putting the figures in the book It took a long time to get the figures drawn and checked Until the drawings were in final form I couldn t measure them and give these measurements to the figure macros Therefore I couldn t do the page formatting since the sizes of the figures critically affected the location of page breaks To cope with this situation I worked on each chapter separately so that at any one time different chapters could be at different stages of production the authors might still be editing the text of chapter 5 while I was sizing the figures for chapter 1 and formatting its pages 1 made many mistakes and had to do some things several times I was learning what to do and developing new methods for doing things while I was formatting the book Everything would have been much better if all of the people working on Turtle Geometry had sat down before the work was started an
123. ng right hand page Alternately if the place where the program was to be broken was only a few lines into the program I might just break that page short notice that in this second case I may be breaking the third aesthetic rule Making an aesthetic decision of this sort involves finding amp compromise between several contradictory goals The problem of formatting amp document with respect to certain aesthetic formatting goals can be reduced to the problem of considering two situa tions where amp part of amp document is formatted in two different ways and deciding which is better Usually there are only a few possibilities to consider 74 in any formatting problem and a computer could afford to try the various possibilities and pick the best one The key to this problem is obviously determining what the word better means with respect to a set of high level aesthetic formatting goals It is instructive to examine a mechanism that TEX has for dealing with this problem on a lower level In order to optimally generate line breaks and page breaks within a paragraph TEX associates an integer with each paragraph known as its badness Every line break generates a certain penalty another integer which indicates how bad that break is Line breaks have large penalties associated with them if the break requires hyphenating a word or if a line is too long among other things Page breaks in a paragraph
124. nges a through d of TEX and TEXPRE are identical for SYSDEP there is no INITPROCEDURE so CONSTANT VALUE variables were changed to STATIC data e The TYPE CHAR9 was changed to STRING 9 f All files were changed to type TEXT g ASCII translation in and out and to and from EBCDIC was added via the chrX and ordX ar rays h Terminal I O was modified so that files would not be RESET for each reference necessary for a BATCH environment i RESET and REWRITE statements were modified for PASCAL VS j The routine INTOUT was replaced with an al gorithm more suitable for HEXadecimal arith metic TUGboat Volume 2 No 3 k Octal computations and constants were changed to HEX 1 A POSTAMBLE file called PST is created in CLOSEOUT to make this information easier to ac cess using standard IBM access methods m The DVI file is always named DVI so that the same DDname may be used in batch JCL n Code relating to DIRECTORY references was com mented out it is not needed in PASCAL VS o The FONT file directory was changed to a VS partitioned data set A tape containing the source for our version of PTEX TEX 370 will be available soon For details on obtaining a copy write to Susan Plass C I T Systems Polya Hall Room 203 Stanford University Stanford CA 94305 When available TEX 370 will be supplied on an IBM standard labeled 1600 bpi tape please don t send us a tape We plan to fix bugs implement new re
125. nough to allow varying heights etc later if that proves necessary The string in quotes following the width contains the instructions for printing the eharacter on the Diablo The backslash introduces control sequences with the following meanings bn set HMI to n i e n 120 inch r reset HMI to standard setting n 10 Wn set VMI to n i e n 48 inch Mu move up Md move down f move forward b move back MAN print or Some of the more interesting characters in DIABLO TBL are listed in Appendix B Diabolic points The horizontal resolution of the Diablo is 1 120 inch and the vertical resolution 1 48 inch All movements are through multiples of these We therefore found it convenient to introduce a horizon tal unit hu equal to 1 120 inch and a vertical unit vu equal to 1 48 inch For the moment we have actually re defined point to have these 2 meanings according as they refer to horizontal or vertical measure This en sures that actual movements all take integer values simplifying the arithmetic of width tables etc However the machinery to implement proper points is all in place The Diablo driver Given the format of DVI files the driver for a particular device almost writes itself and indeed most of our driver is actually device independent A very abbreviated version of the driver may be found in Appendix C All PROCEDURE head ings are given but where there are several similar 17
126. nt a good ex ample of formatting languages which work at too high a level for many formatting tasks As long as the shape of your document conformed to the ideas explicit in the formatter s abstract paragraphs and words it would be easy to to format your docu ment However if your document contained some thing out of the ordinary that the program was not equipped to handle there was little that you could do No matter how much effort you were willing to expend to specify the detail these early formatting languages wouldn t allow you to The user simply had very little control over the formatting process The shape of a document had to be specified in terms of the objects the formatter was built to deal with then the user would just have to throw it to the winds and hope the formatter produced something acceptable TEX is similar to these early formatters in that it deals with abstract ideas such as paragraphs and pages and the user only has indirect control over how these objects are formatted However TEX also can deal with the idea of boxes and glue which allow a user to specify an object at a very low but manageable level This facility is very useful for handling special case objects such as complex figures which would be too complicated for TEX to deal with as built in objects In essence TEX allows the user to deal with formatting at two distinct levels of detail or control Either you can throw your format
127. of its Raster Description The next most significant bit in the first word corresponds to the next to leftmost pixel in its top row and so on If the character s Pixel Width is greater than 32 the 33rd bit in the top row corresponds to the most significant bit in the second word of its Raster Description Each new raster row begins in a new word so the final word for each row probably will not be full unless the Pixel Width of the character is evenly divisible by 32 The most significant bits are the ones that are valid and the unused low order bits will be zero From this information it can be seen that a character with Pixel Width W and Pixel Height H requires exactly ceiling W 32 H words for its Raster Description In our Q example words 600 through 615 would have the binary values shown here high order TUGboat Volume 2 No 3 bit on the left 600 00001111111000000000000000000000 601 00011111111100000000000000000000 602 00111100011110000000000000000000 603 01110000000111000000000000000000 604 11110000000111100000000000000000 605 11100000000011100000000000000000 606 11100000000011100000000000000000 607 11100111110011100000000000000000 608 11111111110111100000000000000000 609 01111100111111000000000000000000 610 00111100011110000000000000000000 611 00011111111100000000000000000000 612 00001111111001110000000000000000 613 00000000111011100000000000000000 614 00000000011111100000000000000000 615 00000000001111100000000
128. olume 2 No 3 standard Pascal features and sensitivity to differing machines The two main suggestions are 18 The OTHERS construct should be removed once and for all it has no place in code that is advertised as portable especially not in the actual TEXPRE and TEX modules as opposed to the SYSDEP module Its removal was time consuming and it should not have to be carried out repeatedly at various installations At times finding the correct values to use in the IF THEN construct was non trivial due to nest ing of CASE statements and the appearance of labels within procedures In addition there was an abnormally high chance of an error creeping into the code such an error would be extremely difficult to track down 2 Assumptions about packing should be removed from the code experience has shown that this restructuring is quite feasible Although this will result in slight degradation of TEX s efficiency at some installations it will cause TEX itself to be implemented with much greater ease This is especially crucial in the READFONTINFO routine where insufficiently explained assumptions about packing led ini tially to a serious implementation error To help increase efficiency at those installations with correctly packing compilers helpful hints on how to convert certain code should be included with the documentation the default however ought to be code that will run even in amp non packing environment k k k x
129. on for PXL format is contained elsewhere in this issue p 8 Our spooling software for Varians Versatecs has been updated to use PXLs PXL files supersede the older VNT format and have the following ad vantages 1 They include sufficient information to be used with TEX s magnification features TUGboat Volume 2 No 3 2 I have added a PXL mode to METAFONT so that PXL files can be made directly for METAFONT fonts 3 The internal layout of PXL files has been im proved to allow for more efficient operation of spoolers that must deal with them 4 The layout is also such that PXL files can be written sequentially from METAFONT which will aid in writing a transportable version of METAFONT k k ks ks k k t k ok k X TEX UNDER THE NORTH STAR Michael J Frisch University of Minnesota I have made some progress on the CDC Cyber TEX at the University of Minnesota since the last TUGboat but at this writing October 1 it is not ready for distribution There are a few known bugs in my version of TEX and a possibility that more bugs will show up during further testing I believe that most of the bugs are in my implementation rather than in the original Stanford version As a result I can t give an estimated release date I have a working though probably not debugged device driver program for our Varian plotter The device driver is written in machine dependent FORTRAN since I can write and debug code much fa
130. or S may be above T or vice versa The choice is made by the author on aesthetic or other grounds e g to minimise the entanglement of arms In this case for example the natural solution would be to place S above T Proposed macro definition We shall use the control sequence NT for rectan gular tensors with upper and lower arms The control sequence NT has 3 parameters First the name or symbol possibly null of the tensor Next the upper arms followed by a comma and then the lower arms e g NT Sij MTijk In other words the definition starts def T 1 2 3 C Turning to the 2 4and 3 sparameters each of these consists of an hlist But the members of each list are in a strange new font having the property that all letters in this font are represented by dots of width say 1 em The dots are positioned on the top and bottom edges of the box and serve 1 to determine the width of the box 2 to define the ends of the arms and 3 to label these arms Finally and this is the difficult part wherever a letter occurs twice in the parameter hlists of ten sors the corresponding points must be joined by lines These joining arms must leave each tensor at right angles to the box their paths being defined thereafter by cubic splines a la METAFONT Other tensor shapes We would like at least 2 other tensor formats First we should like to allow arms to emerge from all 4 edges of a rectangular box This migh
131. or can be written Instead of defining a macro Moo the following setname macro given the argument foo allows another macro to return the value of count4 at the time setname foo was called This new macro is invoked by a single character Q so in effect the control sequence defined by setname is foo rather than Moo Of TUGboat Volume 2 No 3 course Qfoo is not really a control sequence but it may be used as such Actually foo is an argu ment to the macro Q Q expects its parameters to be terminated by a space the user must remember to include such a space even in situations e g be fore punctuation where it would not be required for an actual control sequence The setname macro defined below defines a list of its arguments on successive calls separated by semicolons and a similar list of the values of count4 each time it was called The macro Q then looks through the list of names until it finds the one matching its argument and returns the correspond ing count4 value Used to put a space between the number and name output by send def space 5 Initialize lists def namelist def number1list Define a new name def setname 1 xde nanmelist nanelist 1 xdef numberlist numberlist count4 xdef number Number followed by Ncount4 5 space 1 Put numerical number 1 value amp word into text send9 number space 1 Send number amp name to exte
132. ormatting details This may be required by local font and device limita tions see the article by John Sauter p 34 and the excerpt from his output p 13 or the author may simply have his own idea different from mine of how his article should look in print Whenever possible I try to accommodate the author s ideas so long as they do no violence to the articles which will follow when the issue is put together Often this can be accomplished very simply quarantine an article from the rest of the issue by putting braces at the beginning and end This was necessary for Brendan McKay s ar 23 ticle in vol 2 no 2 pp 46 49 any attempt to revise the format would have taken too long and would certainly have resulted in unfortunate errors Another technique is to lay out the pages in such a way that the singular item begins on a new page and deal with it separately adjusting page numbers as required This is obviously necessary for material received as camera copy but another reason would be that between the standard TUGboat set and the author s there are too many control sequences to fit in the hashtable Mike Plass article on syntax chart macros p 39 is an example of this condition While I m on the subject of the hashtable I should note that here at the Math Society we ve found it necessary to change several of the size values that show up in the error message TEX capacity exceeded TEX manual p 1
133. p Vanilla TEX pas except for the deletion of common subroutines and types sysdep p SYSDEP PAS DOC Section 16 64 max min and output routines basicio p SYSDEP PAS Section 23 Basic I O pro cedures string p SYSDEP PAS Section 17 The String Handler filename p SYSDEP PAS Section 51 Scanning File Names infont p SYSDEP PAS Section 57 Reading Font Information fetchdata p SYSDEP PAS Section 71 Retrieving Data Structures storedata p SYSDEP PAS Section 69 Storing Data Structures globsysdep h SYSDEP PAS Global variable and pro cedure declarations for SYSDEP globconst h SYSDEP PAS Global constant definition part TUGboat Volume 2 No 3 globtype h SYSDEP PAS Global type definition part globexternal SYSDEP PAS Global procedure and function definitions The program declaration must include the file output Program declarations were edited to conform to the Report Variables declared to be structured types that require more than 64 536bytes of allocated space provoke a diagnostic Berkeley was contacted regarding the limitation on the size of structured types My understanding is that the limitation should only apply to the use of those variables not to their allocation The diagnostic was not present in Version 4 1 we were provided a fix for Version 4 0 The fix required the deletion of the diagnostic and rebuild of the compiler PTEX uses the compiler specific initializat
134. p Dues and Privileges 1982 dues for individual members of TUG will be 15 Membership privileges will include all issues of TUGboat published during the membership calendar year All new members and other persons inquiring about TUG will be sent TUGboat Vol 1 No 1 but after January 1 1982 Volume 2 1981 will be available only as a complete volume at 10 Beginning in 1982 foreign members will be able on payment of a supplementary fee of 12 per subscription to have TUGboat air mailed to them TUGboat Schedule The deadline for submitting items for Vol 8 No 1 will be February 12 1982 a month after the Cincinnati meeting the mailing date will be March 15 Contributions on magnetic tape or in manuscript form are encouraged editorial addresses are given at the bottom of page 2 and a form containing instructions for submitting items on tape is bound into the back of this issue It is TUG s policy to keep all issues of TUGboat in print Each member is entitled to receive all issues which appear during the membership year as well as Vol 1 No 1 Domestic subscriptions are mailed third class bulk which may take up to six weeks to reach its destination foreign shipments are surface printed matter unless the air mail option is elected If you have not received an issue to which you are entitled write to TUG at the address given on the order form for general correspondence 5 x k k kf 5 General Delivery k k
135. page xcol is the column number xcolmax is the total number of columns per page xcolwd is the number of points each column is wide and intercol is the number of points skipped between two adjacent columns def howwide setcount8 xcol setcount3 0 sowide def sowide advcount8 by 1 Nadvcount3 by xcolwd ifpos8 advcount3 by intercol sowide else xdef thiswide count3 pt output howride Mif xcolmax xcol output headers vbox to size hbox to thiswide hfil page if xcolmax xcol output footers gdef xcol 1 Nelse add 1 to xcol I even use this to calculate the total page width needed for e g running heads TEX s arithmetic is more reliable than mine def xcol xcolmax howwide xdef pagewd thiswide pt I ve used this technique to put together pages of up to 6 columns if xcolmax gets much larger Mike Spivak s result trick vol 2 no 2 p 50 has to be used to avoid a nesting level error on sowide The DVI file now contains xcolmax pieces for each publishable page each of which has the same reference point upper left corner It merely remains for them to be overlaid by the output device driver which is assumed to have pasteup capability Yet another header file is used to prepare the Errata list You may already have noticed that the current one has been TEXed unlike those sent out with previous issues There s a good reason for the delay all the previo
136. ppreciated by anyone who has tried to look up the syntax for a control sequence in the TEX manual Trying to find the right page can be frustrating Though we have the hooks for help we currently lack the content If anyone has a machine readable base of information on TEX syn tax and usage I would certainly appreciate hearing from you Another problem which I rectified was the fact that all fonts which were defined were written into the postamble whether they were actually used or not Since basic tex defines about amp dozen fonts the spooler spent a very long time loading in fonts which were not used This was easily cor rected and was the only modification which en volved TEX PAS itself all other changes being con tained in SYSDEP PAS Barry s programs LVSPOOL which I renamed TEXSPOOL and READDVI were also modified to open DVIFILE rather than TEXOUT DVI TEXSPOOL was changed to refer to the Versatec as LVAO rather than LPAO since we had already assigned LPAO to our line printer TEXSPOOL had a minor error in that it would crash if you tried to print an undefined character from a font In general this doesn t really matter but it makes the produc tion of a font book quite difficult A trivial fix took care of the problem 34 Future work involves speeding up TEX initializa tion perhaps I ll just wait for the new Pascal version from Stanford which supposedly will eliminate the need for much o
137. pro gram DVITOLP to drive lineprinter class devices Yes many users do need such primitive output To get this to work I had to construct with trepidation understanding little of the format a new TFX file to represent line printer fonts Font CMTT which simulates such a font was not satisfactory All widths in this font are set to 7 2 points ten pitch there is no kerning or ligatures wordspace is set to 1 2 points with zero shrink and several parameters I didn t understand were left alone But this font seems to serve the purpose as long as all spacing parameters in the text are appropriately restricted Anyone interested in obtaining the programs cited above should contact Jerry Craig Morgantown Energy Technology Center B1 330 Collins Ferry Road Morgantown WV 26505 304 599 7178 Technical questions can be addressed to me at Dept of Statistics and Computer Science West Virginia University Morgantown WV 26506 304 293 3607 Meanwhile I await word of a TEX version which may be adspted to run on our PDP 11 34 which has 15 UNIX v6 and the rather strict ISO standard Pascal from Vrije University Amsterdam kok kok ok 4 Ok 34 DIABOLIC TeX Timothy Murphy Trinity College Dublin Preamble Before TEX can be run with a given output device 2 modules must be provided an input module consisting of a set of font tables and an output module or driver which will translate the DVI file produced by the main TEX
138. program into instruc tions for the output device Even for a Diablo writing these modules can prove a time consuming occupation at least for amateurs of the computing art like ourselves Since our only output device was a Diablo Versatecs and Varians being as remote from us as Neptune and Pluto we wrote to all those in the TUG member ship list under the Diablo heading The response was disheartening the few replies we received being from groups in much the same position as ourselves viz Waiting for Godot This brief account of our own efforts may there fore not be out of place At the very least it may shame some of the TEXperts who have well developed Diablo drivers to share their secrets with us beginners The Diablo as printer One can envisage 3 very different ways in which the Diablo might be used as an output device 1 The output could be run through the Diablo 2 or more times with different daisy wheels installed on each iteration e g first with roman then italic then symbol etc The driver would of course have to be designed so that only those characters in the appropriate font were printed on each run 2 The output might be sent through the Diablo just once with a single daisy wheel those characters not appearing on this wheel being made up by superposition of existing characters moved up to the right etc so as to give the required facsimile 3 All characters and symbols might be made up out
139. pter of the book The bookmark macro told TEX that all page breaks be fore the point where it occurs will be handled by explicit eject commands but that TEX should attempt to generate page breaks from that point on I eventually developed a routine for handling the page breaks in a chapter I would insert a few eject commands move the bookmark macro call forward to the end of my ejects and run the file through TEX Seeing how TEX would format the next few pages helped me decide where I wanted to insert page breaks Often I didn t have to do any thing more than insert eject macros where TEX had broken the page before but most of the time I wanted to move figures around and change the TUGboat Volume 2 No 3 exact placement of the page breaks It was neces sary to do this work a few pages at a time because each formatting change I made could send effects percolating through the rest of the document in un predictable ways By doing the page breaking and figure place ment myself I was able to optimize the page for matting with respect to aesthetic rules that I could not express with TEX Consequently I produced a book of very high quality LOOKING BACK Formatting Turtle Geometry was a long difficult job Everything did not go as smoothly as it may seem from what I have said above One prob lem was that the macro development the figure for matting and the editing of the actual text of the book were all happeni
140. resd 4 bytes p new page 130 131 lt start of postamble 132 push stack 133 pop stack e EOP 134 BEGIN vertrule END 135 BEGIN horzrule read 4 bytes p read 4 bytes 9 TUGboat Volume 2 No 3 hor line length 9 H H q END 136 BEGIN overprinting true 137 BEGIN font END 138 BEGIN read 4 bytes w H H w END END ELSE IF 154 b AND b 217 THEN change font f chr b 90 END END The header file TEXDIA H CONST hor spacing 10 vert spacing 8 stack size 125 mem size 3000 max font no 5 standard HMI standard VMI 2 TYPE byte 0 255 half word 0 65535 oneoftwo 1 2 oneoffour 1 4 halves2 PACKED RECORD lhword balf word CASE oneoftwo OF 1 rhword half word 2 byte2 byte byte3 byte PACKED RECORD byte0 byte bytei byte CASE oneoftwo OF 1 rhword half word 2 byte2 byte byte3 byte END memoryword PACKED RECORD CASE oneoffour UF 1 pte real 2 int integer 3 twohalves halves2 4 fourbytes bytes4 END bytes4 END pts real stack range 0 stack size mem range 0 mem size font range 1 max font no fnt store PACKED FILE OF byte font type rm it sy ex tt fontfile FILE OF memoryword 21 k k Ok Gk k g Site Reports kK ks Xk ks x xk k X NEWS FROM THE HOME FRONT David Fuchs Stanford Universit
141. rical services 5 Professor Arthur Samuel is acting for Luis Trabb Pardo as TEX coordinator answering questions distributing tapes and fixing bugs in the TEX source code Luis has asked and the finance committee has agreed that TUG contribute to Professor Samuel s support dur ing 1981 Respectfully submitted Samuel B Whidden Treasurer i k x Kk x k X X g Editor s note Progress continues at Stanford toward the definitive Pascal TEX which we now know will be known as TEX82 The documentation system developed for the first implementation of TEX in Pascal DOC is about to be replaced by something newer and better We ve received permission from Don Knuth to publish his internal status report which we do for injormation only The software TUGboat Volume 2 No 3 5 STANFORD UNIVERSITY STANFORD CALIFORNIA 94305 2085 DONALD E KNUTH Fletcher Jones Professor Telephone Department of Computer Science 415 497 4367 October 13 1981 To Coordinators of TEX implementations From Donald Knuth Subject Current state of things For sorne reason I woke up this morning with the feeling that some of you were wondering what I have been up to recently So I decided to write a short note about present and future plans for TEX I m going to be releasing the definitive TEX early next year The manual will be rewritten and all the code will also be rewritten although of course the existing manual and programs
142. ring Committee list If you are instaling TEX on a computer which is not yet represented and would like to volunteer please get in touch with any member of the Steering Committee if your computer is already 4 listed and you feel that you can offer additional sup port the Site Coordinator is the person to call It is not necessary that the Site Coordinator be the actual installer in fact there is considerable merit in hav ing a Site Coordinator who is technically knowledge able but not actively involved in maintenance of a TEX system since answering the questions of a large user population potential or actual can take quite a lot of time To those who have already volunteered as Site Coordinators and to those who will come forward as the TEX community grows thanks Your attention is also called to another matter of cal characteristics where they may be obtained and other features of interest to sites installing TEX A questionnaire on this subject has already been mailed to all members for more details refer to the question naire and to the article by Rilla Thedford on page 14 x x x xk k e X TUG TREASURER S REPORT October 31 1981 Beginning balance January 1 1981 419 Income 1981 Membership 3 180 1982 Membership 645 1982 Foreign postage 72 Tape leasing 1 400 Tape sales 800 Workshop 7 695 13 792 Current expenses TUGboat Vol 2 No 1 500 copies Printing mailing 1 392 TUG
143. rnal file Retrieve a previously saved value def name 1 xdef nametemp namelist def numbertemp numberlist xdef lookfor 1 gdef action next next 4 Test if next name on temporary list is one needed Note if the name is not on the list an error message will be generated since nosuchname has not been defined def next if Nnametemp gdeflaction nosuchname else Mpply first to nametemp gt nextname apply first to nunbertemp gt nextnumber Apply rest to nametemp nanetemp Mpply rest to numbertemp gt numbertemp stringeq nextname lookfor Mf T stringeqv nertnumber gdef action else action def first 1 2 1 TUGboat Volume 2 No 3 x Returns first token from list def rest 1 2 2 Returns list with first token removed Allow name to be invoked by the single character def nanc chcode 7100213 Testing the Equivalence of Strings To test the equivalence of strings the macro stringeq is called Shown below this macro uses the groupless if techiques described independently by MeKay and Spivak in Vol 2 No 2 4 String equivalence evaluates to T if first argument is same string as second F otherwise 4 stringeq returns its answer by 4 setting stringeqv def true gdef stringeqv T def false gdef stringeqv F Main routine Save arguments in stringa and stringb and start testing
144. rs will have to deal with I would appreciate receiving any comments that anyone may have concerning this article I can be contacted be sending U S mail to Michael Sannella Xerox PARC 3333 Coyote Hill Road Palo Alto CA 94304 Or for those of you with access to the ARPAnet by sending computer mail to MJS at net site MIT AJ Formatting Turtle Geometry I worked on this project part time from January 1980 through March 1981 My job was defined very simply to produce a camera ready copy of the book using TEK Aside from that nothing was specified I was confident that this goal was achiev able since Knuth had designed TEX specifically to format his books However I knew that I had a lot to learn about producing book quality copy During the fifteen months I worked on this project I had a good opportunity to observe the interaction between the two worlds of computer text formatting and book publishing Computer formatters are being used increasingly for large commercial formatting projects so it is necessary to investigate how they 87 can be used most effectively I hope that this record of my experiences formatting Turtle Geometry will be useful to those people actively investigating this area DEALING WITH MIT PRESS One of the first things I did after being hired to format Turtle Geometry was to talk with the people at MIT Press the publishers of the book and hear their views on the project The book editor and
145. rt The signed attribute means that amp subrange of 0 255 requires 16 bits Variant records are optimal within this definition This model allocates 64bits for the type MEMORYWORD Note that 64bits would be re quired if reals were shorter Storage economy re quires short reals and signed subrange types or the treatment of certain integers as unsigned The DVI file is byte oriented and is defined as the subrange type 0 255 We changed this definition to be 128 127 The DVI output routine and other routines that interface to a DVI file convert values 2 127 to value 256 on output and convert values 0 to value 4 256 on input TFM files are handled on a similar basis In case statements if none of the case constants is equal to the case index a runtime error is some 30 times reported My experience is that the results are unpredictable PTEX uses a compiler specific feature for default OTHERS case constants We decided to use the following construct if expression in set constructor then case case inder of end else begin OTHERS code follows end This process is performed semi automatically by pedit A program scans the source for case statements inserts the skeleton if statements and generates the set constructor on a auxiliary listing We then manually edit in the set constructor the program also provides a line number directory of all case statements We did some after the fact timing stu
146. ruct if boolesn expression then empty statement else statement A diagnostic is provoked A begin end or system procedure null in place of the empty statement will satisfy the compiler This task was assigned to the program pedit Labels that occur in the label declaration part must occur in the statement part Labels that did not occur in the statement part were edited out of the statement declaration part The diagnostics provided by the compiler were the cues The standard compilation mode treats upper case as different from lower case In the standard mode keywords are lower case A compile option permits this treatment to be suppressed the option specifies that warnings should be produced for non standard Pascal However we could not use the separate com pilation capability if the standard Pascal option was selected We assigned the task of converting keywords and standard identifiers to pedit Separate compilation units are supported by the compiler The compile system rigidly enforces the concept that the fragmented program be equiv alent to its composite model This enforcement is primarily at the compilation and linkage stages We manually reviewed the compilation text and constructed the following compilation units The choice was primarily based on the DOC version experience has suggested better fragmentation texpre p Vanilla TEXPRE PAS except for the dele tion of common subroutines and types tex
147. running on its VAX for about four months now using a Versatec V 80 as an out put device While we were happy to have TEX in house there were a few inconveniences to the VAX version of TEX which prompted me to rework some of the VAX dependent code in Barry Smith s latest release of the VAX Pascal version of TEX The biggest problem was the fact that DEC Pascal can only open files for exclusive use while TEX requires shared read only access for the in itialization and font files as well as common source files such as basic tex Thus if two people tried TUGboat Volume 2 No 3 to run at the same time the second and third were informed that the initialization file TEXINI TBL was locked by another user The quick and dirty fix for this problem well it wasn t really that quick and all in all isn t really that dirty con sidering the alternatives was to write a set of FORTRAN subroutines and functions FOPEN FCLOSE FRESET FGET to simulate the Pascal I O calls for all input files Since DEC FORTRAN supports shared read only access the problem was solved The only negative factor in the conversion is that initialization now takes 30 seconds elapsed time on an otherwise idle system rather than the previous 20 seconds I feel that this time could be shortened dramatically if I could find a free week to re write the entire initialization pro cedure using an assembler routine to block load the data directly into t
148. s A font is specified by the font control sequence which now has the syntax Mont fontcode filename at dimen The at clause is optional If present the dimen sion specified is taken as the desired size of the font with the assumption that the font should be photographically expanded or shrunk as necessary to scale it to that size times the magnification fac tor specified by parameter 12 For example the two fonts requested by the control sequences Mont a CMR10 at Spt and Mont b CMR5 at Spt will look somewhat different Font a will be CMR10 photographically reduced by a factor of two while font b will be CMR5 at its normal size so it should be easier to read assuming that it has been designed well The dimension in a font specification can use any units either standard or true The interpretation of true here is identical to its interpretation in the specification of any other distance asking for a font TUGboat Volume 2 No 3 at 5pt requests that the font be 5 points in size in TEX s design document while asking for a font at Struept requests that the font be 5 points in size after the scaling implied by the magnification factor If the at dimen clause is omitted TEX defaults the requested size to the design size of the font interpreted as a design non true dis tance Thus the control sequence font a CMR10 is equivalent to the sequence
149. s bbox 1 vss nul11 def Sandwch 1 lower QSize vbox to QQSize vskip 0 5vu HorzLine vss hbox s1 ves HorzLine vskip 0 5vu nul1 def VertLine 1 hekip 0 5vu vrule 1 width ivu bskip 0 5vu def LinetoTop VertLine depth Q8ize def LinetoBot VertLine height QSize dot FilVertLine hskip 0 5vu vrule width ivu bekip O Svu These define some common bits and pieces of the diagrams def SwitchUp IV BackQ QQLine der SwitchDn l BackQ QQLine def ergeUp Q Line Back Q 11 def MergeDn QQLine BackQ III Use Define to start a section of the syntar diagram def Detine i par ConterSink NonterminalFont Strut 1 hskip 2vu plus 300pt penalty ONQQLine And use EndDef to end it detf EndDef QLine BigRightArrow par If a section gets too wide NewLine will continue the chart on a new line def NewLino Fil I LinetoBot ForwQQ linebresk hbox ForwQQ ForwQQ LinetoBot II Fil vrule height QQSize depth QQSize width Opt BigLeftArrow Fil IV LinetoTop ForwQQ Linebreak bbox ForwQQ ForwQQ LinetoTop ITI Fil editor s note page break for TUGboat publication TUGboat Volume 2 No 3 X The macros LeftToRight RightToLeft and SwitchDirection control the way arrows are pasted onto tho low level boxes of the chart def LeftToRight def LeftSideArrom RightArrow def RightSideArrow ArrowLine def SritchDirection RightToLeft def RightToLeft MdetMLettSideArrow NArro
150. s depend on the AMS TEX macros and is distributed with them on tape In a later issue I ll report on the timing statis tics for TUGboat There have been many questions regarding how much computer time is required to run TEX and prepare output on various devices Although TUGboat is probably atypical it s one publication that is resdily available to all TEX users and thus suitable for an example So keep those tapes and letters coming this is your newsletter and only your participation will keep it afloat k k k k k x k x K X TeX FOR THE HP3000 Lance Carnes Amazingly enough the mighty TEX in Pascal system runs on the modest Hewlett Packard mini computer The TyX in Pascal tape was received from Stanford in May 1981 and it took approximately two person months to do the conversion There were no problems of significant magnitude compil ing the Pascal sources As with every conversion the sources had to be edited to weed out the non 26 standard festures e g OTHERS and many of the SYSDEP modules had to be rewritten The TFM font files converted nicely from the FIX rep resentation of reals By far the most diffieult task was shoe horning TEX into a 16 bit word 32K address space non virtual memory machine Accessing the 49152 records of MEM takes 200K 16 bit words and the other large arrays was accomplished through liberal use of software implemented virtual memory ver sion of the Pascal P4 compiler w
151. s k k k k k 5 MESSAGE FROM THE CHAIRMAN Michael Spivak This message is both brief and urgent I hope that as many people as possible will be able to at tend the January meeting of TUG In the first place there should be a great deal to report concerning progress in bringing TFX up at various installations and in solving related problems But even more crucial is the inescapable fact that as Lynne Price has consistently and eloquently urged we are clearly going to be led almost against our wills to adopt a more formal structure TUG clearly cannot con tinue to enjoy the happy anarchistic structure of the past To a large extent this just means that a lot of us are going to have to work harder within committees to draft proposals that can then be con sidered by the entire membership You say you d like to volunteer Why how nice But it also means that clearer ways of reaching decisions will have to be agreed upon This is undoubtedly the most im portant meta decision of all since it will eventually affect everyone connected with TUG and we cer tainly want to hear all viewpoints If you can t come but have any strong feelings about how TUG should function please write to me or any one else on the Steering Committee so your views will be known But if you can please come k x kok xx k x ok k k k Editor s note There have been some new volunteers for Site Coordinators as one can see from looking at the Stee
152. se and or installation of a particular out put device x x x A VARIAN OUTPUT DRIVER IN VAX VMS FORTRAN Jim Mooney September 8 1981 A summer project at the Morgantown Energy Technology Center METC Morgantown WV has resulted in experimental installation of the Oregon Software version of VAX VMS TEX As part of this project I have written a DVI file converter to drive a Benson Varian 200 dot inch matrix plotter Since METC lacks a Pascal compiler this program was written in FORTRAN 77 We acquired Oregon Software s TEX in July through the efforts of Tom Pierce who was then at TUGboat Volume 2 No 3 METC As described by Barry Smith this version is an interim one which still uses a kind of TFX font files and produces version 0 DVI files Also sup plied was a pair of conversion programs LVSPOOL and LHSPOOL for a Versatec 200 dot inch plotter Fortunately this was very similar to the Varian set of character files with extension VRT were in cluded containing the raster character descriptions for the Versatec The executable module supplied for TEK ran im mediately and we were shortly producing DVI files However it was disturbing that the program seems to take between one and five minutes to initialize We have a VAX 11 780 with typically 30 35 inter active users I sometimes despaired of ever seeing that starting asterisk I suspect that much of this time is spent in routinely loading the standar
153. skip lineskip and some other stuff If you are mixing syntax charts with other text you will want to enclose the syntaxChart along with the chart definition in braces so all the funny definitions go away at the end of the group and don t mess up the rest of your document You will probably also want to say parindent Opt to eliminate the paragraph in dentation The call on SyntaxChart also tells TEX to ignore tabs and carriage returns so you can format your more easily Just be careful where you add spaces after a control sequence is OK but not between or after the parameters to a macro The reason for not TUGboat Volume 2 No 3 ignoring apaces is so terminals and nonterminals can have embedded spaces if you prefer you can say IgnoreWhiteSpace to cause spaces to be ignored too and then put in a control space where you really want a space Now would be a good time to go try making your own simple syntax chart using the macro definitions in Appendix A When defining a complex diagram it is often helpful to first define pieces of it as TEX macros This makes the source much easier to read and keeps the nesting of braces down to a reasonable level This device is used extensively in the example in Appendix B Finally some fine points about spacing The horizontal lines are actually composed of fixed width rules and leaders filled with rules The control se quence QLine defines a fairly short fixed width line and
154. specify the formatting of a document the more you constrain the possible ways that it could be for matted If you have to use a low level language you wind up making a lot of fairly arbitrary decisions about how something should be formatted at a low level since you have to specify something However all of the formatting specifications are heeded by a computer formatting system whether they are important to the user or whether they were just specified arbitrarily The more constrained a for matter is the smaller the space of possible ways a document could be formatted and the more likely that there will be no formatting which is accept able When a user is specifying how his document should be formatted he should use the least possible amount of detail while still mentioning those things important to him In this way the possibility is in ereased that the formatter can find an acceptable way to format his document Early text formatters were designed around the idea that documents were fairly simple consisting of text organized into paragraphs with an occasional heading or footnote These programs would take the user s specifications and format a document us ing rules interna to the formatter It was possible TUGboat Volume 2 No 3 to modify exactly how the formatting was done by specifying the values of certain parameters but the formatting was essentially done by one smart pro gram These early formatters prese
155. ster in FORTRAN The driver translates the DVI file into line segments Each segment has the same baseline and the same size font At the end of each page the driver sorts the segments by vertical posi tion and then outputs scan lines to the plotter one at a time This allows multiple column text input to be processed The driver is small enough to run in interactive mode though my version of TEX will not Luis Trabb Pardo pointed out that if I can get TEX to run in a large memory area then I could make a large driver keep an entire page of plotter bits in memory and vastly simplify the driver For lack of time I haven t tried this idea The driver I wrote works and could be improved or rewritten later My thanks to David Fuchs for his Pascal DVI file print ing program which explained a lot of mysteries to me about the file My version of TEX now accepts almost all of the standard BASIC file This is a great improve ment over the TEX version I mentioned in the last TUGboat My TEX doesn t read all the font in formation files correctly because some were not properly converted from PDP 10 36 bit floating TUGboat Volume 2 No 3 point to CDC 60 bit Despite this and with some temporary changes I have made a very short TEX input file run and have produced a plot so I have hopes that I will make more progress Though my version of TEX is not totally func tional the University of Aarhus in Denmark has one they built that works qui
156. t Users 4 that have good arrowheads available in other fonts should redefine these X macros to take advantage of them def Leftarrow hskip 1 2pt Strikeout vbox to 1 9pt hbox hskip 2pt u char 40 hskip 0 5pt vss def RightArrow Strikeout vbox to 1 9pt bbox hskip 0 5pt u cbar 41 hskip 2pt ves hskip 1 2pt def ArrowLine Strikeout hskip 8 7pt The next two macros define big arrowheads def BigLeftarrow Strikeout CenterSink hbox hskip 2vu bf lt def BigRightArrow Strikeout CenterSink hbox bf gt hekip 2vu The next few macros describe the dimensions of the quarter circle font det QThickness 1 ipt Thickness of strokes def QSize Spt X Height and width of the quarter circles def QQSize 10pt Twice QSize varunit QThickness X ivu is the stroke thickness 4 The next two groups of macros may need editing if a font other than the X dragon font is used to get the quarter circles M MI NIII MV are the quarter circles in the first second third and fourth quadrante numbered counterclockwise starting with the upper right one def i lower QSize hbox GraphicFont a BackQ def II lower QSize hbox BackQ GraphicFont d def III lower QSize hbox BackQ GraphicFont c det Iv lower QSize hbox GraphicFont b BackQ LeftRound and RightRound are the end caps for Terminal boxes def LeftRound BackQ hbox GraphicFont 4 BackQ BackQ Lower QQSize hbor Graph
157. t i e it is not general purpose If there are significant changes in the format of the distributed version the program would be dis carded or changed Plans We are thoroughly dissatisfied with what we have for user interface with respect to file specification Better user control of the name of the output DVI file is desired This work is local to two of the SYSDEP compilation units _ The system response to error conditions is not satisfactory I believe some of this is due to the response to runtime language violations Some is due to the way the system is designed Experience and experimentation will hopefully provide some guidance The Versatec printer i is being interfaced to the VAX Scan conversion will occur on the VAX Software has to be found or developed for this device Some from Brown 1s reported elsewhere in 32 this issue ram A similar condition exists for our Applicon plotter The Applicon is off line data is transferred via magnetic tape The device interfaces are not very efficient or robust Improvements in these areas will be pursued Currently there are a number of pieces that must be used to perform the typesetting task They have not been integrated into a reasonable user oriented capability This has to be corrected Various macro packages look interesting and should be available to our users Acquisition and installation will be pursued We do not yet have any TEX users The system is still in a
158. t it s a single program that compiles under either IBM s Pascal VS or Hedrick s Pascal for DECSystem 10 20 and will convert DVI files to APS 5 DCRTU Input Command Language for mat or Linotron CORA V format or Linotron Binary Byte format depending on the setting of some compile time switches The first version of this program is up and running at two IBM and one DEC29 sites Each of these installations is running its typesetter with the native fonts auxiliary pro grams serve to convert font width information as supplied by Autologic and Mergenthaler into TEX compatible TFM format This restricts the number of TEX s features that can be used however since information about height and depth of characters is not provided by either company and can only be guessed at heuristically and changed manually if the need arises Also much of math mode is crippled since the TEX math fonts are not available There is still some hope for the future though There has been some interest expressed by individuals both at Autologic in LA and Linotype Paul in England in Knuth s Computer Modern fonts Similarly at the instigation of the folks in Wisconsin Compugraphic seems interested in the possibility of providing the CM fonts to 8600 users One other thing I worked on over the summer was PXL files A PXL file is the raster descrip tion of a font at a given size and resolution such as CMRI0 at 200 dots per inch The documentati
159. t TEX than the P4 compiler TEKS is cur tently planned to require OTHERS but even the cur rent TEX makes no assumptions regarding packing The routine READFONTINFO is system dependent and the documentation in TEX82 will be more explicit about exactly which bits go where 1 In Imperial College Pascal there is no default case for CASE statements instead an IF THEN ELSE construction was used to perform its function 2 CASE statement selector variables being out of range caused a Pascal crash this is not the case in Stanford s Pascal An IF THEN construc tion made sure CASE statements were accessed only when the selector variable was in range 3 Labels that were declared but not used had to be removed 4 The INITPROCEDURE construct does not ex ist in Imperial College Pascal instead a proce dure called INITIALIZE was introduced in its place 5 Overly large procedures had to be split for compilation to succeed In the TEXPRE module these procedures were INITIALIZE INITMATHCODES INITFONTCODES INITSUF and INITPREF In the TEX module the procedures JUSTIFICATION and MLISTTOHLIST had to be split 6 Imperial College Pascal does not allow assign ment between variables of differently named though identically defined types Thus the TYPE declarations of PCKDHYPHBITS PCKDCONSPAIR and TBLREADOUTTYPE in the TEX and TEXPRE modules were changed respectively to declarations of PACKEDHYPHENBITS PACKEDCONSONANTPAIRE
160. t be described by a control sequence q 1 2 83 84 45 with the hlists corresponding to parameters 2 to 5 describing the arms emerging from the top bottom left and right of the box TUGboat Volume 2 No 3 And we would also like to have circular tensors or bubbles with the property that arms could emerge in any radial direction provided the cyclic order around the tensor was maintained In general the arms would try to reach their destination as directly as possible The control sequence for such tensors might be C 1 2 where 1 is the name of the tensor as usual while 2 is a single hlist giving the arms in say anti clockwise order Implementation The first part of the construction drawing the boxes can be accomplished simply enough within TEX We have not specified the horizontal or vertical spacing between boxes but that is a mere detail The main problem arises of course when it comes to drawing the arms that link the boxes Clearly that cannot be accommodated within stan dard TEX However the basic idea joining 2 given points by a curve leaving the end points in specified directions is the very stuff of METAFONT The arms might need a gentle nudge certainly to circumnavigate the boxes e g to determine on which side of a box to go when joining an upper arm to a lower on the same box But these are minor details The essential ques tion is how can we save the hlists of indices ap pearing i
161. te well Erik Bertelson and I recently made an oral agreement that Minnesota will distribute their version in the U S With code modifications and decreased memory size their ver sion runs in about 38K words They have printed a couple of books using it so it is quite well debugged They have a Pascal version of UNDOC which has made it a lot easier to change TEX When I receive a copy of their TEX I will install it and then decide on distribution details kk k XS k X k k k K X A TUGboat TOUR EXCERPTS FROM THE TEXNICIAN S LOG Barbara Beeton American Mathematical Society The morning mail is very exciting around the TUGboat deadline In it appear manuscripts and mag tapes from all over bearing who knows what news but certainly containing something unex pected and interesting Putting together an issue is also fun the readers get to see only the printed pages but I get to grub around in the mud that seeps into all the cracks During this tour PH be referring to various ar ticles that have appeared in TUGboat so you might went to get out your back issues In particular TI be making a few changes to the previous TUGboat guidebook How to Prepare a File for Publication in TUGboat vol 2 no 1 pp 53 54 Although this How to guide states that basic tex and all the features of AMS TEX are available as well as some formatting macros espe cially for TUGboat some authors build their own macro set from scratch including f
162. the scan line using the VAX 11 in structions EXTZV and INSV to operate on all 32 bits at once and arranged to scan the string in reverse order when sending it to the printer My code for INSERTLV ended up looking like this ENTRY INSERTLV M lt R2 gt SUBL3 QHORIZ AP 2080 R2 EXTZV R2 32 SCAN AP RO BISL BITS AP RO INSV RO R2 32 SCAN AP RET Since I don t have Metafont I was unable to con vert the fonts for an 84 by 84 resolution printer so I must pretend that my printer has 200 by 200 resolution and a small page After some experiment ing I found that a design size of 2 5 inches wide by 3 inches high works Using the ten point fonts I can print posters so I have made some copies of The Typographical Error and am beginning to distribute them among the writers to try to generate interest in TEX Maybe I can find someone who is willing to invest in a real printer I hear someone asking I didn t know you could interface an IDS 460 to a VAX 11 The IDS 460 is certainly not supported by DEC as a printer on the VAX 11 so mine is driven through a 300 bit per second terminal line and my APPLE II I have con structed a protocol to compress the page image for transmission the way a FAX machine would during a previous weekend but even so it takes about half an hour to print a moderately complex page I made one change to SYSDEP and LVSPOOL for the sake of convenience I changed ali references to TEX
163. then back to type 12 other Then a new version of the file is opened for output to record new page numbers should any changes have taken place Actually two different file names are used so that the old file is available after the run for comparison to the new version also some items don t ever get run through TEX and their references are added to the page number file manually When the page numbers con verge and a final scan of Varian copy turns up no obvious blunders the DVI file is shipped off to the Alphatype for camera copy The main TUGboat header file is used to for mat the one and two column pages At present the two column routine uses the save5 page box5 hfil page technique I would really like to be able to write out each column as a separate page but the output drivers require that each sheet con tain the same number of pages and I haven t been able to figure out how to output two pages for a single column page Suggestions are welcome I ll submit this as a problem for the next issue if no solution has been found by then TUGboat Volume 2 No 3 The address list uses a different header file which does output each Npage i e column separately to the DVI file putting the running heads and footers out as part of the last column The width of each partial page is the distance from the left boundary of column 1 to the right boundary of the current column This width is recalculated for every
164. they are inserted A macro is meaningless by itself Consequently this makes the tough problem of documentation even tougher While 1 was developing the macros for Turtle Geometry I found that I had to write exten TUGboat Volume 2 No 3 sive notes to remind myself exactly where and how to use my macros In spite of this I made a lot of mistakes which were difficult to discover and to fix Luckily the macros would not have to be used by anyone else It would not have been easy to write macros that anyone could use In general I would not want anyone else to use my macros Unless they understood them completely it would just be too easy to make a mistake Because of this problem I predict that it will be difficult to set up libraries of commonly used TEX macros in an effort to prevent duplication of effort Instead most people using TEX will have to start from scratch and write their own macros One unfortunate characteristic of TEX is that it is difficult to debug your formatting specifications if there is some type of error TEX has a large set of error messages but these only signal when you specify formatting illegally Most of tbe time TEX formats your document without complaining and there is something strange in the output What can you do Usually you can figure out where something went wrong but sometimes this is very difficult This problem is compounded by the use of macros which may do unpredictable things if yo
165. tially a copy of the first was also input and somewhere much later on in the data an italic correction was applied After questioning whether the system had crashed not an impossible occurrence the user came to the local wizards for help Diagnosis took a considerable length of time and would have taken even longer had we not been familiar with the prob lem from Mike s experience Not that anyone would try it but raiseing and lowering boxes by negative amounts in the SAIL version at any rate has no different effect from using the same positive amounts The following example says exactly what it s trying to do baselinefaise 3pthaselineraise 3pthaseline baselinejower 3ptbaselinejpwer 5p baseline Barbara Beeton 36 TUGboat Volume 2 No 3 X uus dC 4e LY LE ACM style 1 1 61 82 83 A Keller Addresses l I1 54 B Beston MACRO Less MONG M Diaz O keen x2i M Diaz L Baseline set to top of bon Ill 60 77 A Keller U Bibliography NJ A25 M Diaz M Bes 20 BSB Keller N Branching see if Capital letters Send Submissions to largo at beginning of paragraph cus Lynne A Price ss s TRAS M Diaz TUG Macro Coordinator Roman numeras Mi 120 121 P Milligan L Price Calma R amp D Centering a sequence of fines 12 A13 M Diez 212 Gibraltar Dr Chapters and Sections 11 60 61 79 81 A Keller RE CE M S Mi 111 118 L Price Sunnyvale CA 94086 O 0 1 2 0 me 489 202 M Dia The m
166. ting to the wind and let TEX take care of it all or you can specify the format ting of the object in low level detail This is an im provement over the earlier text formatters which gave you no choice but it still proves inadequate in many situations The problem is a user sometimes want to have control over the formatting without having to specify all of the formatting explicitly For example consider the problem I had while for matting the Turtle Geometry book with breaking pages and placing figures When I Jet TEX do all of the formatting by itself it would do it incor rectly in part because it doesn t consider some of the aesthetic considerations I am concerned with For a while I tried tricking TEX s formatting algo rithms into doing the correct thing but this involved going through all sorts of complicated contortions Finally I was forced to deal with the problem at a very low level by specifying all of the page breaks and figure placements myself explicitly I was able to get what I wanted but it required a lot of work TUGboat Volume 2 No 3 on my part Another issue in this situation was that once I had done the page breaking by hand that es sentially froze that part of the document If any changes had needed to be made to the document after I had done the page breaks it would have been necessary for me to do all of that work over again It would have been better if I had the ability in TEX to specify
167. u use them incorrectly This makes TEX very hard to use FORMATTING THE TEXT OF Turtle Geometry Once I learned how to use TEX and developed the formatting macros I began to edit the text of the book inserting the macro invocations where ap propriate The book was first written and printed using a primitive text formatter called TJ6 so the text files one per chapter contained text inter sp 2rsed with TJ6 commands All of the TJ6 com mands had to be removed and TEX commands had to be inserted I eventually deleted all of the TJ6 commands using a text editor then scanned the straight text which remained and inserted TEX commands as needed Most of the time formatting the text was no problem the job was tedious but not difficult Oc casionally I came across an object that had to be formatted somewhat strangely and I had to do a lot of thinking and experimentation to make TEX do what I wanted However with most objects all I had to do was to insert the appropriate macro in vocations and TEX would format them correctly Using TEX s macro facility to specify formatting turned out to be very useful when I was not ex actly sure how something should be formatted For example Turtle Geometry contained many vector equations The authors and the book designer were not exactly sure how they wanted to represent vec tor variables So I defined a macro called vect 69 and used it to specify all vector variables Then I printe
168. um so far demands on varsize and memsize It also if requested prints each control sequence name as it is loaded into the hashtable counting down as it goes from the ini tial value of hashsize 1 009 less however many 24 control sequences were preloaded Some of this reporting facility already existed in the SAIL source code obtained from Stanford requiring only that a switch MSTAT be turned on before compilation we ve suggested that a similar facility be included in the definitive Pascal TEX As TEX comes into being on more different kinds of computers these computers generate tapes con taining input files to be processed somewhere else TUGboat gets a good sampling We ve success fully read tapes from the following computers VAX running under both VMS and UNIX IBM 370 PDP 11 TeX was not running on this machine it was used only to prepare the tape Univac 1100 and DECSystems 10 and 20 The DECSystem tape utilities of course generate tapes that are native to our 2060 Finding a common format for exchang ing tapes with other machines has been more of a challenge The tape format we have settled on works quite well although it is limited to the standard ASCII character set one character per tape character 5 bits which does not accommodate font files in in ternal form This format is simply a variation on the old card image format with 80 character records 100 records per block 8 000 characters per
169. ure is placed upon Another formatting rule I was given was that the pages should all be of the same length if possible but a page could be a line short or a line long if that would help the formatting of the page In TEX the height of a page is set to a specific distance using a vsize command Page breaks are generated to fit as closely as possible to that limit without going over There is no provision in TEX for changing this number dynamically on a page by page basis subservient to other formatting needs Within TEX all formatting decisions have equal weight which sometimes unnecessarily restricts the possibilities for formatting something and reduces TEX s power If I only had to deal with a small simple docu ment the aesthetic goals mentioned above would not be very important It is not difficult to place a figure in a small document consisting of a few pages and TEX would probably position it correctly us TUGboat Volume 2 No 3 ing its simple figure placement algorithms However Turtle Geometry was a very large document with many figures and equations When you have a large number of figures in a document placing these figures becomes a much more complicated problem and it is harder for TEX to place them correctly It can t deal with the aesthetic concepts that come into play with large documents The first time I formatted Turtle Geometry using TEX it formatted the individual figures and equations correctly but
170. us schemes for encod ing typewriter style input have been rather cum bersome and I ve been waiting for one that s really easy to use Mike Spivak has made up one for his AMS TEX manual The Joy of TEX that makes input strings look just like ordinary math coding the only difference is that goes around in line state ments and 25 kk kk goes around displayed material This will even tually become available for use in the main part of TUGboat and Mike has promised to publish his macro I said I d be changing the instructions for using some of the TUGboat control sequences described in the old How to guide Here are the changes A new control sequence hpar will give you an in dented paragraph like this one Unlike the other hanging indented paragraphs listed it doesn t have to be ended The control sequence endhpar turns out to be unnecessary since hanging indentation is tran sient disappearing at the end of the current paragraph The line breaks in textaddr can now be indi cated by I got tired of misspelling 1brk and made life easier inspired laziness must be the greatest source of creativity known to man Actually there have been lots more changes to the header files as I ve learned more about TEX but most of these changes are entirely transparent to the casual TUGboat author When I m entirely pleased with the package I ll submit it for publication in the Macros column It doe
171. v n00 vi u r Nd odot Xh2 h0 v3 u vi u_ v4 d n2 r o div NO r w3 u d intere ho r vi u Nd NAbO r wi u_ d b2 h0 rS u_ vi u_ u era r eqv no lt r v d u eubset hO gt r v4 d u supset h0 lt r v d u char 034 no gt r v d u char 035 n0 lt r v4 d u preceq bO gt r v4 d u succeq w2 d u char 082 nO vi d r v2 d v3 u Napprox wee char 020 2 char 021 n0 r Acbar 033 b0 r v u Nd doteq ca prec gt euce hS lt r Nchar 137 h3 gt r char 031 bol rt up AhO r vi dv u down Ah3 Vr5 Nchar 027 eNhe Vr Msis n gt r gt erer h0 r vi d u sineq Ah esAr char 137 h6 gt r char 031 n6i r gt napsto ere prime Nh8oVro infty n0C r Ma n0C r Mnotin noo r enptyset b4 r char 024 hO v3 u d d b a r char 025 ae char 5 not implemented hS wa a r aleph ege real I Vinag h01 r v7 u_ d top Nho Vr not A Mscr ns V r char 023 b6 r char 022 ne r char 004 ne r char 0387 b3 r vdash n3 ri dashy TUGboat Volume 2 No 3 ayn lfleor 0542B w i0 05438 o wio rfloor 0544B w 10 leeil 064568 w 10 rceil 0546B w 10 M 0547B wz10 Vv 05508 wi0 lt langle 0551B w t0 9 rangle 0552B w 10 rel
172. v 0553B w 6 Ab3l leftvy 05548 8 h2 l Vr dleft O5ESB w 6 ih2 Vr dright OS60B ws12 v4 d n6 r eurd 0561B w 10 a 18 0562B w 9 h0 b1 b v3 u h2 d r Mabla 0563B w 9 n3 w2 u d d u r ssallint 0564B w 12 Ah amp NbI Vi Na Mi Ve lub 0565B w 12 h6 bl v7 u_ dl glb 0571B w 10 h0 r vi u d deg 0572B ws10 bOl ri u v2 dir rilu ddag 0574B w 10 e e 0575B w 0 ie copyright 0678B w 12 Nh2 VrL sterling 0577B w 10 s Appendix C The Diablo driver much abbreviated PROGRAM bytdia input output INCLUDE TEXDIA H VAR fnt file fnt store stack ARRAY stack rengel OF pts font mem ARRAY mem range OF byte char width ARRAY font range 0 127 OF byte char base ARRAY font range 0 127 OF mem range b c byte H V x y Z w pts true H true V p q pts page no SP i integer BS HT LF VT FF ESC RS US char 1 font range printing overprinting boolean FUNCTION hu from pts p pts integer BEGIN hu from pts round p END FUNCTION vu from pts p pts integer FUNCTION hu to pts hh integer pts BEGIN hu to pts hh END FUNCTION vu to pts vv integer pts PROCEDURE hmi set b byte BEGIN write ESC US chr b 1 END PROCEDURE vmi set b byte PROCEDURE hmi reset BEGIN hmi set hor spacing END PROCEDURE vmi reset 19 PROCEDURE hor tab b byte BEGIN write ESC HT chr b
173. verything in the middle def Alternatives 1 AlLocCtr altctr setcount AltCtr 0 def state T det Upper 1 if L state BadUseOfUpper else advcount AitCtr def state U def Widdle si if L state BadUseOfMiddle els advcount AltCtr def state L def Lower8 1 advcount AltCtr def state L di if L state else NoMiddle def state T def Upper adveount AltCtr by 1 MUpperAlternative det Middle advcount AltCtr by 1 MiddleAlternative def Lower if L state gdefNONA Nelse gdef 0HA OmittedhiddleAlternative OMA Needed because of scoping in the if statement advcount AltCtr by 1 LowerAlternative AllocBox L save L null AllocBox R save R null save0 hbor vtop null halign cr 1 null cr bbox ForwQ box L raigse 1ht R box0 box R Forw One extra tricky thing about Repeat is that the scope of SeitchDirection 4 is terminated by the cr at the end of the alternatives Maybe you didn t know sbout this scoping rule it was sure news to me def Repeat 1 AllocCtr altcer setcount AltCtr 0 def state T def Upper 1 i2 L state BadUse0rUpper else advcount AltCtr def state U def Middle 1 if L state BadUse0ftMiddle else advcount AltCtr def state L def Lower i if L state else BadUse0fLover advcount AltCtr def state L 1 Mf Listate Melse WoMiddle MefNstate T def Upper SwitchDirection adveount Altctr by 1 UpperAlternative de
174. wLine def RightSideArrow LeftArrow def SwitchDirection LeftToRight A The next two macros are used for creating terminal and nonterminal boxes def Nonterminal 1 LeftSideArrow LeftSquare Sandwch MNonterminalFont X 1 Strut RightSquare RightSideArrow def Torainal 1 LoeftSideArrow LeftRound Sandwch TerminalFont 1 RightRound RightSideaArrow The next group of macros are used for allocating digits for referring to 4 counters and boxes These are needed only because counters and boxes in TEX do not nest in the nice way that macro definitions do The macros are a bit on the tricky side but are short enough that you can figure out how they work if you understand the way TEX expands macros If you are using 4 other packages that use some of these boxes or counters you may have to change some of the numbers in these macros def Alloc 1 2 def 2 1 def AllocBox def AllocBox def AllocBox def AllocBox def AllocBoxz def AllocBox def AllocBox def AllocBox def AllocBox def AllocBoxr Overf low Al10c9 All0c8 Alloc7 Alloc6 Alloc5 Alloc4 Alioc3 Alloc2 Alloci def AllocCtr def AllocCtr def AllocCtr def AllocCtr def AllocCtr 0verflow Alloc8 Ailoc7 Alloc6 Alloc5 4 Here re the ones you ve been waiting for Both Alternatives and Repeat work in roughly the same fashion so this description applies 4 tc them both The single argument is composed of the subcomponents each on
175. word are always zero In the discussion below left half word means the highest order 16 bits in a word and right half word means the 16 next highest order bits in the word which are exactly the lowest order 16 bits on 32 bit machines Both the first and last word of a PXL file con tain the PXL ID which is currently equal to 1001 decimal The second to last word is a pointer to the first word of the Font Directory All pointers are relative to the first word in the file which is word zero The general layout of a PXL file looks like this PXL ID 1 word long First word of the PXL file RASTER INFO many words long begins at second word FONT DIRECTORY 512 words 517th to last through 6th to last word CHECKSUM 1 word fifth to last word MAGNIFICATION 1 word fourth to last word DESIGNSIZE i word third to last word DIRECTORY POINTER 1 word second to last word PXL ID 1 word Last word of the PXL file TUGboat Volume 2 No 3 The Font Directory is 512 words long and con iains the Directory Information for all the 128 possible characters Font Directory have Directory Information about the character with ascii value of zero the next four words are for the character with ascii value of one etc Any character not present in the font will have all four of its Directory Information words set to zero so the Directory Information for the character with ascii value X will always be i
176. y Here s what s going on TgX wise at the CS Department at Stanford Professor Knuth has a working version of the UNDOC macro processor written in its own language DOC UNDOC com piles itself into a Pascal program thus UNDOC is now available in Pascal DOC is being used as the source language for new versions of TEXDOC and TEX82 All three programs both DOC and Pascal sources are expected to be available for port ing to new machines in early 1982 TgX82 is a complete rewrite of TEX based on the experience gained from Ignacio Zabala s translation of Sail TEX Portability has been improved by removing all floating point operations Another sticky portability problem with the current Pascal TEX is initializa tion Recall that installing a new TEX involves run ning the program TEXPRE which makes a large file called TEXINI TBL that represents the initial state of TpX s data structures about 36K words in size On TOPS20 we then run TEX which reads in TEXINLTBL st which point we interrupt the process and save the current core image When our users ask for TEX they get amp copy of this core image which continues execution from where we in terrupted the first TEX run Thus our users are saved the not insignificant overhead of data struc ture initialization The resulting core image is also smaller and faster than if the initialization func tions of TEXPRE were to be incorporated into TEX Unfortunately we have found that the
177. y oxide vein assemblage sug gestive of alkaline solutions of relatively low Eh Associated with cerussite wulfenite vauquelinite willemite and mimetite Primary minerals include galena pyrite and tennantite Distr Known only from two Arizona localities The type locality is the Florence Lead Silver Mine Pinal County also at the Rat Tail Claims near Wicken berg Maricopa County Name For its distinct hemihedral morphology Ref 1 Williams S A and Anthony J W 1970 Hemihedrite A New Mineral From Arisona Am Min 55 1088 1102 2 McLean W J and Anthony J W 1970 The Crystal Structure of Hemihedrite Am Min 55 1103 1114 American Mineralogist 55 1100 1970 29 Powd Pat Debye Scherrer 114 6 mm CuK a Visual 1 sides RT aloj LARGEST d SPACINGS 3 301 100 8765 4 4 364 80 3 478 30 4872 90 7481 3 4136 3 3 309 20 4 364 80 5512 9 3 909 20 3 301 100 3164 80 5 384 3 3820 4 3 234 10 3102 80 4872 90 3676 20 3 164 80 2924 55 4675 30 3 584 3 3 102 80 Struct Cell Pl Cl Z a 9 497 1 b 11 443 2 c 10 841 2 a 120 30 1 8 92 06 1 55 50 1 a b c 0 830 1 0 947 Chem Substitution of Zn for Pb noted in some samples 1 2 ZnO 2 7 3 93 PbO 73 0 70 5 Cr203 19 7 19 5 SiO2 3 9 3 2 F 1 2 5 1 OzF 0 5 2 1 Total 100 0 100 0 ZaF 2 Pbs CrO aSiO s 2 Average of several partial analyses Opt Thin section shows feeble pleochroism with Z gt Y
Download Pdf Manuals
Related Search
Related Contents
HP Pavilion 15-p049nr Copyright © All rights reserved.