2.11BSD/src/local/mp/mp.pro.ts.ps

%!PS-Adobe-1.0
%%Creator: Johan Vromans
%%Title: @(#)mp.pro.ts.ps 1.6 92/02/17
%%CreationDate: see above
%%PageLength 80
%%LineLength 80
%%NumCols 2
%%DocumentFonts: Times-Bold Times-Roman Courier
%%Pages: (atend)
%%EndComments

%% MP profile for European Time/system format, yet another personal
%% organizer.
%%
%% Time/system (c) Time/system International a/s

%Title: backspacefont.ps suggested by Glenn Reid (Adobe Systems).

/FontSize 11 def

/font1d /Times-Bold           reencodeISO
/font2d /Times-Roman          reencodeISO
/CourierISO /Courier          reencodeISO
/fontHd /Helvetica-BoldOblique        reencodeISO
/fontH2 /Helvetica-BoldOblique        reencodeISO
/fontNd /Times-Bold           reencodeISO
/font3d backspacefont

/BoldFont      { /font1d findfont FontSize scalefont setfont } def
/pf            { /font2d findfont FontSize scalefont setfont } def
/sf            { /font3d findfont 12 scalefont setfont } def
/fontH         { /fontHd findfont 15 scalefont setfont } def
/fontD         { /fontH2 findfont 10 scalefont setfont } def
/fontN         { /fontNd findfont 12 scalefont setfont } def

sf
%% stick in all the fudge factors here. May need changing for page sizes,
%% laserwriter setups etc?
%%
/binderspace 150 def
/tmsyswidth 750 def
/tmsysheight 1150 def
/margin 60 def
/yco tmsysheight 50 sub def			% space at the top
/xright tmsyswidth binderspace add margin sub def	% space at right
/xleft binderspace def

/newpage		% page_number newpage --
{
  pop                   % pageno
  0.5 0.5 scale
  90 rotate
  -50 tmsysheight neg translate
  /PageSave save def
  gsave			% save state for easy restore
  margin 0 translate
  /ypos tmsysheight 110 sub def
  xleft ypos moveto
} def

/endpage		% page_number endpage --
{
  pop 			% get rid of page_number
  PageSave restore      % restore *always* before showpage
  showpage
  grestore
} def

/endcol			% page_number column_number endcol --
{
  /thiscol exch def	% column_number
  gsave
    fontH
    % draw the top for owner
    newpath
      xleft 10 sub yco moveto
      xleft yco 20 sub 10 180 270 arc
      xright yco 20 sub 10 270 0 arc
      xright yco 10 0 90 arc
      xleft yco 10 90 180 arc
    closepath
    0.90 setgray fill
    0 setgray stroke
    xleft yco 16 sub moveto
    MailFor show
    User show
%   fontD
    TimeNow stringwidth pop neg xright add yco 16 sub moveto TimeNow show
    fontN
    % dup stringwidth pop 2 div neg 318 add 858 moveto show
    fontH
    % lower box for subject etc
    newpath
      xleft 10 sub 60 moveto
      xleft 40 10 180 270 arc
      xright 40 10 270 0 arc
      xright 60 10 0 90 arc
      xleft 60 10 90 180 arc
    closepath
    0.90 setgray fill
    % stick the page number just a few points in from the right hand edge
    newpath
      xright 10 sub 50 15 0 360 arc
      gsave
        1 setgray fill
      grestore
    closepath
    0 setgray stroke
    xleft 44 moveto Subject show
    fontN
    % position and print the page number
    dup stringwidth pop 2 div neg xright 10 sub add 46 moveto show
    fontH
  grestore
  thiscol 1 eq { tmsyspage } if	% draw neccessary page breaks
  grestore gsave		% back to default
  tmsyswidth thiscol mul margin add 0 translate
  /ypos tmsysheight 110 sub def
  xleft ypos moveto
} def

/tmsyspage
{ gsave
  drawholes
  [1 4] 0 setdash	% use dashed lines for marker
  newpath
  binderspace margin 2 div sub tmsyswidth add 0 moveto
  0 tmsysheight rlineto
  stroke
  grestore
} def

/showline
{
  show
  /ypos ypos 12 sub def
  xleft ypos moveto
} def


/xo 44 def

/drawhole		% draw one little hole
{ newpath
  xo yo 12 0 360 arc
  closepath
  0.24 setlinewidth
  stroke
} def

/drawholes		% show where the holes should be punched
{
  /ydisp 105.5 def
  /yo 154 def
  drawhole
  /yo yo ydisp add def
  drawhole
  /yo yo ydisp add def
  drawhole
  /yo 768 def
  drawhole
  /yo yo ydisp add def
  drawhole
  /yo yo ydisp add def
  drawhole
} def