home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / question / 13605 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  2.2 KB

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!uwm.edu!rutgers!kb2ear!princeton!sheps!bvaughan
  2. From: bvaughan@sheps.Princeton.EDU (Barbara Vaughan)
  3. Newsgroups: comp.unix.questions
  4. Subject: PostScript output from man
  5. Message-ID: <1992Nov18.201627.13309@Princeton.EDU>
  6. Date: 18 Nov 92 20:16:27 GMT
  7. Sender: news@Princeton.EDU (USENET News System)
  8. Organization: Princeton University
  9. Lines: 39
  10. Originator: news@nimaster
  11. Nntp-Posting-Host: sheps.princeton.edu
  12.  
  13. Can someone suggest a way of either getting PostScript output for a man
  14. page or finding the fully qualified path name for a man page.  Here is
  15. some background:
  16.  
  17. We have a PostScript printer (HP Laserjet 3si) that lets us print on both
  18. sides of a page using PostScript commands.  (About four lines of
  19. PostScript headers have to be prepended to an existing PostScript file.)  I
  20. have figured out how to
  21. implement this for everything but man pages.  If it's a TeX file, I use
  22. dvips to convert it to PostScript, if a plain text file, I use enscript. I've
  23. written a shell script that figures out what kind of file you have and
  24. that has a -d (for "duplex") command line switch so that even our most
  25. novice users can save paper, and I'd like to make a similar shell script
  26. for man pages so that you can say "manprint -d _command_" and you'll get a
  27. duplex-printed man page.  (Or maybe I could add a "-man" command line
  28. switch to my existing script.)  At any rate, I need PostScript output from
  29. the man page.
  30.  
  31. I've tried the following:
  32.  
  33. man -t _command_ >tempfile
  34. pscat tempfile 
  35.  
  36. (pscat fails and dumps core; this seems to be a pscat bug)
  37.  
  38. I have found that if I know the name of the man page file, I can use
  39. ptroff -t -man _man.page.file.name_ to produce a PostScript version of the
  40. man page, but our man pages reside on many different directories, so I
  41. would like a way to have my shell script identify the path/name of the file
  42. where the man page resides, so the user doesn't have to know this in advance.
  43.  
  44. I've also tried various ways of piping output of man directly to ptroff,
  45. This also fails, even if I set my TROFF environment variable to PTROFF. 
  46. The closest I get is a PostScript file containing nothing but headers and
  47. status dictionary, font definitions, etc.
  48.  
  49. Thanks for any help you can give,
  50.  
  51. Barbara Vaughan
  52.