* [HELP] Formatting man pages using groff
@ 1996-03-14 5:00 Mohan Kannapareddy
1996-03-14 5:00 ` C. Thewalt
1996-03-18 5:00 ` Jonas Hvarfner
0 siblings, 2 replies; 3+ messages in thread
From: Mohan Kannapareddy @ 1996-03-14 5:00 UTC (permalink / raw)
Greetings everyone,
We are running DUnix 3.2c. I want to print man pages in nice formats
so that i can file them in a folder for quick access.
I have been using GNU *groff* to do this. BUT, i have a problem the
postscript print out is CRAPPY, that is all the nice formatting
is GONE. Main problems seem to be:
1) There seems to be a "backspace" type of command that totally
screws up the BOLD words (that is it is fuzzy when printed).
it seems to be the way bold characters are printed is backspacing
the letter and printing the same letter twice, unfortunately
in the printed output it has NOT backspaced fuly!!
2) The other problem is uneven spaces between words and the lot
I have not worked with troff/nroff/groff much before but these are
the commands that I tried:
groff -man -s XXX.1 | lpr
groff -man XXX.1 | lpr
Both of them don't work. PLEASE someone help me out in how to
get nice outputs?? The above commands formats and prints great
on Solaris system man pages but not on Digital UNIX.
Thanks
Cheers
Mohan
--
############################################################################
ALL standard disclaimers apply. Opinions are mine and not my employers!
############################################################################
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [HELP] Formatting man pages using groff
1996-03-14 5:00 [HELP] Formatting man pages using groff Mohan Kannapareddy
@ 1996-03-14 5:00 ` C. Thewalt
1996-03-18 5:00 ` Jonas Hvarfner
1 sibling, 0 replies; 3+ messages in thread
From: C. Thewalt @ 1996-03-14 5:00 UTC (permalink / raw)
In article <4i9lrt$r8a@mrnews.mro.dec.com> mohan@dcuaxp.det.dec.com
(Mohan Kannapareddy) writes:
...
I have not worked with troff/nroff/groff much before but these are
the commands that I tried:
groff -man -s XXX.1 | lpr
groff -man XXX.1 | lpr
I don't know about the back space problem, but I use:
groff -man -t -e -s XXX.1 | lpr
and the output looks fine (even the bold). This is groff version 1.10
running under Digital Unix 3.2c. The -t and -e account for the fact
that table and equation macros are used in some man pages.
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [HELP] Formatting man pages using groff
1996-03-14 5:00 [HELP] Formatting man pages using groff Mohan Kannapareddy
1996-03-14 5:00 ` C. Thewalt
@ 1996-03-18 5:00 ` Jonas Hvarfner
1 sibling, 0 replies; 3+ messages in thread
From: Jonas Hvarfner @ 1996-03-18 5:00 UTC (permalink / raw)
The following shellscript uses groff to print manual pages. Groff
needs some additional macro (-mad) information to produce good output.
The macros are included below. I keep the macro file (tmac.ad) in my
~/lib and use -M to tell groff where to look for it. The -t and -e
switches tells groff to run its input through eqn and tbl (or geqn or
gtbl).
Additinonally, the pages get printed double sided, with changed page
offset. That is done by pstops by Angus Duggan. Use archie to find it.
If you don't want/need double sided printing, just send the output
from groff to lpr.
Hope this helps! Regards,
Jonas Hvarfner
jonas@atom.msi.se
#!/bin/sh
# Print manual pages nicely. Jonas Hvarfner 941110.
if [ $# -lt 1 ]; then
echo Doublesided printing of manual pages. Output goes to ps5.
echo Syntax: $0 path/manpage.mansect
echo Example: $0 /usr/share/man/man1/f77.1
exit
fi
groff -t -e -M/users/jonas/lib -mad -man $1 > /tmp/$$
pstops "2:0,1(-0.5cm,0cm)" /tmp/$$ | lpr -Plps17 -K2
echo Spooled to lps17.
rm /tmp/$$
# End of shellscript
Here follow the macros in tmac.ad. I took them from Digitals tmac.man.
.de EE \" End example
.in -\\n(EXu
.fi
.}f \" restore basic text attributes
.if n .sp 1
.if t .sp .5v
..
.de MS
.ie t \&\f5\\$1\fP\fR(\\$2)\fP\\$3
.el \fI\\$1\fP(\\$2)\\$3
..
.de PN
.ie t \&\f5\\$1\fP\\$2
.el \fI\\$1\fP\\$2
..
--
Jonas Hvarfner Dept. of Atomic Physics
jonas@atom.msi.se University of Stockholm, Sweden
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-03-18 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-03-14 5:00 [HELP] Formatting man pages using groff Mohan Kannapareddy
1996-03-14 5:00 ` C. Thewalt
1996-03-18 5:00 ` Jonas Hvarfner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox