diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/lametex/page/page_title.ps |
Initial commit
Diffstat (limited to 'support/lametex/page/page_title.ps')
-rw-r--r-- | support/lametex/page/page_title.ps | 221 |
1 files changed, 221 insertions, 0 deletions
diff --git a/support/lametex/page/page_title.ps b/support/lametex/page/page_title.ps new file mode 100644 index 0000000000..7fe2593b61 --- /dev/null +++ b/support/lametex/page/page_title.ps @@ -0,0 +1,221 @@ +%! page_title.ps - A fancy titlepage for a document +%% 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 for LameTeX output to look like LaTeX output + +%% REQUIRED DEFINITIONS START HERE %% + +% Makes a path that desribes the page and leaves a setflat value on the stack. +/PageShape +{ + 0 0 moveto 8.5 in 0 lineto 8.5 in 11 in lineto 0 11 in lineto closepath + currentflat 8 mul +} bind def + +/StartPage +{ + %%%%%%%%%%%%%%%% string Weird-Stuff %%%%%%%%%%%%%%%%%%%%%%%%%% + % Weird-Stuff puts some fancy border stuff in around a given string + /Weird-Stuff + { + save + %%%%%%%%%%%%%%%% num num block %%%%%%%%%%% + % width and X position + /Block + { + 0 moveto dup 0 rlineto + .35 in .7 in rlineto -1 mul 0 rlineto + closepath 1 setgray fill 0 setgray + } bind def + %%%%%% end of Block %%%%%%%%%%%%%%%% + + 0.6 setgray + exch /name exch def + 90 rotate 0 -1.1 in translate + /bit {.02 in} def + gsave + + 2 in 0 translate + .7 in dup scale + 1 3 in div setlinewidth + + /Thick 1 8 div def + /Tall 1 def + /HalfThick Thick .5 mul def + + newpath + HalfThick Thick moveto + Thick 0 lineto + 1 Thick sub 0 lineto + 1 HalfThick sub Thick lineto + .5 HalfThick add Tall Thick sub lineto + + 1 Thick sub 0 moveto + .5 HalfThick add Tall 3 Thick mul sub lineto + Thick 3 mul Thick 2 mul lineto + + 1 Thick 2.5 mul sub Thick moveto + .5 Tall Thick 4 mul sub lineto + stroke + + newpath + HalfThick Thick moveto + 1 Thick 2.5 mul sub Thick lineto + HalfThick neg Thick rlineto + Thick Thick add Thick Thick add lineto + .5 HalfThick add Tall Thick sub lineto + Thick neg 0 rlineto + closepath + fill + grestore + /Times-BoldItalic findfont 90 scalefont setfont + gsave 2.65 in 0 moveto 1 .5 scale + -.07 in 0 name ashow grestore + gsave 2.65 in .625 in moveto 1 -.22 scale + -.07 in 0 name ashow grestore + newpath .3 in 0 moveto 1.9 in 0 lineto + 2.25 in .64 in lineto .3 in .64 in lineto + .5 in .32 in lineto closepath fill + 6.4 in 0 moveto 8.9 in 0 lineto 8.8 in -.2 in lineto + 9.5 in .32 in lineto 8.8 in .84 in lineto + 8.9 in .64 in lineto 6.75 in .64 in lineto closepath fill + .05 in .7 in Block + .08 in 1.1 in Block + .11 in 1.5 in Block + .1 in 6.8 in Block + .15 in 7.3 in Block + .2 in 7.7 in Block + .2 in 8 in Block + .1 in 8.25 in Block + restore + } bind def + + %%%%%%%%%%%%% num num circle - %%%%%%%%%%%%%%%%%%%%%%%% + % circle fills & strokes a small white circle around current point + /circle { currentpoint .1 in 0 rmoveto .1 in 0 360 arc + 1 setgray fill } def + + /StringBuffer 10 string def + + %%%%%%%%%%%%%%%% string Shade - %%%%%%%%%%%%%%%%%%%%%%%% + % Shade prints a shaded character at the current position + % .8 top .1 bot gray + /Shade + { + currentpoint /aty exch def /atx exch def + gsave + dup true charpath clip (Mg) true charpath pathbbox + exch 4 -1 roll sub /wid exch def exch sub /hit exch def + /pl aty hit .3 mul sub def /ph aty hit add .1 in sub def + pl .1 in ph + { + dup pl sub ph pl sub div .7 mul .1 add setgray + atx exch moveto wid 0 rlineto 0 hit rlineto + wid -1 mul 0 rlineto closepath fill + } for + grestore + dup 0 setgray true charpath stroke + atx aty moveto stringwidth pop 0 rmoveto + } bind def + + %%%%%%%%%%%%%%%% string Title - %%%%%%%%%%%%%%%%%%%%%%%% + % Title prints a string in the title position of the page, + % and shoots it full of holes! + /Title + { + save + exch /str exch def /border .2 in def /hit 40 def + /NewCenturySchlbk-Bold findfont hit 1.5 mul scalefont setfont + str stringwidth pop /lg exch def + newpath 8.5 in lg sub 2 div 9.7 in moveto + gsave + currentpoint border sub exch border sub exch moveto + lg border 2 mul add 0 rlineto 0 hit border 2 mul add rlineto + lg -1 mul border 2 mul sub 0 rlineto closepath + gsave .8 setgray fill grestore 2 setlinewidth 0 setgray stroke + .5 setlinewidth + grestore + str length 1 sub 0 1 3 -1 roll + { rand pop + str exch 1 getinterval Shade + } for + 1 1 30 + { + pop rand BIG div 2 div + lg border 4 mul add mul 8.5 in lg sub 2 div add border sub + rand BIG div 2 div + hit border 4 mul add mul 10.1 in add border sub moveto + circle + } for + 1 setlinewidth 0 setgray + restore + } bind def + + /Web + { + newpath + 0 0 moveto + 1 1 8 { pop 0.5 in 0 -3 in -3 in -2 in 0.5 in rcurveto 45 rotate } for + } bind def + + %%%%%% xlow ylow width height grain ShadeBox - %%%%%%%%%%%%%%%%%% + % shades in a box with increasingly darker horizontal rectangles. + /ShadeBox + { + newpath + 6 dict begin + /grain exch def + /height exch def + /width exch def + /ylow exch def + /xlow exch def + newpath + ylow grain ylow height add grain sub + { + dup ylow sub height div .9 mul .1 add setgray % How dark to stop? + xlow exch moveto width 0 rlineto + 0 grain rlineto width neg 0 rlineto + closepath fill + } for + end + } bind def + + 1.5 in 1 in 6.5 in 5 in .05 in ShadeBox + + 8 in 4 in translate + 0 setgray Web fill + .2 in .2 in translate + .5 setgray 10 setlinewidth Web fill + .8 setgray 3 setlinewidth Web stroke + grestoreall % Don't want all this to have an effect on text printing +} bind def + +/EndPage +{ + /pagenumber pagenumber 1 add def % Don't print a page number on titlepage + showpage % A new page here really does mean start a new page. +} bind def + +%% INITIALIZATION TO DO WHEN FILE IS LOADED %% + +/InitPage +{ + /evenodd true def % if true use even-odd rule; false means winding rule + /fillout false def % true means fill outside shape. false is inside. + + % Page Defaults + /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 + + /BIG 1073741824 def +} bind def + +InitPage % Just loading this file initializes the page. |