! ! centers postscript text horizontally at a particular line, column. ! ! contributed by Mike Hill (mhill@copyright.com) ! begin-procedure print_center ($ls_text,#VertPos, #HorizCent) ENCODE '<123>' into $lbr ENCODE '<125>' into $rbr ENCODE '<10>' into $lf Move #VertPos to $vp xxxxx Move #HorizCent to $hc xxxxx LET $ls_line = $lf || $vp || ' ' || $hc || ' go () sh' || $lf PRINT-DIRECT NOLF PRINTER=PS $ls_line LET $ls_line = ' /center_str ' || $lbr || '(' || $ls_text || ')' || $rbr LET $ls_line = $ls_line || ' bind def' || $lf PRINT-DIRECT NOLF PRINTER=PS $ls_line LET $ls_line = ' center_str stringwidth pop 2 div neg 0 rmoveto' || $lf PRINT-DIRECT NOLF PRINTER=PS $ls_line LET $ls_line = ' center_str show' || $lf PRINT-DIRECT NOLF PRINTER=PS $ls_line end-procedure