lp is the most horrible shell script imaginable.  The line
for your printer in /sys/lib/lp/devices is supposed to help
match the output of troff to the input your printer expects.
There are people out there who know how to do this.  I've long
given up.  I just generate postscript/pdf (below's the relevant
piece of the mkfile) and print that.

%.ps:DQ:        %.ms
        eval `{doctype $home/lib/macros.ms $stem.ms} | \
        lp -m.9 -dstdout >$target

%.ps:DQ:        %.man
        eval `{doctype $home/lib/macros.ms $stem.man} | \
        lp -m.9 -dstdout >$target

%.pdf:DQ: %.ps
        cat /sys/doc/docfonts $stem.ps >_$stem.ps
        ps2pdf _$stem.ps $stem.pdf && rm -f _$stem.ps

# Useful in acme:  mk document.show
%.show:VQ:      %.ps
        page -w $stem.ps

%.ps:D: %.jpg
        jpg -t -9 $stem.jpg | lp -dstdout >$target
--- Begin Message ---
> troff -man /sys/man/1/cat | page
Looks good.

> troff -man /sys/man/1/cat | lp -dPrinter
Looks terrible.

--- End Message ---

Reply via email to