home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / tex / lametex_.z / lametex_ / lametex / page / page_kludge.ps < prev    next >
Encoding:
Text File  |  1992-09-02  |  2.8 KB  |  86 lines

  1. %! page_kludge.ps    - A replica of the standard LaTeX page
  2. %% This is a LameTeX Page Description File written in PostScript.
  3. %% Postscript Code by Jon Monsarrat Copyright 1992
  4. %% permission given for anything except selling this or deleting the header.
  5. %% This is a page template for the LameTeX formatter
  6. %% A normal page for LameTeX output to look like LaTeX output
  7.  
  8. % Makes a path that desribes the page
  9. /PageShape
  10. {
  11.   8.5 in 8.5 in moveto 6 in 6.2 in 2.4 in 90 270 arc 8.5 in 4 in lineto
  12.   currentflat 8 mul
  13. } bind def
  14.  
  15. %%%%%%%%%%%  icon-name  LeftMarginIcon   - %%%%%%%%%%%%
  16. % Given the name of an icon, executes the icon in the left margin.
  17. /LeftMarginIcon
  18. {
  19.   gsave
  20.     20 ypos 72 sub translate cvx exec
  21.   grestore
  22. } bind def
  23.  
  24. %% REQUIRED DEFINITIONS START HERE %%
  25.  
  26. % Anything to do when a new page is started
  27. /StartPage
  28. {
  29.   /Roach pagenumber startpage
  30.   sub dup mul 3 mul SprinkleIcon
  31.   5 dict begin
  32.   /bp 1 in def /lp 3.5 in def /hp 10.3 in def /wp 5 in def
  33.   lp wp 2 div add bp hp 2 div add moveto
  34.   45 rotate
  35.   /Helvetica-Bold findfont 45 scalefont setfont
  36.   [ (NO KLUDGES) (NO BUGS) (MOSTLY NONE) (OK, A FEW) (NO BUGS!)
  37.     (NO BIG BUGS) (READ) (MY LIPS) (NO NEW BUGS) (HELP!) 
  38.     (HELP!) (HELP!) (HELP!) (HELP!) ]
  39.   pagenumber startpage sub get
  40.   dup stringwidth pop 2 div -1 mul -16 rmoveto
  41.   show -45 rotate newpath
  42.   lp wp 2 div add bp hp 2 div add 2 copy moveto wp .45 mul 0 rmoveto
  43.   wp .45 mul 360 0 arcn closepath
  44.   lp wp 2 div add bp hp 2 div add 2 copy moveto
  45.   wp .37 mul dup 53 cos mul exch 53 sin mul rmoveto
  46.   wp .37 mul 53 217 arc closepath
  47.   lp wp 2 div add bp hp 2 div add 2 copy moveto
  48.   wp .37 mul dup 233 cos mul exch 233 sin mul rmoveto
  49.   wp .37 mul 233 37 arc closepath
  50.   closepath stroke
  51.   end
  52. } bind def
  53.  
  54. % Anything to do when a new page is ended
  55. /EndPage
  56. {
  57.    pagenumber 4 string cvs
  58.    dup stringwidth pop 8.5 in
  59.    formatdict /rightmargin get sub
  60.    formatdict /leftmargin get sub 
  61.    exch sub 2 div formatdict /leftmargin get add
  62.    formatdict /bottommargin get 2 div moveto show
  63.    /pagenumber pagenumber 1 add def
  64.    showpage  % A new page here really does mean start a new page.
  65. } bind def
  66.  
  67. %% INITIALIZATION TO DO WHEN FILE IS LOADED %%
  68. % Page-specific defaults that describe the page.
  69. /InitPage
  70. {
  71.   /evenodd true def   % if true use even-odd rule; false means winding rule
  72.   /fillout true def  % true means fill outside shape. false is inside.
  73.  
  74.   /in { 72 mul } def
  75.   /BM 0 in def    % Absolute Bottom Margin for page
  76.   /TM 11 in def   % Absolute Top Margin for page
  77.   /LM 1 in def    % Absolute Left Margin for page
  78.   /RM 7.5 in def  % Absolute Right Margin for page
  79.   
  80.   userdict /pagenumber known not
  81.   { /pagenumber 1 def } if    % Initialize pagenumber if not done already
  82.   /startpage pagenumber def
  83. } bind def
  84.  
  85. InitPage        % Just loading this file initializes the page.
  86.