home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff368.lzh / Lila / Lila.prologue < prev    next >
Text File  |  1990-08-15  |  3KB  |  167 lines

  1. %!PS
  2. % Lila Prologue
  3. % version 8912a
  4. % rev 19.5.90
  5.  
  6. save
  7. /LilaDict 30 dict def
  8. LilaDict begin
  9.  
  10. /mm { 2.83464567 mul } def
  11. /inch { 72 mul } def
  12.  
  13. /xpage 210 mm def
  14. /ypage 297 mm def
  15. /x0 10 mm def
  16. /y0 10 mm def
  17. /x1 200 mm def
  18. /y1 287 mm def
  19.  
  20. /buffer 96 string def
  21. /#copies 1 def
  22.  
  23. /LilaFont
  24.     /Courier findfont
  25.     dup length dict dup begin exch
  26.     {
  27.         1 index /FID ne { def } { pop pop } ifelse
  28.     } forall
  29.     /Encoding 256 array def
  30.     Encoding 0 StandardEncoding 0 152 getinterval putinterval
  31.     Encoding 152
  32.     [/grave/acute/circumflex/tilde
  33.     /dieresis/ring/dotlessi/.notdef
  34.     /space/exclamdown/cent/sterling
  35.     /currency/yen/brokenbar/section
  36.     /dieresis/copyright/ordfeminine/guillemotleft
  37.     /logicalnot/emdash/registered/macron
  38.     /degree/plusminus/twosuperior/threesuperior
  39.     /quoteright/mu/paragraph/bullet
  40.     /cedilla/onesuperior/ordmasculine/guillemotright
  41.     /onequarter/onehalf/threequarters/questiondown
  42.     /Agrave/Aacute/Acircumflex/Atilde
  43.     /Adieresis/Aring/AE/Ccedilla
  44.     /Egrave/Eacute/Ecircumflex/Edieresis
  45.     /Igrave/Iacute/Icircumflex/Idieresis
  46.     /Eth/Ntilde/Ograve/Oacute
  47.     /Ocircumflex/Otilde/Odieresis/multiply
  48.     /Oslash/Ugrave/Uacute/Ucircumflex
  49.     /Udieresis/Yacute/Thorn/germandbls
  50.     /agrave/aacute/acircumflex/atilde
  51.     /adieresis/aring/ae/ccedilla
  52.     /egrave/eacute/ecircumflex/edieresis
  53.     /igrave/iacute/icircumflex/idieresis
  54.     /eth/ntilde/ograve/oacute
  55.     /ocircumflex/otilde/odieresis/divide
  56.     /oslash/ugrave/uacute/ucircumflex
  57.     /udieresis/yacute/thorn/ydieresis]
  58.     putinterval
  59.     end
  60. definefont pop
  61.  
  62. /scalepage 
  63. {
  64.     portrait 
  65.     {
  66.         0 ypage translate 1 -1 scale
  67.         x0 y0 translate
  68.         x1 x0 sub
  69.     } 
  70.     {
  71.         90 rotate 1 -1 scale
  72.         ypage y1 sub x0 translate
  73.         y1 y0 sub 
  74.     } ifelse
  75.     ncol 1 sub 12 mul
  76.     ncol 590 mul add
  77.     div dup dup scale
  78.     portrait
  79.     {
  80.         y1 y0 sub exch div 39 sub 12 div
  81.     }
  82.     {
  83.         x1 x0 sub exch div 39 sub 12 div
  84.     } ifelse
  85.     cvi /nline exch def
  86. } def
  87.  
  88. /drawheader
  89. {
  90.     newpath    0 0 moveto
  91.     590 0 rlineto
  92.     0 exch 12 mul 39 add rlineto
  93.     -590 0 rlineto
  94.     closepath
  95.     0 25 moveto 590 0 rlineto stroke
  96.  
  97.     7 16 moveto title show
  98.  
  99.     /npage npage 1 add def
  100.     npage (    ) cvs
  101.     583 16 moveto
  102.     dup stringwidth pop
  103.     (Page ) stringwidth pop
  104.     add neg 0 rmoveto 
  105.     gsave (Page ) show show grestore
  106.     gsave -7 -16 rmoveto 0 25 rlineto stroke grestore
  107.  
  108.     date stringwidth pop
  109.     14 add neg 0 rmoveto
  110.     gsave date show grestore
  111.     -7 -16 rmoveto 0 25 rlineto stroke
  112.  
  113.     /nprint nprint 1 add def
  114. } def
  115.  
  116. /drawpage 
  117. {
  118.     6 41 moveto
  119.     0 exch
  120.     {
  121.         currentfile buffer readline
  122.         exch dup (-$-$-$-$-$-) ne 3 -1 roll and
  123.         {
  124.             dup length 0 gt 
  125.             {
  126.                 gsave show grestore
  127.             }
  128.             {
  129.                 pop 
  130.             } ifelse
  131.             0 12 rmoveto
  132.             1 add 
  133.         } 
  134.         {
  135.             pop /eof true def exit
  136.         } ifelse
  137.     } repeat
  138. } def
  139.  
  140. /lila        % title date ncol portrait lila
  141. {
  142.     /portrait exch def /ncol exch def
  143.     /date exch def /title exch def
  144.     /npage 0 def /eof false def
  145.     scalepage
  146.     /LilaFont findfont [ 10 0 0 -10 0 0 ] makefont setfont
  147.     0.7 setlinewidth
  148.     {
  149.         /nprint 0 def
  150.         gsave
  151.         ncol
  152.         {
  153.             nline drawpage
  154.             0 gt { nline drawheader } if
  155.             eof { exit } if
  156.             602 0 translate
  157.         } repeat
  158.         nprint 0 gt { showpage } if
  159.         grestore
  160.         eof { exit } if
  161.     } loop
  162.     end
  163.     restore
  164. } def
  165.  
  166. %%EndProlog
  167.