Printing Manual Pages

Printing Manual Pages

Post by Tech Suppo » Fri, 14 Jul 1995 04:00:00



How can I format manual pages and print them. I have tried
man subject > file
and then lp file, but the file is full of s^Hsu^Hub^Hbj^Hje^Hec^Hct^Ht
for subject.
TIA
 
 
 

Printing Manual Pages

Post by Jean-Pierre Radl » Fri, 14 Jul 1995 04:00:00


Quote:Tech Support writes:

> How can I format manual pages and print them. I have tried
> man subject > file
> and then lp file, but the file is full of s^Hsu^Hub^Hbj^Hje^Hec^Hct^Ht
> for subject.

Filter then through the 'col' command, or else find rman (Rosetta Man) at
an ftp site, that takes nroff output and makes it plain ascii or html or
other formats out of it.

Or get a printer which backspaces...

--


 
 
 

Printing Manual Pages

Post by Pund » Fri, 14 Jul 1995 04:00:00


I've run into the same problem. Without a formatting program to handle it,
the best bet seems to be a sed script. I can't remember off the top of my
head (too many languages and formats, have to look it up again).
Basically, find (any single character followed by a control-h) and replace
(with nothing).

Hope this helps.
Carl Jester
CommuniTech

 
 
 

Printing Manual Pages

Post by Jean-Pierre Radl » Sat, 15 Jul 1995 04:00:00


The propounded question was to print nroff-formatted man pages to paper.

This filter works on HP DeskJets and OfficeJets, and I think on LJs too.

It will substitute the nroff output with proper PCL codes for Bold, Italic,
and even Bold&Italic used together (which the man pages do quite often).

        sed '
        s;_^H\(.\)^H\1;^[(s4b1S\1^[(s0b0S;g
        s;_^H\(.\);^[(s1S\1^[(s0S;g
        s;\(.\)\(^H\1\)\2*;^[(s4B\1^[(s0B;g
        s;^[(s0S^[(s1S;;g
        s;^[(s0B^[(s4B;;g
        s;^[(s0b0S^[(s4b1S;;g
        '

[Careful that ^H is the Backspace character, ^[ is the Escape character.]

--

 
 
 

Printing Manual Pages

Post by Joachim Rei » Sat, 15 Jul 1995 04:00:00



|> | How can I format manual pages and print them. I have tried
|> | man subject > file
|> | and then lp file, but the file is full of s^Hsu^Hub^Hbj^Hje^Hec^Hct^Ht
|> | for subject.
|> | TIA
|>

Another possibility would be

man subject | col -x > file
or
man subject | col -bx > file

See the man pages for col(C)

/Joachim

 
 
 

Printing Manual Pages

Post by Ivan Bec » Sat, 15 Jul 1995 04:00:00


| How can I format manual pages and print them. I have tried
| man subject > file
| and then lp file, but the file is full of s^Hsu^Hub^Hbj^Hje^Hec^Hct^Ht
| for subject.
| TIA

I think you don't have to worry about many backspaces in man
files.  On our HPLJ4 system printer the file is printed  OK.
Sequence  _^Hc  produces "underlined"  characters  and  c^Hc
produces just  the  character,  but on  matrix  printer  the
character  is doublestriked. It all depends on  capabilities
of printer and printer interface.

However,  you can delete backspaces using following  filter,
as pundit said:    sed 's/.^H//g'
where ^H is single character `backspace' (^V^H in vi).

--

SOFTEC, Kutuzovova 23, 83103 Bratislava, Slovakia    fax: +42-7-272537

 
 
 

Printing Manual Pages

Post by Sam Liddicot » Sat, 15 Jul 1995 04:00:00



> Tech Support writes:

> > How can I format manual pages and print them. I have tried
> > man subject > file
> > and then lp file, but the file is full of s^Hsu^Hub^Hbj^Hje^Hec^Hct^Ht
> > for subject.

H=`echo "\010"`;man xx | sed "s/.$H//g" | lpr

or if you find some names obliterated and replaced by ________ then try

H=`echo "\010"`;man xx | sed "s/$H.//g" | lpr

+------------------------

|                                       you may NOT call me Sam-I-Am       |
| Campbell Scientific Ltd                                                  |
                                              -----------------------------+

 
 
 

Printing Manual Pages

Post by Todd Hya » Sat, 15 Jul 1995 04:00:00




>: I've run into the same problem. Without a formatting program to handle it,
>: the best bet seems to be a sed script. I can't remember off the top of my
>: head (too many languages and formats, have to look it up again).
>: Basically, find (any single character followed by a control-h) and replace
>: (with nothing).
>: Hope this helps.
>: Carl Jester
>: CommuniTech
>I'm using lp to an HPLJ-4P, and I can just "man <command> | lp" and it
>works fine.  The ctrl-H sequnces actually produce bold or underscored
>text as intended.  Of course, I can't see the original to this article,
>so maybe this is answering a question that wasn't asked.
>Bob Niederman

If you do not want any formatting characters try man -c which
automatically involkes col(C).

Example man -c cp | lp -d printer_name_here.

Todd Hyatt

 
 
 

Printing Manual Pages

Post by Sheldon Bi » Sat, 15 Jul 1995 04:00:00


Quote:>How can I format manual pages and print them. I have tried
>man subject > file
>and then lp file, but the file is full of s^Hsu^Hub^Hbj^Hje^Hec^Hct^Ht
>for subject.
>TIA

Try 'man title|lp'.  Works for me.
Sheldon Bird
Maine Dept. of Labor
 
 
 

Printing Manual Pages

Post by Robert Niederm » Sat, 15 Jul 1995 04:00:00


: I've run into the same problem. Without a formatting program to handle it,
: the best bet seems to be a sed script. I can't remember off the top of my
: head (too many languages and formats, have to look it up again).
: Basically, find (any single character followed by a control-h) and replace
: (with nothing).

: Hope this helps.
: Carl Jester
: CommuniTech

I'm using lp to an HPLJ-4P, and I can just "man <command> | lp" and it
works fine.  The ctrl-H sequnces actually produce bold or underscored
text as intended.  Of course, I can't see the original to this article,
so maybe this is answering a question that wasn't asked.

Bob Niederman

 
 
 

1. How can I get printed manual page ?

As all of you know, "man" command is very useful to a begginer.
When the content of manual page is so long to see in a glance,
it will be good if it is printed on paper.

I tried that in some way.

                   man ... > file_name

I redirected the output of the man command to a file. I thought I could
print the redirected file. But the file was filled with confusing characters,
and it was difficult to read.
How can I solve this problem?
Please answer me a good idea.
Any help would be appreciated.....

--
*************************************************************************
*                                                                       *
*       LEE. JINWON                                                     *

*       Sogang university                                               *
*                                                                       *
*************************************************************************

2. How about multiple sound card support

3. Q: Printing formatted manual pages with man xxx -t |lpr only works on some

4. How? - Restrict access to Apache Proxy

5. Printing pre-formatted manual pages on PS printer

6. mailx and Content-Length: headers

7. How can I print a manual page ?

8. rplay 3.1.0 is now available

9. printing out manual pages

10. Stylus Pro XL+ prints an empty page after every printed page

11. man-pages-1.16 - manual pages for Linux

12. Printing a pdf file duplex and 4 pages per page to a postscript printer

13. Printing 2 postscript pages to 1 physical page ...