home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1993-08-11 | 74.8 KB | 2,343 lines
Newsgroups: comp.sources.misc From: jeff@joyce.cs.su.oz.au (Jeff Kingston) Subject: v38i069: lout - Lout document formatting system, v2.05, Part01/35 Message-ID: <csm-v38i069=lout.130423@sparky.Sterling.COM> X-Md4-Signature: 640afe1cc1864e70937cab39da6d00d6 Keywords: document formatting typesetting lout Sender: kent@sparky.sterling.com (Kent Landfield) Organization: Sterling Software Date: Sun, 8 Aug 1993 18:05:05 GMT Approved: kent@sparky.sterling.com Submitted-by: jeff@joyce.cs.su.oz.au (Jeff Kingston) Posting-number: Volume 38, Issue 69 Archive-name: lout/part01 Environment: UNIX Supersedes: lout: Volume 37, Issue 99-128 This is version 2.05 of the Lout document formatting system. The system reads a high-level description of a document similar in style to LaTeX and produces a PostScript file which can be printed on many laser printers and graphic display devices. Lout offers an unprecedented range of advanced features, including optimal paragraph breaking, automatic hyphenation, PostScript EPS file inclusion, equation formatting, tables, diagrams, rotation and scaling, sorted indexes, bibliographic databases, running headers and odd-even pages, automatic cross referencing, and much more, all ready to go. Furthermore, Lout is easily extended with definitions which are very much easier to write than troff of TeX macros because Lout is a high-level language, the outcome of an eight-year research project that went back to the beginning. New features just introduced in Version 2.05 include full support for the ISO-LATIN-1 character set and arbitrary PostScript encoding vectors, small changes to the DocumentLayout package to simplify porting it to non-English languages, source code which compiles cleanly on type-fussy compilers and at least one 64-bit architecture (the DEC Alpha) but is not yet ANSI, and a few small enhancements and bug fixes. Lout is written in C, is highly portable to Unix systems, and produces PostScript output (used by many laser printers). It is distributed under the GNU public licence as a compressed tar file called lout.2.05.tar.Z in the "jeff" subdirectory of the home directory you land in when running "ftp ftp.cs.su.oz.au" with login name "ftp" or "anonymous" (enter any non-empty password). The comp.sources.misc newsgroup is an alternative source of Lout distributions. The distribution contains * Complete C source code * Standard packages of definitions for tech reports, books, equations, tables, diagrams, and Pascal prettyprinting (all written in Lout) * Complete user documentation in the form of seven technical reports and a Unix manual page * A makefile and installation instructions Lout was designed and implemented by Jeffrey H. Kingston (jeff@cs.su.oz.au) of the Basser Department of Computer Science at the University of Sydney. --------------------------- #! /bin/sh # This is a shell archive. Remove anything before this line, then feed it # into a shell via "sh file" or similar. To overwrite existing files, # type "sh file -c". # Contents: README data doc doc/tr.begin doc/tr.eq # doc/tr.eq/outfile.ps.A doc/tr.fig doc/tr.impl doc/tr.lout # doc/tr.over doc/tr.tab evec font include man z34.c # Wrapped by kent@sparky on Sun Aug 8 12:29:20 1993 PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH echo If this archive is complete, you will see the following message: echo ' "shar: End of archive 1 (of 35)."' if test -f 'README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'README'\" else echo shar: Extracting \"'README'\" \(2189 characters\) sed "s/^X//" >'README' <<'END_OF_FILE' XLOUT: A HIGH-LEVEL LANGUAGE FOR DOCUMENT FORMATTING XBASSER LOUT VERSION 2.05 COPYRIGHT (C) 1993 Jeffrey H. Kingston X XJeffrey H. Kingston XBasser Department of Computer Science XThe University of Sydney 2006 XAUSTRALIA X XTelephone (direct): 61 2 692 4216 XTelephone (messages): 61 2 692 3423 XEmail: jeff@cs.su.oz.au XFax: 61 2 692 3838 X XThis program is free software; you can redistribute it and/or modify Xit under the terms of the GNU General Public License as published by Xthe Free Software Foundation; either version 1, or (at your option) Xany later version. X XThis program is distributed in the hope that it will be useful, Xbut WITHOUT ANY WARRANTY; without even the implied warranty of XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the XGNU General Public License for more details. X XYou should have received a copy of the GNU General Public License X(file gnu.gpl in this directory); if not, write to the Free Software XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X XVersion 2.05 is substantially different from Version 2.03 in its Xlow-level character handling and attention to strong typing, as well Xas in the major innovation of support for ISO-LATIN-1 characters and Xarbitrary PostScript encoding vectors. There is also a change in the Xdatabase index (.li) file format, which means that all old database Xindex files should be deleted before using Version 2.05. X XThis directory contains everything needed to install the Lout document Xformatting system on Unix. It contains the following directories: X X include Lout packages (in Lout) and hyphenation patterns file X data Lout databases (in Lout) X font Adobe Systems font metrics (AFM) files X evec Character encoding vectors (CEV) files X doc Lout documents (in Lout) X man Lout manual entry X Xand the following files: X X externs z*.c Lout source code X gnu.gpl A copy of the GNU General Public License X hyph.install Information about how to change the hyphenation patterns X makefile A makefile for installing Lout X news.blurb A news blurb describing Lout X XPlease see the makefile for installation instructions. END_OF_FILE if test 2189 -ne `wc -c <'README'`; then echo shar: \"'README'\" unpacked with wrong size! fi # end of 'README' fi if test ! -d 'data' ; then echo shar: Creating directory \"'data'\" mkdir 'data' fi if test ! -d 'doc' ; then echo shar: Creating directory \"'doc'\" mkdir 'doc' fi if test ! -d 'doc/tr.begin' ; then echo shar: Creating directory \"'doc/tr.begin'\" mkdir 'doc/tr.begin' fi if test ! -d 'doc/tr.eq' ; then echo shar: Creating directory \"'doc/tr.eq'\" mkdir 'doc/tr.eq' fi if test -f 'doc/tr.eq/outfile.ps.A' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'doc/tr.eq/outfile.ps.A'\" else echo shar: Extracting \"'doc/tr.eq/outfile.ps.A'\" \(59623 characters\) sed "s/^X//" >'doc/tr.eq/outfile.ps.A' <<'END_OF_FILE' X%!PS-Adobe-3.0 X%%Creator: Basser Lout Version 2.05 (July 1993) X%%CreationDate: Tue Jul 27 15:23:26 1993 X%%DocumentNeededResources: (atend) X%%Pages: (atend) X%%BoundingBox: 0 0 595 841 X%%EndComments X X%%BeginProlog X%%BeginResource: procset LoutStartUp X/x { currentpoint exch pop moveto } def X/s { show } def X/in { 1440 mul } def X/cm { 567 mul } def X/pt { 20 mul } def X/em { 120 mul } def X/sp { louts mul } def X/vs { loutv mul } def X/ft { loutf mul } def X/dg { } def X X/LoutGraphic { X /louts exch def X /loutv exch def X /loutf exch def X /ymark exch def X /xmark exch def X /ysize exch def X /xsize exch def X} def X X/LoutFont X{ findfont exch scalefont setfont X} bind def X X/LoutRecode { X { findfont dup length dict begin X {1 index /FID ne {def} {pop pop} ifelse} forall X /Encoding exch def X currentdict end definefont pop X } X stopped {} X} bind def X X/BeginEPSF { X /LoutEPSFState save def X /dict_count countdictstack def X /op_count count 1 sub def X userdict begin X /showpage { } def X 0 setgray 0 setlinecap X 1 setlinewidth 0 setlinejoin X 10 setmiterlimit [] 0 setdash newpath X /languagelevel where X { pop languagelevel X 1 ne X { false setstrokeadjust false setoverprint X } if X } if X} bind def X X/EndEPSF { X count op_count sub { pop } repeat X countdictstack dict_count sub { end } repeat X LoutEPSFState restore X} bind def X%%EndResource X X/vec1 [ X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef X/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright X/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash X/zero /one /two /three /four /five /six /seven X/eight /nine /colon /semicolon /less /equal /greater /question X/at /A /B /C /D /E /F /G X/H /I /J /K /L /M /N /O X/P /Q /R /S /T /U /V /W X/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore X/quoteleft /a /b /c /d /e /f /g X/h /i /j /k /l /m /n /o X/p /q /r /s /t /u /v /w X/x /y /z /braceleft /bar /braceright /asciitilde /.notdef X/.notdef /.notdef /.notdef /.notdef /.notdef /quotedblleft /quotedblright /fi X/fl /endash /emdash /bullet /dagger /daggerdbl /florin /fraction X/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent X/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron X/space /exclamdown /cent /sterling /currency /yen /brokenbar /section X/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron X/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered X/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown X/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla X/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis X/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply X/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls X/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla X/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis X/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide X/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis X] def X X/AvantGarde-Bookfnt1 vec1 /AvantGarde-Book LoutRecode X/fnt1 { /AvantGarde-Bookfnt1 LoutFont } def X/AvantGarde-BookObliquefnt2 vec1 /AvantGarde-BookOblique LoutRecode X/fnt2 { /AvantGarde-BookObliquefnt2 LoutFont } def X/AvantGarde-Demifnt3 vec1 /AvantGarde-Demi LoutRecode X/fnt3 { /AvantGarde-Demifnt3 LoutFont } def X/AvantGarde-DemiObliquefnt4 vec1 /AvantGarde-DemiOblique LoutRecode X/fnt4 { /AvantGarde-DemiObliquefnt4 LoutFont } def X/Bookman-Demifnt5 vec1 /Bookman-Demi LoutRecode X/fnt5 { /Bookman-Demifnt5 LoutFont } def X/Bookman-DemiItalicfnt6 vec1 /Bookman-DemiItalic LoutRecode X/fnt6 { /Bookman-DemiItalicfnt6 LoutFont } def X/Bookman-Lightfnt7 vec1 /Bookman-Light LoutRecode X/fnt7 { /Bookman-Lightfnt7 LoutFont } def X/Bookman-LightItalicfnt8 vec1 /Bookman-LightItalic LoutRecode X/fnt8 { /Bookman-LightItalicfnt8 LoutFont } def X/Courierfnt9 vec1 /Courier LoutRecode X/fnt9 { /Courierfnt9 LoutFont } def X/Courier-Obliquefnt10 vec1 /Courier-Oblique LoutRecode X/fnt10 { /Courier-Obliquefnt10 LoutFont } def X/Courier-Boldfnt11 vec1 /Courier-Bold LoutRecode X/fnt11 { /Courier-Boldfnt11 LoutFont } def X/Courier-BoldObliquefnt12 vec1 /Courier-BoldOblique LoutRecode X/fnt12 { /Courier-BoldObliquefnt12 LoutFont } def X/Helveticafnt13 vec1 /Helvetica LoutRecode X/fnt13 { /Helveticafnt13 LoutFont } def X/Helvetica-Obliquefnt14 vec1 /Helvetica-Oblique LoutRecode X/fnt14 { /Helvetica-Obliquefnt14 LoutFont } def X/Helvetica-Boldfnt15 vec1 /Helvetica-Bold LoutRecode X/fnt15 { /Helvetica-Boldfnt15 LoutFont } def X/Helvetica-BoldObliquefnt16 vec1 /Helvetica-BoldOblique LoutRecode X/fnt16 { /Helvetica-BoldObliquefnt16 LoutFont } def X/Helvetica-Condensedfnt17 vec1 /Helvetica-Condensed LoutRecode X/fnt17 { /Helvetica-Condensedfnt17 LoutFont } def X/Helvetica-Condensed-Boldfnt18 vec1 /Helvetica-Condensed-Bold LoutRecode X/fnt18 { /Helvetica-Condensed-Boldfnt18 LoutFont } def X/Helvetica-Condensed-Obliquefnt19 vec1 /Helvetica-Condensed-Oblique LoutRecode X/fnt19 { /Helvetica-Condensed-Obliquefnt19 LoutFont } def X/Helvetica-Condensed-BoldOblfnt20 vec1 /Helvetica-Condensed-BoldObl LoutRecode X/fnt20 { /Helvetica-Condensed-BoldOblfnt20 LoutFont } def X/Helvetica-Narrowfnt21 vec1 /Helvetica-Narrow LoutRecode X/fnt21 { /Helvetica-Narrowfnt21 LoutFont } def X/Helvetica-Narrow-Obliquefnt22 vec1 /Helvetica-Narrow-Oblique LoutRecode X/fnt22 { /Helvetica-Narrow-Obliquefnt22 LoutFont } def X/Helvetica-Narrow-Boldfnt23 vec1 /Helvetica-Narrow-Bold LoutRecode X/fnt23 { /Helvetica-Narrow-Boldfnt23 LoutFont } def X/Helvetica-Narrow-BoldObliquefnt24 vec1 /Helvetica-Narrow-BoldOblique LoutRecode X/fnt24 { /Helvetica-Narrow-BoldObliquefnt24 LoutFont } def X/NewCenturySchlbk-Romanfnt25 vec1 /NewCenturySchlbk-Roman LoutRecode X/fnt25 { /NewCenturySchlbk-Romanfnt25 LoutFont } def X/NewCenturySchlbk-Italicfnt26 vec1 /NewCenturySchlbk-Italic LoutRecode X/fnt26 { /NewCenturySchlbk-Italicfnt26 LoutFont } def X/NewCenturySchlbk-Boldfnt27 vec1 /NewCenturySchlbk-Bold LoutRecode X/fnt27 { /NewCenturySchlbk-Boldfnt27 LoutFont } def X/NewCenturySchlbk-BoldItalicfnt28 vec1 /NewCenturySchlbk-BoldItalic LoutRecode X/fnt28 { /NewCenturySchlbk-BoldItalicfnt28 LoutFont } def X/Palatino-Romanfnt29 vec1 /Palatino-Roman LoutRecode X/fnt29 { /Palatino-Romanfnt29 LoutFont } def X/Palatino-Italicfnt30 vec1 /Palatino-Italic LoutRecode X/fnt30 { /Palatino-Italicfnt30 LoutFont } def X/Palatino-Boldfnt31 vec1 /Palatino-Bold LoutRecode X/fnt31 { /Palatino-Boldfnt31 LoutFont } def X/Palatino-BoldItalicfnt32 vec1 /Palatino-BoldItalic LoutRecode X/fnt32 { /Palatino-BoldItalicfnt32 LoutFont } def X/fnt33 { /Symbol LoutFont } def X/Times-Romanfnt34 vec1 /Times-Roman LoutRecode X/fnt34 { /Times-Romanfnt34 LoutFont } def X/Times-Italicfnt35 vec1 /Times-Italic LoutRecode X/fnt35 { /Times-Italicfnt35 LoutFont } def X/Times-Boldfnt36 vec1 /Times-Bold LoutRecode X/fnt36 { /Times-Boldfnt36 LoutFont } def X/Times-BoldItalicfnt37 vec1 /Times-BoldItalic LoutRecode X/fnt37 { /Times-BoldItalicfnt37 LoutFont } def X/ZapfChancery-MediumItalicfnt38 vec1 /ZapfChancery-MediumItalic LoutRecode X/fnt38 { /ZapfChancery-MediumItalicfnt38 LoutFont } def X/fnt39 { /ZapfDingbats LoutFont } def X X%%BeginResource: procset LoutTabPrependGraphic X X% @PrependGraphic file /usr/staff/jeff/lout.lib/include/tab_prepend X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X% % X% PostScript @SysPrependGraphic file for @Tab % X% % X% To assist in avoiding name clashes, the names % X% of all these symbols begin with "ltab". % X% % X% Jeffrey H. Kingston % X% 24 September 1991 % X% 22 December 1992 % X% % X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X X% linewidth ltabhs - X% horizontal single line X/ltabhs X{ 0 0 moveto xsize 0 lineto X setlinewidth 0 setlinecap stroke X} def X X% linewidth ltabhsp - X% horizontal single line with projecting ends X/ltabhsp X{ 0 0 moveto xsize 0 lineto X setlinewidth 2 setlinecap stroke X} def X X% linewidth ltabhd - X% horizontal double line X/ltabhd X{ dup dup X 0 0 moveto xsize 0 lineto X 0 exch 3 mul moveto xsize exch 3 mul lineto X setlinewidth 0 setlinecap stroke X} def X X% linewidth ltabhdb - X% horizontal double line below mark X/ltabhdb X{ dup dup X 0 0 moveto xsize 0 lineto X 0 exch -3 mul moveto xsize exch -3 mul lineto X setlinewidth 0 setlinecap stroke X} def X X% linewidth ltabhdnw - X% horizontal double line with northwest corner X/ltabhdnw X{ dup dup dup dup X 0 0 moveto xsize 0 lineto X xsize exch 3 mul moveto X -3 mul exch 3 mul lineto X -3 mul 0 lineto X setlinewidth 0 setlinejoin 2 setlinecap stroke X} def X X% linewidth ltabhdne - X% horizontal double line with northeast corner X/ltabhdne X{ dup dup dup dup X 0 0 moveto xsize 0 lineto X 0 exch 3 mul moveto X 3 mul xsize add exch 3 mul lineto X 3 mul xsize add 0 lineto X setlinewidth 0 setlinejoin 2 setlinecap stroke X} def X X% linewidth ltabhdsw - X% horizontal double line with southwest corner X/ltabhdsw X{ dup dup dup dup X 0 0 moveto xsize 0 lineto X xsize exch -3 mul moveto X -3 mul exch -3 mul lineto X -3 mul 0 lineto X setlinewidth 0 setlinejoin 2 setlinecap stroke X} def X X% linewidth ltabhdse - X% horizontal double line with southeast corner X/ltabhdse X{ dup dup dup dup X 0 0 moveto xsize 0 lineto X 0 exch -3 mul moveto X 3 mul xsize add exch -3 mul lineto X 3 mul xsize add 0 lineto X setlinewidth 0 setlinejoin 2 setlinecap stroke X} def X X% linewidth ltabvs - X% vertical single line X/ltabvs X{ 0 0 moveto 0 ysize lineto X setlinewidth 0 setlinecap stroke X} def X X% linewidth ltabvd - X% vertical double line X/ltabvd X{ dup dup X 0 0 moveto 0 ysize lineto X -3 mul 0 moveto -3 mul ysize lineto X setlinewidth 0 setlinecap stroke X} def X X% linewidth ltabvdr - X% vertical double line to right of mark X/ltabvdr X{ dup dup X 0 0 moveto 0 ysize lineto X 3 mul 0 moveto 3 mul ysize lineto X setlinewidth 0 setlinecap stroke X} def X%%EndResource X%%BeginResource: procset LoutFigPrependGraphic X X% @PrependGraphic file /usr/staff/jeff/lout.lib/include/fig_prepend X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X% % X% PostScript @SysPrependGraphic file for @Fig Jeffrey H. Kingston % X% Version 2.0 (includes CIRCUM label) January 1992 % X% % X% To assist in avoiding name clashes, the names of all symbols % X% defined here begin with "lfig". However, this is not feasible % X% with user-defined labels and some labels used by users. % X% % X% <point> is two numbers, a point. % X% <length> is one number, a length % X% <angle> is one number, an angle in degrees % X% <dashlength> is one number, the preferred length of a dash % X% % X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X Xerrordict begin X /handleerror X { X { /Times-Roman findfont 8 pt scalefont setfont X 0 setgray 4 pt 4 pt moveto X $error /errorname get X dup lfigdict exch known X { lfigdict exch get } X { 30 string cvs } ifelse X show X ( Command: ) show X $error /command get 30 string cvs show X } stopped {} if X showpage stop X } def Xend X X% concat strings: <string> <string> lfigconcat <string> X% must be defined outside lfigdict since used in lfigpromotelabels X/lfigconcat X{ 2 copy length exch length add string X dup 0 4 index putinterval X dup 3 index length 3 index putinterval X 3 1 roll pop pop X} def X X% <string> lfigdebugprint - X% must be defined outside lfigdict since used in arbitrary places X% /lfigdebugprint X% { print X% (; operand stack:\n) print X% count copy X% count 2 idiv X% { == X% (\n) print X% } repeat X% (\n) print X% } def X X/lfigdict 120 dict def Xlfigdict begin X X% error messages X/dictfull (dictfull error: too many labels?) def X/dictstackoverflow (dictstackoverflow error: labels nested too deeply?) def X/execstackoverflow (execstackoverflow error: figure nested too deeply?) def X/limitcheck (limitcheck error: figure nested too deeply or too large?) def X/syntaxerror (syntaxerror error: syntax error in text of figure?) def X/typecheck (typecheck error: syntax error in text of figure?) def X/undefined (undefined error: unknown or misspelt label?) def X/VMError (VMError error: run out of memory?) def X X% push pi onto stack: - lfigpi <num> X/lfigpi 3.14159 def X X% arc directions X/clockwise false def X/anticlockwise true def X X% maximum of two numbers: <num> <num> lfigmax <num> X/lfigmax { 2 copy gt { pop } { exch pop } ifelse } def X X% minimum of two numbers: <num> <num> lfigmin <num> X/lfigmin { 2 copy lt { pop } { exch pop } ifelse } def X X% add two points: <point> <point> lfigpadd <point> X/lfigpadd { exch 3 1 roll add 3 1 roll add exch } def X X% subtract first point from second: <point> <point> lfigpsub <point> X/lfigpsub { 3 2 roll sub 3 1 roll exch sub exch } def X X% max two points: <point> <point> lfigpmax <point> X/lfigpmax { exch 3 1 roll lfigmax 3 1 roll lfigmax exch } def X X% min two points: <point> <point> lfigpmin <point> X/lfigpmin { exch 3 1 roll lfigmin 3 1 roll lfigmin exch } def X X% scalar multiplication: <point> <num> lfigpmul <point> X/lfigpmul { dup 3 1 roll mul 3 1 roll mul exch } def X X% point at angle and distance: <point> <length> <angle> lfigatangle <point> X/lfigatangle { 2 copy cos mul 3 1 roll sin mul lfigpadd } def X X% angle from one point to another: <point> <point> lfigangle <angle> X/lfigangle { lfigpsub 2 copy 0 eq exch 0 eq and {pop} {exch atan} ifelse } def X X% distance between two points: <point> <point> lfigdistance <length> X/lfigdistance { lfigpsub dup mul exch dup mul add sqrt } def X X% difference in x coords: <point> <point> lfigxdistance <length> X/lfigxdistance { pop 3 1 roll pop sub } def X X%difference in y coords: <point> <point> lfigydistance <length> X/lfigydistance { 3 1 roll pop sub exch pop } def X X% stroke a solid line: <length> <dashlength> lfigsolid - X/lfigsolid X{ pop pop [] 0 setdash stroke X} def X X% stroke a lfigdashed line: <length> <dashlength> lfigdashed - X/lfigdashed X{ 2 copy div 2 le 1 index 0 le or X { exch pop 1 pt lfigmax [ exch dup ] 0 setdash } X { dup [ exch 4 2 roll 2 copy div X 1 sub 2 div ceiling dup 4 1 roll X 1 add mul sub exch div ] 0 setdash X } ifelse stroke X} def X X% stroke a lfigcdashed line: <length> <dashlength> lfigcdashed - X/lfigcdashed X{ 2 copy le 1 index 0 le or X { exch pop 1 pt lfigmax [ exch dup ] copy 0 get 2 div setdash } X { dup [ 4 2 roll exch 2 copy exch div X 2 div ceiling div 1 index sub X ] exch 2 div setdash X } ifelse stroke X} def X X% stroke a dotted line: <length> <dashlength> lfigdotted - X/lfigdotted X{ dup 0 le X { exch pop 1 pt lfigmax [ exch 0 exch ] 0 setdash } X { 1 index exch div ceiling div X [ 0 3 2 roll ] 0 setdash X } ifelse stroke X} def X X% stroke a noline line: <length> <dashlength> lfignoline - X/lfignoline X{ pop pop X} def X X% painting (i.e. filling): - lfigwhite - (etc.) X/lfigwhite { 1.0 setgray fill } def X/lfiglight { 0.95 setgray fill } def X/lfiggrey { 0.9 setgray fill } def X/lfiggray { 0.9 setgray fill } def X/lfigdark { 0.7 setgray fill } def X/lfigblack { 0.0 setgray fill } def X/lfignopaint { } def X X% line caps (and joins, not currently used) X/lfigbutt 0 def X/lfiground 1 def X/lfigprojecting 2 def X/lfigmiter 0 def X/lfigbevel 2 def X X% shape and labels of the @Box symbol X/lfigbox X{ X 0 0 /SW lfigpointdef X xsize 0 /SE lfigpointdef X xsize ysize /NE lfigpointdef X 0 ysize /NW lfigpointdef X SE 0.5 lfigpmul /S lfigpointdef X NW 0.5 lfigpmul /W lfigpointdef X W SE lfigpadd /E lfigpointdef X S NW lfigpadd /N lfigpointdef X NE 0.5 lfigpmul /CTR lfigpointdef X [ CTR NE lfigpsub /lfigboxcircum cvx ] lfigcircumdef X SW SE NE NW SW X} def X X% shape and labels of the @Square symbol X/lfigsquare X{ X xsize ysize 0.5 lfigpmul /CTR lfigpointdef X CTR xsize xsize ysize ysize lfigpmax 0.5 lfigpmul lfigpadd /NE lfigpointdef X CTR 0 0 CTR NE lfigdistance 135 lfigatangle lfigpadd /NW lfigpointdef X CTR 0 0 CTR NE lfigdistance 225 lfigatangle lfigpadd /SW lfigpointdef X CTR 0 0 CTR NE lfigdistance 315 lfigatangle lfigpadd /SE lfigpointdef X SW 0.5 lfigpmul SE 0.5 lfigpmul lfigpadd /S lfigpointdef X NW 0.5 lfigpmul NE 0.5 lfigpmul lfigpadd /N lfigpointdef X SW 0.5 lfigpmul NW 0.5 lfigpmul lfigpadd /W lfigpointdef X SE 0.5 lfigpmul NE 0.5 lfigpmul lfigpadd /E lfigpointdef X [ CTR NE lfigpsub /lfigboxcircum cvx ] lfigcircumdef X SW SE NE NW SW X} def X X% shape and labels of the @Diamond symbol X/lfigdiamond X{ X xsize 0 0.5 lfigpmul /S lfigpointdef X 0 ysize 0.5 lfigpmul /W lfigpointdef X S W lfigpadd /CTR lfigpointdef X CTR W lfigpadd /N lfigpointdef X CTR S lfigpadd /E lfigpointdef X [ xsize ysize 0.5 lfigpmul /lfigdiamondcircum cvx ] lfigcircumdef X S E N W S X} def X X% shape and labels of the @Ellipse symbol X/lfigellipse X{ X xsize 0 0.5 lfigpmul /S lfigpointdef X 0 ysize 0.5 lfigpmul /W lfigpointdef X S W lfigpadd /CTR lfigpointdef X CTR W lfigpadd /N lfigpointdef X CTR S lfigpadd /E lfigpointdef X CTR xsize 0 0.3536 lfigpmul lfigpadd 0 ysize 0.3536 lfigpmul lfigpadd /NE lfigpointdef X 0 ysize 0.3536 lfigpmul CTR xsize 0 0.3536 lfigpmul lfigpadd lfigpsub /SE lfigpointdef X xsize 0 0.3536 lfigpmul CTR lfigpsub 0 ysize 0.3536 lfigpmul lfigpadd /NW lfigpointdef X 0 ysize 0.3536 lfigpmul xsize 0 0.3536 lfigpmul CTR lfigpsub lfigpsub /SW lfigpointdef X [ xsize ysize 0.5 lfigpmul /lfigellipsecircum cvx ] lfigcircumdef X S [ CTR ] E [ CTR ] N [ CTR ] W [ CTR ] S X} def X X% shape and labels of the @Circle symbol X/lfigcircle X{ X xsize ysize 0.5 lfigpmul /CTR lfigpointdef X CTR xsize 0 ysize 0 lfigpmax 0.5 lfigpmul lfigpadd /E lfigpointdef X CTR 0 0 CTR E lfigdistance 45 lfigatangle lfigpadd /NE lfigpointdef X CTR 0 0 CTR E lfigdistance 90 lfigatangle lfigpadd /N lfigpointdef X CTR 0 0 CTR E lfigdistance 135 lfigatangle lfigpadd /NW lfigpointdef X CTR 0 0 CTR E lfigdistance 180 lfigatangle lfigpadd /W lfigpointdef X CTR 0 0 CTR E lfigdistance 225 lfigatangle lfigpadd /SW lfigpointdef X CTR 0 0 CTR E lfigdistance 270 lfigatangle lfigpadd /S lfigpointdef X CTR 0 0 CTR E lfigdistance 315 lfigatangle lfigpadd /SE lfigpointdef X [ S E lfigpsub /lfigellipsecircum cvx ] lfigcircumdef X S [ CTR ] E [ CTR ] N [ CTR ] W [ CTR ] S X} def X X% shape and labels of the @HLine and @HArrow symbols X/lfighline X{ X 0 ymark lfigprevious /FROM lfigpointdef X xsize ymark lfigprevious /TO lfigpointdef X} def X X% shape and labels of the @VLine and @VArrow symbols X/lfigvline X{ X xmark ysize lfigprevious /FROM lfigpointdef X xmark 0 lfigprevious /TO lfigpointdef X} def X X% points of a polygon around base with given no of sides, vert init angle: X% <sides> <angle> figpolygon <point> ... <point> X/lfigpolygon X{ xsize ysize 0.5 lfigpmul /CTR lfigpointdef X 90 sub CTR 2 copy lfigmax 5 3 roll X [ 4 copy pop /lfigpolycircum cvx ] lfigcircumdef X exch dup 360 exch div exch X 1 1 3 2 roll X { 4 string cvs (P) exch lfigconcat cvn X 6 copy pop pop lfigatangle 2 copy 10 2 roll X 3 2 roll lfigpointdef X dup 3 1 roll add exch X } for X pop lfigatangle X} def X X% next array element: <array> <index> lfiggetnext <array> <index> <any> true X% or <array> <index> false X/lfiggetnext X{ 2 copy exch length ge X { false } X { 2 copy get exch 1 add exch true } ifelse X} def X X% check whether thing is number: <any> lfigisnumbertype <any> <bool> X/lfigisnumbertype X{ dup type dup X /integertype eq exch /realtype eq or X} def X X% check whether thing is an array: <any> lfigisarraytype <any> <bool> X/lfigisarraytype { dup type /arraytype eq } def X X% get next item: <array> <index> lfiggetnextitem <array> <index> 0 X% or <array> <index> <array> 1 X% or <array> <index> <point> 2 X/lfiggetnextitem X{ lfiggetnext X { lfigisarraytype X { 1 X } X { lfigisnumbertype X { 3 1 roll X lfiggetnext X { lfigisnumbertype X { 4 3 roll exch 2 X } X { pop 3 2 roll pop 0 X } ifelse X } X { 3 2 roll pop 0 X } ifelse X } X { pop 0 X } ifelse X } ifelse X } X { 0 X } ifelse X} def X X% set arc path: bool x1 y1 x2 y2 x0 y0 lfigsetarc <angle> <angle> <dist> X% the path goes from x1 y1 to x2 y2 about centre x0 y0, X% anticlockwise if bool is true else clockwise. X% The orientations of backwards pointing and forwards pointing X% arrowheads are returned in the two angles, and X% the length of the arc is returned in <dist>. X/lfigsetarc X{ X 20 dict begin X matrix currentmatrix 8 1 roll X 2 copy translate 2 copy 8 2 roll X 4 2 roll lfigpsub 6 2 roll lfigpsub X dup /y1 exch def dup mul /y1s exch def X dup /x1 exch def dup mul /x1s exch def X dup /y2 exch def dup mul /y2s exch def X dup /x2 exch def dup mul /x2s exch def X X y1s y2s eq X { -1 X } X { y1s x2s mul y2s x1s mul sub y1s y2s sub div X } ifelse X /da exch def X X x1s x2s eq X { -1 X } X { x1s y2s mul x2s y1s mul sub x1s x2s sub div X } ifelse X /db exch def X X da 0 gt db 0 gt and X { /LMax da sqrt db sqrt lfigmax def X /scalex da sqrt LMax div def X /scaley db sqrt LMax div def X scalex scaley scale X 0 0 LMax X 0 0 x1 scalex mul y1 scaley mul lfigangle X 0 0 x2 scalex mul y2 scaley mul lfigangle X 2 copy eq { 360 add } if X 2 copy 8 2 roll X 5 index { arc } { arcn } ifelse X 2 index 1 index X { 90 sub } { 90 add } ifelse X dup sin scaley mul exch cos scalex mul atan X 2 index 2 index X { 90 add } { 90 sub } ifelse X dup sin scaley mul exch cos scalex mul atan X 5 2 roll % res1 res2 ang1 ang2 anticlockwise X { exch sub } { sub } ifelse X dup 0 le { 360 add } if lfigpi mul LMax mul 180 div X } X { 0 0 x1 y1 lfigdistance 0 0 x2 y2 lfigdistance eq X 0 0 x1 y1 lfigdistance 0 gt and X { 0 0 X 0 0 x1 y1 lfigdistance X 0 0 x1 y1 lfigangle X 0 0 x2 y2 lfigangle X 2 copy eq { 360 add } if X 2 copy 8 2 roll X 5 index { arc } { arcn } ifelse X 2 index 1 index X { 90 sub } { 90 add } ifelse X 2 index 2 index X { 90 add } { 90 sub } ifelse X 5 2 roll % res1 res2 ang1 ang2 clockwise X { exch sub } { sub } ifelse X dup 0 le { 360 add } if lfigpi mul 0 0 x1 y1 lfigdistance mul 180 div X } X { x2 y2 lineto pop X x2 y2 x1 y1 lfigangle X x1 y1 x2 y2 lfigangle X x1 y1 x2 y2 lfigdistance X } ifelse X } ifelse X 4 -1 roll setmatrix X end X} def X X% lfigsetcurve: set up a Bezier curve from x0 y0 to x3 y3 X% and return arrowhead angles and length of curve (actually 0) X% x0 y0 x1 y1 x2 y2 x3 y3 lfigsetcurve <angle> <angle> <length> X/lfigsetcurve X{ 8 copy curveto pop pop X lfigangle X 5 1 roll X 4 2 roll lfigangle X exch X 0 X} def X X% lfigpaintpath: paint a path of the given shape X% /paint [ shape ] lfigpaintpath - X/lfigpaintpath X{ X 10 dict begin X 0 newpath X /prevseen false def X /curveseen false def X { lfiggetnextitem X dup 0 eq { pop exit } X { 1 eq X { /curveseen true def X /curve exch def X curve length 0 eq { /curveseen false def } if X } X { /ycurr exch def X /xcurr exch def X prevseen X { curveseen X { curve length 4 eq X { xprev yprev X curve 0 get curve 1 get X curve 2 get curve 3 get X xcurr ycurr X lfigsetcurve pop pop pop X } X { xprev yprev xcurr ycurr X curve length 1 ge { curve 0 get } { 0 } ifelse X curve length 2 ge { curve 1 get } { 0 } ifelse X curve length 3 ge { curve 2 get } { true } ifelse X 7 1 roll X lfigsetarc pop pop pop X } ifelse X } X { xcurr ycurr lineto X } ifelse X } X { xcurr ycurr moveto X } ifelse X /xprev xcurr def X /yprev ycurr def X /prevseen true def X /curveseen false def X } ifelse X } ifelse X } loop pop pop cvx exec X end X} def X X% stroke a path of the given shape in the given linestyle and dash length. X% Return the origin and angle of the backward and forward arrow heads. X% dashlength /linestyle [shape] lfigdopath [<point> <angle>] [<point> <angle>] X/lfigdopath X{ X 10 dict begin X 0 X /prevseen false def X /curveseen false def X /backarrow [] def X /fwdarrow [] def X { X lfiggetnextitem X dup 0 eq { pop exit } X { X 1 eq X { /curveseen true def X /curve exch def X curve length 0 eq { /prevseen false def } if X } X { /ycurr exch def X /xcurr exch def X prevseen X { newpath xprev yprev moveto X curveseen X { curve length 4 eq X { xprev yprev X curve 0 get curve 1 get X curve 2 get curve 3 get X xcurr ycurr lfigsetcurve X } X { xprev yprev xcurr ycurr X curve length 1 ge { curve 0 get } { 0 } ifelse X curve length 2 ge { curve 1 get } { 0 } ifelse X curve length 3 ge { curve 2 get } { true } ifelse X 7 1 roll X lfigsetarc X } ifelse X } X { xcurr ycurr lineto X xcurr ycurr xprev yprev lfigangle dup 180 sub X xprev yprev xcurr ycurr lfigdistance X } ifelse X 6 index 6 index cvx exec X [ xprev yprev 5 -1 roll ] X backarrow length 0 eq X { /backarrow exch def } X { pop } ifelse X [ xcurr ycurr 4 -1 roll ] /fwdarrow exch def X } if X /xprev xcurr def X /yprev ycurr def X /prevseen true def X /curveseen false def X } ifelse X } ifelse X } loop X pop pop pop pop X backarrow length 0 eq { [ 0 0 0 ] } { backarrow } ifelse X fwdarrow length 0 eq { [ 0 0 0 ] } { fwdarrow } ifelse X end X} def X X% lfigdoarrow: draw an arrow head of given form X% dashlength /lstyle /pstyle hfrac height width [ <point> <angle> ] lfigdoarrow - X/lfigdoarrow X{ matrix currentmatrix 8 1 roll X dup 0 get 1 index 1 get translate X 2 get rotate X [ 2 index neg 2 index 0 0 X 3 index 3 index neg X 1 index 10 index mul 0 X 7 index 7 index ] X 4 1 roll pop pop pop X dup 3 1 roll X gsave lfigpaintpath grestore lfigdopath pop pop X setmatrix X} def X X% arrow head styles X/lfigopen 0.0 def X/lfighalfopen 0.5 def X/lfigclosed 1.0 def X X% stroke no arrows, forward, back, and both X/lfignoarrow { pop pop pop pop pop pop pop pop } def X/lfigforward { 7 -1 roll lfigdoarrow pop } def X/lfigback { 8 -2 roll pop lfigdoarrow } def X/lfigboth { 8 -1 roll 7 copy lfigdoarrow pop 7 -1 roll lfigdoarrow } def X X% lfigprevious: return previous point on path X/lfigprevious X{ lfigisnumbertype X { 2 copy } X { lfigisarraytype X { 2 index 2 index } X { 0 0 } X ifelse X } ifelse X} def X X% label a point in 2nd top dictionary: <point> /name lfigpointdef - X/lfigpointdef X{ X % (Entering lfigpointdef) lfigdebugprint X [ 4 2 roll transform X /itransform cvx ] cvx X currentdict end X 3 1 roll X % currentdict length currentdict maxlength lt X % { def } X % { exec moveto (too many labels) show stop } X % ifelse X def X begin X % (Leaving lfigpointdef) lfigdebugprint X} def X X% promote labels from second top to third top dictionary X% <string> lfigpromotelabels - X/lfigpromotelabels X{ X % (Entering lfigpromotelabels) lfigdebugprint X currentdict end exch currentdict end X { exch 20 string cvs 2 index X (@) lfigconcat exch lfigconcat cvn exch def X } forall pop begin X % (Leaving lfigpromotelabels) lfigdebugprint X} def X X% show labels (except CIRCUM): - lfigshowlabels - X/lfigshowlabels X{ X % (Entering lfigshowlabels) lfigdebugprint X currentdict end X currentdict X { 1 index 20 string cvs (CIRCUM) search % if CIRCUM in key X { pop pop pop pop pop } X { pop cvx exec 2 copy X newpath 1.5 pt 0 360 arc X 0 setgray fill X /Times-Roman findfont 8 pt scalefont setfont X moveto 0.2 cm 0.1 cm rmoveto 20 string cvs show X } X ifelse X } forall X begin X % (Leaving lfigshowlabels) lfigdebugprint X} def X X% fix an angle to between 0 and 360 degrees: <angle> lfigfixangle <angle> X/lfigfixangle X{ X % (Entering lfigfixangle) lfigdebugprint X { dup 0 ge { exit } if X 360 add X } loop X { dup 360 lt { exit } if X 360 sub X } loop X % (Leaving lfigfixangle) lfigdebugprint X} def X X% find point on circumference of box: alpha a b lfigboxcircum x y X/lfigboxcircum X{ X % (Entering lfigboxcircum) lfigdebugprint X 4 dict begin X /b exch def X /a exch def X lfigfixangle /alpha exch def X 0 0 a b lfigangle /theta exch def X X % if alpha <= theta, return (a, a*tan(alpha)) X alpha theta le X { a a alpha sin mul alpha cos div } X { X % else if alpha <= 180 - theta, return (b*cot(alpha), b) X alpha 180 theta sub le X { b alpha cos mul alpha sin div b } X { X % else if alpha <= 180 + theta, return (-a, -a*tan(alpha)) X alpha 180 theta add le X { a neg a neg alpha sin mul alpha cos div } X { X % else if alpha <= 360 - theta, return (-b*cot(alpha), -b) X alpha 360 theta sub le X { b neg alpha cos mul alpha sin div b neg } X { X % else 360 - theta <= alpha, return (a, a*tan(alpha)) X a a alpha sin mul alpha cos div X } ifelse X } ifelse X } ifelse X } ifelse X end X % (Leaving lfigboxcircum) lfigdebugprint X} def X X% find point on circumference of diamond: alpha a b lfigdiamondcircum x y X/lfigdiamondcircum X{ X % (Entering lfigdiamondcircum) lfigdebugprint X 4 dict begin X /b exch def X /a exch def X lfigfixangle /alpha exch def X b alpha cos abs mul a alpha sin abs mul add /denom exch def X a b mul alpha cos mul denom div X a b mul alpha sin mul denom div X end X % (Leaving lfigdiamondcircum) lfigdebugprint X} def X X% find point on circumference of ellipse: alpha a b lfigellipsecircum x y X/lfigellipsecircum X{ X % (Entering lfigellipsecircum) lfigdebugprint X 4 dict begin X /b exch def X /a exch def X lfigfixangle /alpha exch def X b alpha cos mul dup mul a alpha sin mul dup mul add sqrt /denom exch def X a b mul alpha cos mul denom div X a b mul alpha sin mul denom div X end X % (Leaving lfigellipsecircum) lfigdebugprint X} def X X% find point of intersection of two lines each defined by two points X% x1 y1 x2 y2 x3 y3 x4 y4 lfiglineintersect x y X/lfiglineintersect X{ X % (Entering lfiglineintersect) lfigdebugprint X 13 dict begin X /y4 exch def X /x4 exch def X /y3 exch def X /x3 exch def X /y2 exch def X /x2 exch def X /y1 exch def X /x1 exch def X x2 x1 sub /x21 exch def X x4 x3 sub /x43 exch def X y2 y1 sub /y21 exch def X y4 y3 sub /y43 exch def X y21 x43 mul y43 x21 mul sub /det exch def X X % calculate x X y21 x43 mul x1 mul X y43 x21 mul x3 mul sub X y3 y1 sub x21 mul x43 mul add X det div X X % calculate y X x21 y43 mul y1 mul X x43 y21 mul y3 mul sub X x3 x1 sub y21 mul y43 mul add X det neg div X X end X % (Leaving lfiglineintersect) lfigdebugprint X} def X X% find point on circumference of polygon X% alpha radius num theta lfigpolycircum x y X/lfigpolycircum X{ X % (Entering lfigpolycircum) lfigdebugprint X 13 dict begin X /theta exch def X /num exch def X /radius exch def X /alpha exch def X X % calculate delta, the angle from theta to alpha X alpha theta sub lfigfixangle X X % calculate the angle which is the multiple of 360/num closest to delta X 360 num div div truncate 360 num div mul theta add /anglea exch def X X % calculate the next multiple of 360/num after anglea X anglea 360 num div add /angleb exch def X X % intersect the line through these two points with the alpha line X anglea cos anglea sin angleb cos angleb sin X 0 0 alpha cos 2 mul alpha sin 2 mul X lfiglineintersect radius lfigpmul X X end X % (Leaving lfigpolycircum) lfigdebugprint X} def X X% add CIRCUM operator with this body: <array> lfigcircumdef - X/lfigcircumdef X{ % (Entering lfigcircumdef) lfigdebugprint X /CIRCUM exch cvx X currentdict end X 3 1 roll X % currentdict length currentdict maxlength lt X % { def } X % { exec moveto (too many labels) show stop } X % ifelse X def X begin X % (Leaving lfigcircumdef) lfigdebugprint X} def X Xend X%%EndResource X X%%EndProlog X X%%Page: ? 1 X%%BeginPageSetup X/pgsave save def X0.0500 dup scale 10 setlinewidth X%%EndPageSetup X X240 fnt36 X3365 13817 moveto(Eq)s 3718 x(\211)s 3898 x(A)s 4131 x(Lout)s 4683 x(Package)s X5594 x(for)s 5959 x(Typesetting)s 7214 x(Mathematics)s X240 fnt35 X5020 13243 moveto(Jeffrey)s 5729 x(H.)s X6022 x(Kingston)s X240 fnt34 X4001 12671 moveto(Basser)s 4698 x(Department)s 5886 x(of)s 6145 x(Computer)s X7162 x(Science)s 4659 12383 moveto(University)s 5728 x(of)s 5987 x(Sydney)s 6766 x(2006)s X5515 12095 moveto(Australia)s X240 fnt35 X5388 11211 moveto(ABSTRACT)s X240 fnt34 X2137 10755 moveto(This)s 2660 x(report)s 3328 x(describes)s X4315 x(the)s 4705 x(use)s 5122 x(of)s 5419 x(Eq,)s 5843 x(a)s X6047 x(package)s 6929 x(of)s 7226 x(de\207nitions)s 8334 x(for)s 8710 x(typesetting)s X2137 10467 moveto(mathematics)s 3404 x(with)s 3889 x(the)s 4241 x(Lout)s 4753 x(document)s X5757 x(formatter.)s 6824 x(For)s 7216 x(example,)s X220 fnt13 X2617 9966 moveto(@Eq { big int supp 1 on 0 ` dx over sqrt {1 - x sup 2} = pi over 2 })s X240 fnt34 X2137 9467 moveto(produces)s X3061 x(the)s 3413 x(output)s gsave X2617 8851 translate X-180.0000 rotate Xgsave X0 -206 translate X180.0000 rotate X X404 fnt33 X0 -370 moveto(\362)s Xgrestore X Xgrestore X X404 fnt33 X2617 8688 moveto(\362)s X167 fnt33 X2727 9016 moveto(1)s X2727 8604 moveto(0)s X240 fnt35 X3104 8902 moveto(dx)s gsave X2853 8851 translate X728 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore Xgsave X0 8584 translate X1.0000 1.3712 scale X X240 fnt33 X2853 -60 moveto(\326)s Xgrestore Xgsave X2984 8803 translate X597 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.03 ft setlinewidth 2 setlinecap stroke Xgrestore X Xgrestore X X240 fnt33 X3027 8532 moveto(1)s 3204 x(-)s X X167 fnt33 X3498 8647 moveto(2)s X240 fnt35 X3392 8539 moveto(x)s X240 fnt33 X3653 8791 moveto(=)s 3856 8903 moveto(p)s gsave X3856 8851 translate X131 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X240 fnt33 X3861 8639 moveto(2)s X X240 fnt34 X2137 8039 moveto(The)s 2568 x(advantages)s 3690 x(of)s 3948 x(Eq)s 4273 x(include)s X5036 x(careful)s 5757 x(attention)s 6652 x(to)s 6897 x(details)s 7579 x(of)s X7837 x(spacing,)s 8687 x(a)s 8852 x(repertoire)s 2137 7751 moveto(of)s 2382 x(several)s X3104 x(hundred)s 3935 x(mathematical)s 5267 x(symbols,)s 6171 x(a)s 6323 x(simple)s X7006 x(syntax)s 7677 x(extensible)s 8692 x(by)s 8978 x(the)s 9316 x(user,)s X2137 7463 moveto(and)s 2543 x(complete)s 3479 x(integration)s 4574 x(with)s 5059 x(the)s X5411 x(rest)s 5815 x(of)s 6074 x(Lout.)s 2617 7089 moveto(In)s 2898 x(addition,)s X3824 x(this)s 4251 x(report)s 4903 x(contains)s 5782 x(an)s 6090 x(appendix)s X7050 x(describing)s 8128 x(the)s 8502 x(use)s 8903 x(of)s 9184 x(Pas,)s X9658 x(a)s 2137 6801 moveto(package)s 2981 x(of)s 3240 x(de\207nitions)s 4310 x(for)s X4648 x(printing)s 5465 x(Pascal)s 6135 x(programs.)s 1417 5147 moveto(22)s 1717 x(December,)s X2819 x(1992)s Xpgsave restore Xshowpage X X%%Page: ? 2 X%%BeginPageSetup X/pgsave save def X0.0500 dup scale 10 setlinewidth X%%EndPageSetup X X240 fnt36 X3365 14537 moveto(Eq)s 3718 x(\211)s 3898 x(A)s 4131 x(Lout)s 4683 x(Package)s X5594 x(for)s 5959 x(Typesetting)s 7214 x(Mathematics)s X240 fnt35 X5020 13963 moveto(Jeffrey)s 5729 x(H.)s X6022 x(Kingston)s X240 fnt34 X4001 13391 moveto(Basser)s 4698 x(Department)s 5886 x(of)s 6145 x(Computer)s X7162 x(Science)s 4659 13103 moveto(University)s 5728 x(of)s 5987 x(Sydney)s 6766 x(2006)s X5515 12815 moveto(Australia)s X240 fnt36 X1417 12222 moveto(1.)s 1717 x(Introduction)s X240 fnt34 X1897 11791 moveto(Eq)s 2205 x(is)s X2406 x(a)s 2554 x(package)s 3380 x(of)s 3621 x(de\207nitions)s 4673 x(for)s X4993 x(typesetting)s 6084 x(mathematics)s 7333 x(with)s 7800 x(the)s 8134 x(Lout)s X8628 x(document)s 9614 x(formatter)s 1417 11503 moveto([)s 1496 x(4)s 1616 x(].)s X1874 x(It)s 2078 x(includes)s 2934 x(several)s 3669 x(hundred)s 4513 x(mathematical)s X5858 x(and)s 6263 x(other)s 6813 x(special)s 7535 x(characters)s 8561 x(\(including)s X9603 x(the)s 9954 x(entire)s 1417 11215 moveto(PostScript)s X153 fnt34 X2399 11320 moveto(1)s X240 fnt34 X2545 11215 moveto(Symbol)s X3360 x(font)s 3815 x([)s 3894 x(1)s 4014 x(]\),)s 4302 x(and)s X4718 x(a)s 4894 x(smaller)s 5666 x(number)s 6467 x(of)s 6736 x(symbols)s X7604 x(for)s 7952 x(joining)s 8700 x(objects)s 9447 x(together)s 10300 x(in)s X1417 10927 moveto(mathematical)s 2753 x(ways.)s 3415 x(Eq)s 3731 x(is)s 3940 x(based)s X4535 x(on)s 4825 x(the)s 5167 x(eqn)s 5563 x(language)s 6477 x(of)s X6726 x(Kernighan)s 7786 x(and)s 8182 x(Cherry)s 8896 x([)s 8975 x(3)s X9095 x(],)s 9284 x(with)s 9759 x(spacing)s 1417 10639 moveto(rules)s 1941 x(similar)s X2663 x(to)s 2909 x(Knuth's)s 3740 x(T)s 3886 10591 moveto(E)s 4032 10639 moveto(X)s X4265 x(formatter)s 5212 x([)s 5291 x(6)s 5411 x(].)s 1897 10265 moveto(To)s X2226 x(use)s 2608 x(Eq)s 2937 x(in)s 3186 x(a)s 3355 x(Lout)s X3870 x(document,)s 4937 x(\207rst)s 5371 x(ensure)s 6058 x(that)s 6479 x(its)s X6767 x(de\207nition)s 7747 x(is)s 7969 x(included,)s 8916 x(either)s 9522 x(by)s X9825 x(having)s X220 fnt13 X1417 9973 moveto(@SysInclude { eq })s X240 fnt34 X3367 9977 moveto(in)s 3634 x(the)s 4007 x(setup)s X4593 x(\207le,)s 5039 x(or)s X220 fnt13 X5319 9973 moveto(-ieq)s X240 fnt34 X5765 9977 moveto(on)s 6086 x(the)s X6459 x(command)s 7484 x(line.)s 8043 x(Then,)s 8676 x(at)s 8929 x(any)s X9356 x(point)s 9929 x(in)s 10196 x(the)s 1417 9689 moveto(document,)s 2479 x(write)s X X220 fnt13 X3027 9685 moveto(@Eq { ... })s X240 fnt34 X4271 9689 moveto(and)s 4675 x(the)s 5025 x(symbols)s 5881 x(of)s X6138 x(Eq)s 6462 x(will)s 6891 x(be)s 7175 x(available)s 8095 x(between)s X8950 x(the)s 9300 x(braces.)s 10088 x(Any)s 1417 9401 moveto(symbols)s 2290 x(available)s X3227 x(outside)s 3993 x(continue)s 4892 x(to)s 5153 x(be)s 5454 x(available)s X6391 x(inside,)s 7097 x(which)s 7757 x(means)s 8443 x(that)s 8876 x(Eq)s X9217 x(can)s 9624 x(be)s 9925 x(freely)s 1417 9113 moveto(mixed)s 2075 x(with)s X2560 x(standard)s 3430 x(Lout)s 3942 x(and)s 4348 x(with)s 4833 x(symbols)s X5691 x(from)s 6215 x(other)s 6766 x(packages,)s 7763 x(without)s 8554 x(restriction.)s X1897 8739 moveto(In)s 2156 x(this)s 2561 x(report)s 3191 x(we)s 3530 x(show)s X4096 x(the)s 4448 x(Lout)s 4960 x(input)s 5512 x(at)s 5744 x(the)s X6096 x(left,)s 6533 x(and)s 6939 x(its)s 7224 x(result)s 7814 x(at)s X8046 x(the)s 8398 x(right:)s X220 fnt13 X1897 8023 moveto(@Eq { {x sup 2 + y sup 2} over 2 })s X167 fnt33 X5972 8286 moveto(2)s X240 fnt35 X5866 8178 moveto(x)s X X240 fnt33 X6112 8171 moveto(+)s X167 fnt33 X6406 8286 moveto(2)s X240 fnt35 X6300 8178 moveto(y)s gsave X5866 8080 translate X623 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X240 fnt33 X6117 7868 moveto(2)s X240 fnt34 X1417 7418 moveto(Subsequent)s X2581 x(examples)s 3544 x(will)s 3975 x(omit)s 4473 x(the)s 4825 x(enclosing)s X X220 fnt13 X5802 7414 moveto(@Eq { ... })s X240 fnt34 X6805 7418 moveto(.)s X240 fnt36 X1417 6625 moveto(2.)s 1717 x(Symbols)s X240 fnt34 X1897 6147 moveto(Eq)s X2223 x(prints)s 2827 x(characters)s 3854 x(in)s 4100 x(the)s 4452 x(fonts)s X4990 x(appropriate)s 6138 x(for)s 6476 x(mathematics:)s X220 fnt13 X1897 5646 moveto(x - 2)s X240 fnt35 X5866 5650 moveto(x)s X X240 fnt33 X6029 5643 moveto(-)s 6217 x(2)s X240 fnt34 X1417 5192 moveto(Here)s X240 fnt35 X1923 x(x)s X240 fnt34 X2071 x(is)s X2272 x(in)s 2500 x(Italic,)s X240 fnt33 X3091 5185 moveto(2)s X240 fnt34 X3253 5192 moveto(is)s 3454 x(in)s X3682 x(Roman,)s 4476 x(and)s X240 fnt33 X4864 5185 moveto(-)s X240 fnt34 X5037 5192 moveto(is)s 5238 x(from)s X5744 x(the)s 6078 x(Symbol)s 6865 x(font.)s 7412 x(The)s 7826 x(character)s X X220 fnt13 X8742 5188 moveto(-)s X240 fnt34 X8857 5192 moveto(is)s 9058 x(a)s X240 fnt35 X9206 x(symbol)s X240 fnt34 X9926 x(which)s X1417 4904 moveto(stands)s 2075 x(for)s X240 fnt33 X2413 4897 moveto(-)s X240 fnt34 X2544 4904 moveto(,)s 2664 x(and)s X X220 fnt13 X3070 4900 moveto(2)s X240 fnt34 X3252 4904 moveto(is)s 3471 x(also)s 3916 x(a)s 4082 x(symbol,)s X4907 x(standing)s 5778 x(for)s X240 fnt33 X6116 4897 moveto(2)s X240 fnt34 X6236 4904 moveto(.)s 6416 x(Eq)s X6742 x(includes)s 7599 x(a)s 7765 x(vast)s 8210 x(number)s 9001 x(of)s X9260 x(symbols:)s X220 fnt13 X1897 4348 moveto(Omega delta int partial club)s X240 fnt33 X5866 4345 moveto(W)s 6050 x(d)s gsave X6168 4405 translate X-180.0000 rotate Xgsave X0 -159 translate X180.0000 rotate X X311 fnt33 X0 -284 moveto(\362)s X Xgrestore X Xgrestore X X311 fnt33 X6168 4280 moveto(\362)s X240 fnt33 X6253 4345 moveto(\266)s 6371 x(\247)s X240 fnt34 X1417 3796 moveto(The)s 1849 x(summary)s X2799 x(at)s 3031 x(the)s 3383 x(end)s 3789 x(of)s 4048 x(this)s X4453 x(report)s 5083 x(has)s 5462 x(the)s 5814 x(complete)s 6750 x(list.)s X1897 3422 moveto(Symbols)s 2813 x(whose)s 3503 x(names)s 4192 x(are)s 4561 x(made)s X5157 x(from)s 5699 x(letters)s 6359 x(should)s 7076 x(be)s 7380 x(separated)s X8360 x(from)s 8902 x(each)s 9418 x(other)s 9987 x(by)s 10305 x(at)s X1417 3134 moveto(least)s 1914 x(one)s 2320 x(space)s 2911 x(or)s 3170 x(end)s X3576 x(of)s 3835 x(line,)s 4313 x(as)s 4572 x(was)s 5004 x(done)s X5530 x(above,)s 6222 x(or)s 6481 x(else)s 6912 x(Eq)s 7238 x(will)s X7669 x(become)s 8473 x(confused:)s X220 fnt13 X1897 2627 moveto(Omegadelta)s X240 fnt35 X5866 2631 moveto(Omegadelta)s gsave X1417 1752 translate X680 0 0 0 240 288 60 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto stroke Xgrestore X Xgrestore X X153 fnt34 X1417 1536 moveto(1)s X X192 fnt34 X1493 1458 moveto(PostScript)s 2326 x(is)s 2501 x(a)s 2634 x(trademark)s 3457 x(of)s X3664 x(Adobe)s 4223 x(Systems,)s 4956 x(Incorporated.)s Xpgsave restore Xshowpage X X%%Page: ? 3 X%%BeginPageSetup X/pgsave save def X0.0500 dup scale 10 setlinewidth X%%EndPageSetup X X240 fnt34 X5754 15261 moveto(-)s 5893 x(2)s 6073 x(-)s 1417 14674 moveto(Symbols)s 2327 x(whose)s X3011 x(names)s 3694 x(are)s 4057 x(made)s 4647 x(from)s 5183 x(digits)s X5786 x(and)s 6204 x(punctuation)s 7406 x(characters)s 8445 x(can,)s 8909 x(however,)s X9865 x(be)s 10163 x(run)s 1417 14386 moveto(together)s 2260 x(with)s 2745 x(each)s X3243 x(other)s 3794 x(and)s 4200 x(with)s 4685 x(symbols)s 5543 x(made)s X6121 x(from)s 6645 x(letters:)s X220 fnt13 X1897 13872 moveto(Omega-delta<=2)s X240 fnt33 X5866 13869 moveto(W)s 6107 x(-)s X6295 x(d)s 6485 x(\243)s 6688 x(2)s X240 fnt34 X1417 13373 moveto(This)s 1902 x(rule)s X2333 x(applies)s 3070 x(throughout)s 4181 x(the)s 4533 x(Lout)s 5045 x(world.)s X1897 12999 moveto(Some)s 2502 x(symbols)s 3360 x(join)s 3792 x(objects)s 4529 x(together)s X5372 x(in)s 5618 x(mathematical)s 6964 x(ways:)s X220 fnt13 X1897 12500 moveto(x sub 2)s X240 fnt35 X5866 12504 moveto(x)s X X167 fnt33 X5972 12420 moveto(2)s X240 fnt34 X1417 11970 moveto(Here)s 1930 x(the)s X220 fnt13 X2271 11966 moveto(sub)s X240 fnt34 X2674 11970 moveto(symbol)s X3428 x(has)s 3796 x(taken)s 4363 x(the)s 4704 x(object)s 5337 x(just)s X5731 x(to)s 5966 x(its)s 6240 x(left,)s 6666 x(and)s 7061 x(the)s X7402 x(object)s 8035 x(just)s 8429 x(to)s 8664 x(its)s 8938 x(right,)s X9498 x(and)s 9893 x(joined)s 1417 11682 moveto(them)s 1972 x(into)s 2421 x(one)s X2844 x(object)s 3505 x(in)s 3768 x(the)s 4137 x(form)s 4678 x(of)s X4954 x(a)s 5137 x(subscript.)s 6197 x(The)s 6646 x(two)s 7082 x(objects)s X7836 x(are)s 8204 x(called)s 8851 x(the)s 9220 x(left)s 9614 x(and)s X10037 x(right)s 1417 11394 moveto(parameters)s 2524 x(of)s X220 fnt13 X2783 11390 moveto(sub)s X240 fnt34 X3137 11394 moveto(,)s X3257 x(and)s 3663 x(they)s 4135 x(may)s 4607 x(be)s 4893 x(arbitrary)s X5774 x(Lout)s 6286 x(objects.)s 1897 11020 moveto(Other)s 2499 x(symbols)s 3355 x(of)s X3612 x(a)s 3776 x(similar)s 4496 x(kind)s 4980 x(include)s X220 fnt13 X5742 11016 moveto(sup)s X X240 fnt34 X6154 11020 moveto(for)s 6490 x(superscripting,)s X220 fnt13 X7962 11016 moveto(over)s X240 fnt34 X8447 11020 moveto(for)s 8783 x(built-up)s X9598 x(fractions,)s 1417 10732 moveto(and)s X220 fnt13 X1831 10728 moveto(from)s X240 fnt34 X2338 10732 moveto(and)s X220 fnt13 X2752 10728 moveto(to)s X X240 fnt34 X3003 10732 moveto(for)s 3349 x(the)s 3709 x(lower)s 4321 x(and)s 4735 x(upper)s X5348 x(limits)s 5959 x(of)s 6226 x(sums,)s 6846 x(products,)s 7798 x(etc.)s X8264 x(These)s 8903 x(symbols)s 9769 x(may)s 10249 x(be)s 1417 10444 moveto(used)s X1916 x(together)s 2759 x(to)s 3005 x(produce)s 3836 x(complicated)s 5064 x(equations)s X6041 x(with)s 6526 x(astonishing)s 7676 x(ease:)s X220 fnt13 X1897 9944 moveto(big sum from i=0 to n r sup i)s 1897 9656 moveto(= {r sup n+1 - 1} over r-1)s X X167 fnt35 X5942 10030 moveto(n)s X311 fnt33 X5873 9753 moveto(\345)s X167 fnt35 X5866 9567 moveto(i)s X167 fnt33 X5920 9563 moveto(=)s 6019 x(0)s X X167 fnt35 X6195 9889 moveto(i)s X240 fnt35 X6102 9777 moveto(r)s X240 fnt33 X6313 9770 moveto(=)s X167 fnt35 X6609 9997 moveto(n)s X167 fnt33 X6698 9993 moveto(+)s X6795 x(1)s X240 fnt35 X6516 9885 moveto(r)s X240 fnt33 X6935 9878 moveto(-)s 7123 x(1)s gsave X6516 9830 translate X727 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X240 fnt35 X6650 9628 moveto(r)s X X240 fnt33 X6800 9621 moveto(-)s 6988 x(1)s X240 fnt34 X1417 9099 moveto(Here)s X220 fnt13 X1937 9095 moveto(sum)s X240 fnt34 X2408 9099 moveto(is)s X2623 x(just)s 3024 x(the)s X240 fnt33 X3372 9092 moveto(\345)s X240 fnt34 X3599 9099 moveto(symbol;)s X220 fnt13 X4426 9095 moveto(from)s X X240 fnt34 X4921 9099 moveto(and)s X220 fnt13 X5323 9095 moveto(to)s X240 fnt34 X5562 9099 moveto(do)s 5858 x(all)s 6152 x(the)s X6500 x(work)s 7048 x(of)s 7303 x(placing)s 8063 x(the)s 8411 x(limits.)s X9130 x(They)s 9678 x(are)s 10025 x(quite)s 1417 8811 moveto(independent,)s 2718 x(so)s X3002 x(either)s 3616 x(or)s 3886 x(both)s 4383 x(may)s 4866 x(be)s X5163 x(omitted.)s 6084 x(To)s 6421 x(get)s 6784 x(a)s 6961 x(superscript)s X8080 x(directly)s 8880 x(over)s 9376 x(a)s 9553 x(subscript,)s 1417 8523 moveto(use)s X1796 x(the)s X220 fnt13 X2148 8519 moveto(supp)s X240 fnt34 X2684 8523 moveto(and)s X220 fnt13 X3090 8519 moveto(on)s X240 fnt34 X3394 8523 moveto(symbols:)s X X220 fnt13 X1897 7947 moveto(A supp 2 on 1)s X240 fnt35 X5866 7951 moveto(A)s X167 fnt33 X6012 8070 moveto(2)s 6012 7867 moveto(1)s X240 fnt34 X1417 7417 moveto(These)s X2048 x(two)s 2467 x(symbols)s 3325 x(should)s 4024 x(always)s 4748 x(be)s X5034 x(used)s 5533 x(together)s 6376 x(as)s 6635 x(shown.)s 1897 7043 moveto(As)s X2230 x(usual)s 2802 x(in)s 3055 x(Lout,)s 3634 x(braces)s 4311 x(are)s X4669 x(used)s 5175 x(to)s 5428 x(group)s 6054 x(something)s 7118 x(into)s X7557 x(an)s 7850 x(indivisible)s 8926 x(object.)s 9697 x(Leaving)s 1417 6755 moveto(them)s X1955 x(out)s 2321 x(creates)s 3043 x(ambiguities:)s X220 fnt13 X1897 6256 moveto(a sup b over c)s X240 fnt34 X1417 5758 moveto(There)s X2034 x(are)s 2385 x(two)s 2804 x(possible)s 3648 x(interpretations)s 5087 x(for)s X5425 x(this:)s X220 fnt13 X1897 5085 moveto({a sup b} over c)s X167 fnt35 X5986 5305 moveto(b)s X240 fnt35 X5866 5193 moveto(a)s gsave X5866 5142 translate X203 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X240 fnt35 X5914 4988 moveto(c)s X X220 fnt13 X1897 4383 moveto(a sup {b over c})s X167 fnt35 X5986 4584 moveto(b)s gsave X5986 4549 translate X83 0 0 0 167 33 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X167 fnt35 X5990 4442 moveto(c)s X240 fnt35 X5866 4387 moveto(a)s X240 fnt34 X1417 3885 moveto(Eq)s X1746 x(chooses)s 2567 x(between)s 3427 x(them)s 3968 x(in)s 4217 x(the)s X4572 x(following)s 5565 x(way.)s 6147 x(Every)s 6781 x(symbol)s 7549 x(that)s X7970 x(takes)s 8524 x(a)s 8693 x(parameter)s 9710 x(also)s 10158 x(has)s X1417 3597 moveto(a)s X240 fnt35 X1574 x(precedence)s X240 fnt34 X2663 x(,)s 2774 x(which)s 3410 x(is)s X3620 x(a)s 3777 x(number.)s 4679 x(For)s 5062 x(example,)s X220 fnt13 X5983 3593 moveto(sup)s X X240 fnt34 X6388 3597 moveto(has)s 6758 x(precedence)s 7884 x(60)s 8175 x(and)s X220 fnt13 X8572 3593 moveto(over)s X X240 fnt34 X9050 3597 moveto(has)s 9420 x(precedence)s 1417 3309 moveto(54.)s 1823 x(The)s 2241 x(symbol)s X2992 x(with)s 3463 x(the)s 3801 x(highest)s 4538 x(precedence)s 5659 x(wins)s X6157 x(the)s 6495 x(object)s 7125 x(lying)s 7663 x(between)s 8506 x(them,)s X9090 x(so)s 9349 x(in)s 9581 x(the)s 9919 x(above)s 1417 3021 moveto(case)s X1875 x(the)s 2214 x(\207rst)s 2632 x(interpretation)s 3965 x(is)s 4171 x(chosen.)s X5003 x(If)s 5208 x(two)s 5614 x(symbols)s 6459 x(of)s 6705 x(equal)s X7270 x(precedence)s 8392 x(compete)s 9249 x(for)s 9574 x(an)s 9847 x(object,)s X1417 2733 moveto(the)s 1769 x(association)s 2891 x(is)s 3110 x(towards)s 3927 x(the)s X4279 x(left:)s X220 fnt13 X1897 2212 moveto(a sup b sub 2)s X167 fnt35 X5986 2328 moveto(b)s X240 fnt35 X5866 2216 moveto(a)s X167 fnt33 X6069 2132 moveto(2)s X X240 fnt34 X1417 1682 moveto(In)s 1676 x(this)s 2081 x(case)s 2552 x(it)s 2744 x(is)s X2963 x(more)s 3514 x(probable)s 4411 x(that)s 4829 x(the)s 5181 x(following)s X6171 x(right)s 6682 x(association)s 7804 x(was)s 8236 x(actually)s 9052 x(wanted:)s X Xpgsave restore Xshowpage X X%%Page: ? 4 X%%BeginPageSetup X/pgsave save def X0.0500 dup scale 10 setlinewidth X%%EndPageSetup X X240 fnt34 X5754 15261 moveto(-)s 5893 x(3)s 6073 x(-)s X220 fnt13 X1897 14603 moveto(a sup { b sub 2 })s X167 fnt35 X5986 14719 moveto(b)s X X116 fnt33 X6069 14661 moveto(2)s X240 fnt35 X5866 14607 moveto(a)s X240 fnt34 X1897 13840 moveto(White)s 2549 x(space)s 3148 x(between)s X4013 x(two)s 4440 x(objects)s 5185 x(is)s 5412 x(considered)s 6516 x(to)s X6770 x(be)s 7064 x(a)s 7238 x(symbol)s 8011 x(with)s 8504 x(precedence)s X9647 x(7,)s 9895 x(which)s 1417 13552 moveto(is)s 1636 x(lower)s 2240 x(than)s X2712 x(the)s 3064 x(precedence)s 4199 x(of)s 4458 x(any)s 4864 x(Eq)s X5190 x(symbol;)s 6021 x(but)s 6387 x(if)s 6592 x(the)s 6944 x(two)s X7363 x(objects)s 8100 x(are)s 8451 x(immediately)s 9705 x(adjacent)s 1417 13264 moveto(the)s X1774 x(precedence)s 2914 x(is)s 3138 x(102,)s 3623 x(which)s 4273 x(is)s X4497 x(higher)s 5173 x(than)s 5650 x(the)s 6007 x(precedence)s 7147 x(of)s X7411 x(any)s 7822 x(Eq)s 8153 x(symbol.)s 9043 x(Compare)s 9985 x(these)s X1417 12976 moveto(three)s 1954 x(examples:)s X220 fnt13 X1897 12305 moveto(big sum from i=0 to n)s X167 fnt35 X5942 12562 moveto(n)s X311 fnt33 X5873 12285 moveto(\345)s X X167 fnt35 X5866 12099 moveto(i)s X167 fnt33 X5920 12095 moveto(=)s 6019 x(0)s X220 fnt13 X1897 11473 moveto(big sum from {i = 0} to n)s X167 fnt35 X5942 11730 moveto(n)s X X311 fnt33 X5873 11453 moveto(\345)s X167 fnt35 X5866 11267 moveto(i)s X167 fnt33 X5920 11263 moveto(=)s 6019 x(0)s X220 fnt13 X1897 10693 moveto(big sum from i = 0 to n)s X X311 fnt33 X5866 10673 moveto(\345)s X167 fnt35 X5953 10487 moveto(i)s X240 fnt33 X6159 10690 moveto(=)s X167 fnt35 X6380 10898 moveto(n)s X240 fnt33 X6362 10690 moveto(0)s X X240 fnt34 X1417 10036 moveto(and)s 1824 x(you)s 2245 x(will)s 2677 x(see)s 3043 x(that)s X3462 x(some)s 4028 x(care)s 4486 x(is)s 4706 x(needed)s 5445 x(on)s X5746 x(this)s 6152 x(point.)s 6825 x(Braces)s 7536 x(can)s 7929 x(always)s X8654 x(be)s 8941 x(used)s 9441 x(to)s 9688 x(override)s 1417 9748 moveto(precedence)s X2554 x(and)s 2962 x(associativity,)s 4278 x(and)s 4686 x(when)s 5267 x(in)s X5515 x(doubt)s 6123 x(the)s 6477 x(easiest)s 7175 x(course)s 7861 x(is)s X8082 x(to)s 8330 x(insert)s 8922 x(them.)s 9582 x(Although)s 1417 9460 moveto(Lout)s X1980 x(allows)s 2715 x(symbols)s 3624 x(to)s 3921 x(as)s 4120 x(so)s X4333 x(ciate)s 4894 x(towards)s 5762 x(the)s 6165 x(left)s 6593 x(or)s X6903 x(right,)s 7525 x(Eq)s 7902 x(chooses)s 8771 x(to)s 9068 x(have)s X9631 x(only)s 10168 x(left)s 1417 9172 moveto(associative)s 2559 x(symbols.)s 3571 x(The)s X4037 x(summary)s 5021 x(at)s 5287 x(the)s 5673 x(end)s 6113 x(of)s X6406 x(this)s 6845 x(report)s 7509 x(gives)s 8108 x(the)s 8494 x(precedence)s X9663 x(of)s 9956 x(every)s 1417 8884 moveto(symbol.)s 1897 8510 moveto(The)s X240 fnt35 X2329 x(matrix)s X X240 fnt34 X3013 x(symbol)s 3778 x(builds)s 4423 x(an)s 4709 x(array)s 5259 x(of)s X5518 x(objects:)s X220 fnt13 X1897 8011 moveto(matrix)s 1897 7723 moveto( atleft { blpar })s 1897 7435 moveto( atright { brpar })s 1897 7147 moveto({ x sup 2 above x above 1)s X1897 6859 moveto( nextcol)s 1897 6571 moveto( y sup 2 above y above 1)s 1897 6283 moveto( nextcol)s 1897 5995 moveto( z sup 2 above z above 1)s 1897 5707 moveto(})s Xgsave X5866 7699 translate X-180.0000 rotate Xgsave X0 -471 translate X180.0000 rotate Xgsave X0 -517 translate X1.0000 1.1404 scale X X240 fnt33 X0 232 moveto(\346)s 0 -60 moveto(\347)s 0 -302 moveto(\350)s Xgrestore X X167 fnt33 X241 -170 moveto(2)s X240 fnt35 X135 -278 moveto(x)s X193 -554 moveto(x)s X240 fnt33 X186 -885 moveto(1)s X167 fnt33 X622 -170 moveto(2)s X240 fnt35 X516 -278 moveto(y)s 574 -554 moveto(y)s X X240 fnt33 X567 -885 moveto(1)s X167 fnt33 X990 -170 moveto(2)s X240 fnt35 X897 -278 moveto(z)s 952 -554 moveto(z)s X240 fnt33 X939 -885 moveto(1)s Xgsave X0 -517 translate X1.0000 1.1404 scale X X240 fnt33 X1116 232 moveto(\366)s 1116 -60 moveto(\367)s 1116 -302 moveto(\370)s Xgrestore X Xgrestore X Xgrestore Xgsave X0 7653 translate X1.0000 1.1404 scale X X240 fnt33 X5866 232 moveto(\346)s 5866 -60 moveto(\347)s X5866 -302 moveto(\350)s Xgrestore X X167 fnt33 X6107 8000 moveto(2)s X240 fnt35 X6001 7892 moveto(x)s 6059 7616 moveto(x)s X240 fnt33 X6052 7285 moveto(1)s X X167 fnt33 X6488 8000 moveto(2)s X240 fnt35 X6382 7892 moveto(y)s 6440 7616 moveto(y)s X240 fnt33 X6433 7285 moveto(1)s X167 fnt33 X6856 8000 moveto(2)s X X240 fnt35 X6763 7892 moveto(z)s 6818 7616 moveto(z)s X240 fnt33 X6805 7285 moveto(1)s gsave X0 7653 translate X1.0000 1.1404 scale X X240 fnt33 X6982 232 moveto(\366)s 6982 -60 moveto(\367)s X6982 -302 moveto(\370)s Xgrestore X X240 fnt34 X1417 5210 moveto(The)s X220 fnt13 X1876 5206 moveto(atleft)s X240 fnt34 X2438 5210 moveto(and)s X220 fnt13 X2871 5206 moveto(atright)s X X240 fnt34 X3567 5210 moveto(options)s 4359 x(place)s 4950 x(vertically)s 5938 x(scaled)s 6622 x(versions)s X7506 x(of)s 7792 x(their)s 8316 x(values)s 9014 x(at)s 9273 x(each)s X9798 x(side;)s 10336 x(if)s 1417 4922 moveto(either)s 2034 x(is)s 2267 x(omitted)s X3071 x(the)s 3437 x(value)s 4029 x(is)s 4262 x(taken)s 4854 x(to)s X5114 x(be)s 5414 x(an)s 5714 x(empty)s 6386 x(object)s 7044 x(of)s X7317 x(zero)s 7802 x(width)s 8421 x(by)s 8735 x(default.)s 9592 x(The)s X10038 x(right)s 1417 4634 moveto(parameter)s 2421 x(of)s X220 fnt13 X2670 4630 moveto(matrix)s X240 fnt34 X3317 4634 moveto(is)s X3526 x(the)s 3868 x(array)s 4408 x(itself.)s 5054 x(It)s 5249 x(is)s X5458 x(a)s 5614 x(sequence)s 6541 x(of)s 6790 x(columns)s 7651 x(separated)s X8603 x(by)s X220 fnt13 X8893 4630 moveto(nextcol)s X240 fnt34 X9638 4634 moveto(symbols;)s 1417 4346 moveto(each)s 1915 x(column)s X2693 x(is)s 2912 x(a)s 3078 x(sequence)s 4015 x(of)s 4274 x(objects)s X5011 x(separated)s 5973 x(by)s X220 fnt13 X6273 4342 moveto(above)s X240 fnt34 X6931 4346 moveto(symbols.)s 1897 3972 moveto(The)s X X220 fnt13 X2310 3968 moveto(nextcol)s X240 fnt34 X3046 3972 moveto(and)s X220 fnt13 X3433 3968 moveto(above)s X240 fnt34 X4072 3972 moveto(symbols)s 4911 x(have)s X5404 x(low)s 5804 x(precedence,)s 6980 x(but)s 7327 x(not)s 7674 x(as)s X7914 x(low)s 8314 x(as)s 8554 x(white)s 9126 x(space)s 9698 x(between)s X1417 3684 moveto(two)s 1826 x(objects.)s 2673 x(Therefore,)s 3724 x(unless)s 4372 x(the)s X4714 x(entries)s 5400 x(in)s 5636 x(the)s 5978 x(array)s 6518 x(are)s X6859 x(very)s 7334 x(simple,)s 8081 x(it)s 8263 x(is)s 8472 x(safest)s X9065 x(to)s 9301 x(enclose)s 10068 x(each)s 1417 3396 moveto(of)s 1676 x(them)s X2214 x(in)s 2460 x(braces.)s 1897 3022 moveto(Columns)s 2856 x(built)s 3388 x(with)s X3907 x(the)s X220 fnt13 X4293 3018 moveto(above)s X240 fnt34 X4985 3022 moveto(symbol)s 5784 x(have)s 6330 x(their)s X6861 x(objects)s 7632 x(centred)s 8429 x(in)s 8709 x(the)s 9095 x(column.)s X10027 x(Also)s 1417 2734 moveto(available)s 2343 x(are)s X220 fnt13 X2698 2730 moveto(labove)s X240 fnt34 X3408 2734 moveto(for)s X3750 x(left-justi\207ed)s 4980 x(columns,)s X220 fnt13 X5915 2730 moveto(cabove)s X240 fnt34 X6687 2734 moveto(meaning)s 7575 x(the)s X7931 x(same)s 8486 x(as)s X220 fnt13 X8749 2730 moveto(above)s X240 fnt34 X9347 2734 moveto(,)s X220 fnt13 X9471 2730 moveto(rabove)s X X240 fnt34 X10206 2734 moveto(for)s 1417 2446 moveto(right-justi\207ed)s 2785 x(columns,)s 3724 x(and)s X220 fnt13 X4138 2442 moveto(mabove)s X X240 fnt34 X4987 2446 moveto(for)s 5333 x(alignment)s 6357 x(along)s 6957 x(column)s 7743 x(marks.)s X8515 x(Each)s 9061 x(column)s 9847 x(should)s 1417 2158 moveto(contain)s 2182 x(only)s X2669 x(one)s 3076 x(kind)s 3563 x(of)s X220 fnt13 X3823 2154 moveto(above)s X240 fnt34 X4482 2158 moveto(symbol)s X5248 x(\(although)s 6226 x(adventurous)s 7457 x(users)s 8009 x(might)s 8628 x(be)s X8915 x(able)s 9374 x(to)s 9621 x(get)s 9974 x(some)s 1417 1870 moveto(mixtures)s X2313 x(to)s 2559 x(work\),)s 3250 x(but)s 3616 x(different)s 4497 x(columns)s X5368 x(may)s 5840 x(differ.)s 6549 x(For)s 6941 x(example,)s Xpgsave restore Xshowpage X X%%Page: ? 5 X%%BeginPageSetup X/pgsave save def X0.0500 dup scale 10 setlinewidth X%%EndPageSetup X X240 fnt34 X5754 15261 moveto(-)s 5893 x(4)s 6073 x(-)s X220 fnt13 X1897 14674 moveto(@R "Chain rule:" labove @R "Product rule:")s 1897 14386 moveto(nextcol)s X1897 14098 moveto({df over dx ^= df over dy cdot dy over dx})s 1897 13810 moveto(mabove)s 1897 13522 moveto({dfg over dy ^= f ` dg over dx + g df over dx})s X240 fnt34 X1417 13023 moveto(has)s 1796 x(result)s X1897 12418 moveto(Chain rule:)s 1897 11776 moveto(Product rule:)s X240 fnt35 X3430 12569 moveto(df)s gsave X3410 12471 translate X226 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X240 fnt35 X3410 12260 moveto(dx)s X240 fnt33 X3708 12411 moveto(=)s X X240 fnt35 X3931 12569 moveto(df)s gsave X3911 12471 translate X226 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X240 fnt35 X3911 12260 moveto(dy)s X240 fnt33 X4194 12411 moveto(\327)s X240 fnt35 X4311 12569 moveto(dy)s gsave X4311 12471 translate X226 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X240 fnt35 X4311 12260 moveto(dx)s X3330 11927 moveto(dfg)s gsave X3330 11829 translate X306 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X240 fnt35 X3370 11618 moveto(dy)s X240 fnt33 X3708 11769 moveto(=)s X240 fnt35 X3911 11776 moveto(f)s 4020 11927 moveto(dg)s Xgsave X4020 11829 translate X240 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X240 fnt35 X4027 11618 moveto(dx)s X240 fnt33 X4317 11769 moveto(+)s X240 fnt35 X4505 11776 moveto(g)s 4645 11927 moveto(df)s gsave X4625 11829 translate X226 0 0 0 240 288 0 LoutGraphic Xgsave X0 0 moveto xsize 0 lineto 0.05 ft setlinewidth stroke Xgrestore X Xgrestore X X240 fnt35 X4625 11618 moveto(dx)s X X240 fnt34 END_OF_FILE if test 59623 -ne `wc -c <'doc/tr.eq/outfile.ps.A'`; then echo shar: \"'doc/tr.eq/outfile.ps.A'\" unpacked with wrong size! elif test -f 'doc/tr.eq/outfile.ps.B' && test -f 'doc/tr.eq/outfile.ps.C'; then echo shar: Combining \"'doc/tr.eq/outfile.ps'\" \(148033 characters\) cat 'doc/tr.eq/outfile.ps.A' 'doc/tr.eq/outfile.ps.B' 'doc/tr.eq/outfile.ps.C' > 'doc/tr.eq/outfile.ps' if test 148033 -ne `wc -c <'doc/tr.eq/outfile.ps'`; then echo shar: \"'doc/tr.eq/outfile.ps'\" combined with wrong size! else rm doc/tr.eq/outfile.ps.A doc/tr.eq/outfile.ps.B doc/tr.eq/outfile.ps.C fi fi # end of 'doc/tr.eq/outfile.ps.A' fi if test ! -d 'doc/tr.fig' ; then echo shar: Creating directory \"'doc/tr.fig'\" mkdir 'doc/tr.fig' fi if test ! -d 'doc/tr.impl' ; then echo shar: Creating directory \"'doc/tr.impl'\" mkdir 'doc/tr.impl' fi if test ! -d 'doc/tr.lout' ; then echo shar: Creating directory \"'doc/tr.lout'\" mkdir 'doc/tr.lout' fi if test ! -d 'doc/tr.over' ; then echo shar: Creating directory \"'doc/tr.over'\" mkdir 'doc/tr.over' fi if test ! -d 'doc/tr.tab' ; then echo shar: Creating directory \"'doc/tr.tab'\" mkdir 'doc/tr.tab' fi if test ! -d 'evec' ; then echo shar: Creating directory \"'evec'\" mkdir 'evec' fi if test ! -d 'font' ; then echo shar: Creating directory \"'font'\" mkdir 'font' fi if test ! -d 'include' ; then echo shar: Creating directory \"'include'\" mkdir 'include' fi if test ! -d 'man' ; then echo shar: Creating directory \"'man'\" mkdir 'man' fi if test -f 'z34.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'z34.c'\" else echo shar: Extracting \"'z34.c'\" \(5690 characters\) sed "s/^X//" >'z34.c' <<'END_OF_FILE' X/*@z34.c:Rotation Service:Declarations@***************************************/ X/* */ X/* LOUT: A HIGH-LEVEL LANGUAGE FOR DOCUMENT FORMATTING (VERSION 2.05) */ X/* COPYRIGHT (C) 1993 Jeffrey H. Kingston */ X/* */ X/* Jeffrey H. Kingston (jeff@cs.su.oz.au) */ X/* Basser Department of Computer Science */ X/* The University of Sydney 2006 */ X/* AUSTRALIA */ X/* */ X/* This program is free software; you can redistribute it and/or modify */ X/* it under the terms of the GNU General Public License as published by */ X/* the Free Software Foundation; either version 1, or (at your option) */ X/* any later version. */ X/* */ X/* This program is distributed in the hope that it will be useful, */ X/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ X/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ X/* GNU General Public License for more details. */ X/* */ X/* You should have received a copy of the GNU General Public License */ X/* along with this program; if not, write to the Free Software */ X/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ X/* */ X/* FILE: z34.c */ X/* MODULE: Rotation Service */ X/* EXTERNS: RotateSize() */ X/* */ X/*****************************************************************************/ X#include <math.h> X#ifndef M_PI X#define M_PI 3.1415926535897931160E0 X#endif X#include "externs" X Xtypedef struct { double x, y; } rect_coord; Xtypedef struct { double angle, radius; } polar_coord; X X#define rect_to_polar(rect, polar) \ Xpolar.angle = atan2(rect.y, rect.x), \ Xpolar.radius = sqrt(rect.x*rect.x + rect.y*rect.y) X X#define polar_to_rect(polar, rect) \ Xrect.x = polar.radius * cos(polar.angle), \ Xrect.y = polar.radius * sin(polar.angle) X X X/*@::RotateSize()@************************************************************/ X/* */ X/* RotateSize(xcb, xcf, xrb, xrf, y, theta) */ X/* */ X/* Calculate the size of x, assuming that it is y rotated by theta degrees. */ X/* */ X/*****************************************************************************/ X XRotateSize(xcb, xcf, xrb, xrf, y, theta) XLENGTH *xcb, *xcf, *xrb, *xrf; OBJECT y; LENGTH theta; X{ rect_coord ycorners[4], xcorner; polar_coord pol; X double maxx, maxy, minx, miny, ang; int i; X char buff1[20], buff2[20]; X X /* calculate theta in radians */ X ang = (double) theta * 2 * M_PI / (double) (DG * 360); X ifdebug(DRS, D, sprintf(buff2, "%.1f", ang)); X debug2(DRS, D, "RotateSize( %s, %s )", EchoObject(y), buff2); X debug4(DRS, DD, " ycb %s, ycf %s, yrb %s, yrf %s", X EchoLength(back(y, COL)), EchoLength(fwd(y, COL)), X EchoLength(back(y, ROW)), EchoLength(fwd(y, ROW))); X X /* set up coordinates of the four corners of y */ X ycorners[0].x = (float) fwd(y, COL); X ycorners[0].y = (float) back(y, ROW); X ycorners[1].x = - (float) back(y, COL); X ycorners[1].y = (float) back(y, ROW); X ycorners[2].x = - (float) back(y, COL); X ycorners[2].y = - (float) fwd(y, ROW); X ycorners[3].x = (float) fwd(y, COL); X ycorners[3].y = - (float) fwd(y, ROW); X X /* rotate these four corners by theta and store their extremes */ X maxx = maxy = (float) - MAX_LEN; X minx = miny = (float) MAX_LEN; X for( i = 0; i < 4; i++ ) X { X if( ycorners[i].x == 0 && ycorners[i].y == 0 ) X { pol.radius = 0; pol.angle = 0; } X else rect_to_polar(ycorners[i], pol); X ifdebug(DRS, DD, sprintf(buff1, "%.1f", pol.angle)); X ifdebug(DRS, DD, sprintf(buff2, "%.1f", ang)); X debug5(DRS, DD, " transforming (%s, %s) -> (%s, %s) + %s", X EchoLength( (int) ycorners[i].x), EchoLength( (int) ycorners[i].y), X EchoLength( (int) pol.radius), buff1, buff2); X pol.angle += ang; X polar_to_rect(pol, xcorner); X ifdebug(DRS, DD, sprintf(buff1, "%.1f", pol.angle)); X debug4(DRS, DD, " transforming (%s, %s) -> (%s, %s)", X EchoLength( (int) pol.radius), buff1, X EchoLength( (int) xcorner.x), EchoLength( (int) xcorner.y) ); X maxx = max(maxx, xcorner.x); minx = min(minx, xcorner.x); X maxy = max(maxy, xcorner.y); miny = min(miny, xcorner.y); X } X X /* store sizes back into x and return */ X *xcb = - (int) minx; *xcf = (int) maxx; X *xrb = (int) maxy; *xrf = - (int) miny; X debug0(DRS, D, "RotateSize returning."); X debug4(DRS, DD, " xcb %s, xcf %s, xrb %s, xrf %s", X EchoLength(*xcb), EchoLength(*xcf), X EchoLength(*xrb), EchoLength(*xrf)); X} /* end RotateSize */ END_OF_FILE if test 5690 -ne `wc -c <'z34.c'`; then echo shar: \"'z34.c'\" unpacked with wrong size! fi # end of 'z34.c' fi echo shar: End of archive 1 \(of 35\). cp /dev/null ark1isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 35 archives. rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still must unpack the following archives: echo " " ${MISSING} fi exit 0 exit 0 # Just in case...