%! page_dagger.ps - A dagger on a standard rectangular page.
%% This is a LameTeX Page Description File written in PostScript.
%% Postscript Code by Jon Monsarrat Copyright 1992
%% permission given for anything except selling this or deleting the header.
%% This is a page template for the LameTeX formatter
%% A normal page with a dagger in the middle for LameTeX output to look like
%% LaTeX output
%% Use this in conjunction with dagger.ps!
%%%%%%%%%%% icon-name LeftMarginIcon - %%%%%%%%%%%%
% Given the name of an icon, executes the icon in the left margin.
/LeftMarginIcon
{
gsave
20 ypos 72 sub translate cvx exec
grestore
} bind def
/DaggerBox
{
xlm xrm xlm sub .9 mul add ybm moveto
xlm xrm xlm sub 4 div add ybm ytm ybm sub .4 mul add lineto
xlm xrm xlm sub 6 div add ybm ytm ybm sub .45 mul add lineto
xlm ytm lineto xlm xrm xlm sub .2 mul add ytm lineto
xlm xrm xlm sub .5 mul add ybm ytm ybm sub .85 mul add lineto
xlm xrm xlm sub .8 mul add ybm ytm ybm sub .8 mul add lineto
xlm xrm xlm sub .7 mul add ybm ytm ybm sub .6 mul add lineto
xrm ybm lineto
closepath
} bind def
%% REQUIRED DEFINITIONS START HERE %%
% Makes a path that desribes the page
/PageShape
{
/xlm xlm .6 mul 3 in add def /xrm xrm .6 mul 3 in add def
/ybm ybm .6 mul 2 in add def /ytm ytm .6 mul 2 in add def
DaggerBox % gsave stroke grestore % Uncomment me to show the margin path
% gsave stroke grestore
currentflat 8 mul
} bind def
% Anything to do when a new page is started
/StartPage
{
% I enclose this huge definition here for a very good reason!
% This is because this routine is called in-between PostScript
% save and restore commands and therefore all this memory I'm
% wasting here will be cleaned up.
% Anything to do when a new page is ended
/EndPage
{
pagenumber 4 string cvs
dup stringwidth pop 8.5 in
formatdict /rightmargin get sub
formatdict /leftmargin get sub
exch sub 2 div formatdict /leftmargin get add
formatdict /bottommargin get 2 div moveto show
/pagenumber pagenumber 1 add def
showpage % A new page here really does mean start a new page.
} bind def
%% INITIALIZATION TO DO WHEN FILE IS LOADED %%
% Page-specific defaults that describe the page.
/InitPage
{
/evenodd true def % if true use even-odd rule; false means winding rule
/fillout true def % true means fill outside shape. false is inside.
/in { 72 mul } def
/BM 0 in def % Absolute Bottom Margin for page
/TM 11 in def % Absolute Top Margin for page
/LM 0 in def % Absolute Left Margin for page
/RM 8.5 in def % Absolute Right Margin for page
userdict /pagenumber known not
{ /pagenumber 1 def } if % Initialize pagenumber if not done already
} bind def
InitPage % Just loading this file initializes the page.