9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Sape Mullender <sape@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] troff -man prints poorly
Date: Tue, 26 Feb 2008 14:17:15 -0500	[thread overview]
Message-ID: <10a4738c8adca8170cf87e14eec8c418@plan9.bell-labs.com> (raw)
In-Reply-To: <a87dbffcd45f1a9a6b5d93a475e7e39e@csplan9.rit.edu>

[-- Attachment #1: Type: text/plain, Size: 791 bytes --]

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

[-- Attachment #2: Type: message/rfc822, Size: 2225 bytes --]

From: john@csplan9.rit.edu
To: 9fans@cse.psu.edu
Subject: Re: [9fans] troff -man prints poorly
Date: Tue, 26 Feb 2008 13:36:53 -0500
Message-ID: <a87dbffcd45f1a9a6b5d93a475e7e39e@csplan9.rit.edu>

> troff -man /sys/man/1/cat | page
Looks good.

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

  reply	other threads:[~2008-02-26 19:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 18:22 john
2008-02-26 18:29 ` Gorka Guardiola
2008-02-26 18:40   ` john
2008-02-27 15:54     ` Russ Cox
2008-02-27 17:25       ` Gorka Guardiola
2008-02-26 18:32 ` Sape Mullender
2008-02-26 18:36   ` john
2008-02-26 19:17     ` Sape Mullender [this message]
2008-02-26 19:46 ` Martin Neubauer
2008-02-26 20:19   ` Sape Mullender

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10a4738c8adca8170cf87e14eec8c418@plan9.bell-labs.com \
    --to=sape@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).