Hello everybody!
I am seeking for a Fortran-PostScript-filter, which handles the 1st character
in a line as control character. The simple filter I am using
:rf=( /bin/echo "%!" ; /bin/echo "/WID 80 def /IND 0 def /LEN 66 def" ;
/bin/cat /srv/print/yp/Ouverture /srv/print/yp/FtnOuverture ; /bin/cat)
does not seem to do it well:
%--------------------------------------------------
% Ouverture
/lead1 12 def
LEN 0 ne {
/lead1 792 LEN div def}
if
/lead2 12 def
IND WID add 0 ne {
/lead2 540 IND WID add div 5 div 8 mul def}
if
lead1 lead2 le {
/leading lead1 def}
{/leading lead2 def}
ifelse
/pointsize leading 1 sub def
/top 816 def
/bottom top LEN 1 sub leading mul sub 0.01 sub def
/reencsmalldict 12 dict def
/ReEncodeSmall
{ reencsmalldict begin
/newcodesandnames exch def
/newfontname exch def
/basefontname exch def
/basefontdict basefontname findfont def
/newfont basefontdict maxlength dict def
basefontdict
{ exch dup /FID ne
{ dup /Encoding eq
{ exch dup length array copy
newfont 3 1 roll put }
{ exch newfont 3 1 roll put }
ifelse
}
{ pop pop }
ifelse
} forall
newfont /FontName newfontname put
newcodesandnames aload pop
newcodesandnames length 2 idiv
{ newfont /Encoding get 3 1 roll put }
repeat
newfontname newfont definefont pop
end
} def
/scandvec [
8#344 /adieresis
8#366 /odieresis
8#374 /udieresis
8#337 /germandbls
8#304 /Adieresis
8#326 /Odieresis
8#334 /Udieresis
] def
/fontname /Courier def
fontname fontname scandvec ReEncodeSmall
fontname findfont pointsize scalefont setfont
/colwidth (m) stringwidth pop def
/left 54 IND colwidth mul add def
/line 512 string def % for input line buffering
/lineno 0 def
/printheader
{newpath left top moveto } def
%---------------------------------------------
% FtnOuverture
/Showpage {
lineno 1 ne
{showpage}if
} def
/crlf
{ left currentpoint exch pop % replace X with leftmargin
3 -1 roll
dup 0 eq
{ pop }
{ { leading sub
dup bottom le
{ pop pop showpage printheader currentpoint }
if }
repeat }
ifelse
moveto }
def
/kshowProc
{pop
9 eq
{posL 8 idiv 1 add 8 mul /posL exch def
posL colwidth mul left add CurrY moveto}
{/posL posL 1 add def}
ifelse
}def
/tues{
dup length 0 eq { pop ( ) } if
dup 0 1 getinterval % 1st char
{1 crlf} exch
dup (0) eq
{exch pop {2 crlf} exch} if
dup (+) eq
{exch pop {0 crlf} exch} if
dup (1) eq
{exch pop {Showpage printheader} exch} if
pop exec
dup length 1 sub 1 exch getinterval
/posL 0 def
/CurrY currentpoint exch pop def
/kshowProc load exch kshow
% 1 crlf
} def
/execfile {
{currentfile line readline % and read the next line
{/lineno lineno 1 add def tues }
{exit}
ifelse
}loop
Showpage
} def
printheader
execfile
Thanks
v
Stanislav Sarman
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------