summaryrefslogtreecommitdiff
path: root/info/examples/ltt/ps.sty
blob: 1f1a4252627837e6d127206a313a510ee343ba23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
%  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
}