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