%  PS.STY. Einbindung von literalem PostScript

%  \ps{H�he des Bildes}{PS-Programm}
\long\def\ps#1#2{
\vbox to #1{\vss \special{\string"
 72 2.54 div dup scale
 privatedict begin /sobj save def
 .02 setlinewidth
 { #2 } stopped { err_handler } if
 clear sobj restore end } }
 }

\special{! /privatedict 200 dict def
privatedict begin
/err_handler {
/Times-Roman findfont .6 scalefont setfont
0 2 moveto (error occured) show
/Times-Roman findfont .4 scalefont setfont
0 1 moveto (offending ps command : ) show
$error /command get 30 string cvs show
0 .5 moveto (operand stack : ) show
$error /ostack get { 200 string cvs show } forall
0 0 moveto (VMStatus : max. memory ) show
vmstatus 10 string cvs show
(  used memory ) show 10 string cvs show
(  level ) show 10 string cvs show
} def
}