The question is: how do you print only part of a man page?
Currently I do
zcat manpage.1.gz | vim - and just remove everything I don't want to print. Then I pass that through groff and lpr. Are there better methods?
I know that you can print a whole man page at once, in plain monospaced text, by doing something like
Or to print it "pretty" (Serif font, bold, italics etc.) by doing
As this basically sends a postscript file to the printer, you can also save it to a PostScript file by doing
But I have no idea if you can easily extract a certain page, pages, or sections.
Then print with
(Hint: The option (
But better yet: open in your editor, then mark the region. In Emacs:
For this to work, the variable
If you want to easily print a man doc I usually do it the graphical way:
Then you can print certain pages in your web browser. This isn't as powerful as doing it through the command line but it's a lot easier to get right since you can actually see what you're printing ahead of time. This may be important if you want to print a landscape document or something of that sort.