.key IN,OUT
.def IN -
.bra {
.ket }
;
; Extract ASCII text from a PostScript file.  Usage:
;	ps2ascii [infile.ps [outfile.txt]]
; If outfile is omitted, output goes to stdout.
; If both infile and outfile are omitted, ps2ascii acts as a filter,
; reading from stdin and writing on stdout.
;
If "{OUT}" EQ ""
  gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps {IN} quit.ps
Else
  gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps {IN} quit.ps >{OUT}
Endif
