* [9fans] troff -man prints poorly
@ 2008-02-26 18:22 john
2008-02-26 18:29 ` Gorka Guardiola
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: john @ 2008-02-26 18:22 UTC (permalink / raw)
To: 9fans
I've been writing a man page and wanted to see how it looks
when formatted with troff and printed, so I tried:
troff -man <file> | dpost | lp
only to find that the printout was extremely ugly. Words seem
to have run together in some very strange ways; if I had a scanner
handy I could show what I mean. Anyway, the same thing happens
when I do:
troff -man /sys/man/1/cat | dpost | lp
but not when I do:
troff -ms /sys/doc/asm.ms | dpost | lp
Am I missing something simple and fundamental, or is troff/dpost
just broken?
John
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff -man prints poorly
2008-02-26 18:22 [9fans] troff -man prints poorly john
@ 2008-02-26 18:29 ` Gorka Guardiola
2008-02-26 18:40 ` john
2008-02-26 18:32 ` Sape Mullender
2008-02-26 19:46 ` Martin Neubauer
2 siblings, 1 reply; 10+ messages in thread
From: Gorka Guardiola @ 2008-02-26 18:29 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Tue, Feb 26, 2008 at 7:22 PM, <john@csplan9.rit.edu> wrote:
> I've been writing a man page and wanted to see how it looks
> when formatted with troff and printed, so I tried:
> troff -man <file> | dpost | lp
> only to find that the printout was extremely ugly. Words seem
> to have run together in some very strange ways; if I had a scanner
> handy I could show what I mean. Anyway, the same thing happens
> when I do:
> troff -man /sys/man/1/cat | dpost | lp
> but not when I do:
> troff -ms /sys/doc/asm.ms | dpost | lp
>
> Am I missing something simple and fundamental, or is troff/dpost
> just broken?
>
I normally do:
troff -ms bla.ms|lp -dstout| aux/download -H/sys/lib/postscript/font
-mfontmat|lp -H -d printername
and this works for me. What you describe seem to me what happens when
I don't do the download
and add the fonts to the postscript.
I have never used dpost, and I don't know if it substitutes the aux/download...
I don´t know if you were precisely trying to use dpost not to have to use it...
HTH.
--
- curiosity sKilled the cat
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff -man prints poorly
2008-02-26 18:22 [9fans] troff -man prints poorly john
2008-02-26 18:29 ` Gorka Guardiola
@ 2008-02-26 18:32 ` Sape Mullender
2008-02-26 18:36 ` john
2008-02-26 19:46 ` Martin Neubauer
2 siblings, 1 reply; 10+ messages in thread
From: Sape Mullender @ 2008-02-26 18:32 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 78 bytes --]
troff -man /sys/man/1/cat | page
troff -man /sys/man/1/cat | lp -dPrinter
[-- Attachment #2: Type: message/rfc822, Size: 2584 bytes --]
From: john@csplan9.rit.edu
To: 9fans@cse.psu.edu
Subject: [9fans] troff -man prints poorly
Date: Tue, 26 Feb 2008 13:22:49 -0500
Message-ID: <0497b4634bc7e790a2fd0adf29263215@csplan9.rit.edu>
I've been writing a man page and wanted to see how it looks
when formatted with troff and printed, so I tried:
troff -man <file> | dpost | lp
only to find that the printout was extremely ugly. Words seem
to have run together in some very strange ways; if I had a scanner
handy I could show what I mean. Anyway, the same thing happens
when I do:
troff -man /sys/man/1/cat | dpost | lp
but not when I do:
troff -ms /sys/doc/asm.ms | dpost | lp
Am I missing something simple and fundamental, or is troff/dpost
just broken?
John
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff -man prints poorly
2008-02-26 18:32 ` Sape Mullender
@ 2008-02-26 18:36 ` john
2008-02-26 19:17 ` Sape Mullender
0 siblings, 1 reply; 10+ messages in thread
From: john @ 2008-02-26 18:36 UTC (permalink / raw)
To: 9fans
> troff -man /sys/man/1/cat | page
Looks good.
> troff -man /sys/man/1/cat | lp -dPrinter
Looks terrible.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff -man prints poorly
2008-02-26 18:29 ` Gorka Guardiola
@ 2008-02-26 18:40 ` john
2008-02-27 15:54 ` Russ Cox
0 siblings, 1 reply; 10+ messages in thread
From: john @ 2008-02-26 18:40 UTC (permalink / raw)
To: 9fans
> On Tue, Feb 26, 2008 at 7:22 PM, <john@csplan9.rit.edu> wrote:
>> I've been writing a man page and wanted to see how it looks
>> when formatted with troff and printed, so I tried:
>> troff -man <file> | dpost | lp
>> only to find that the printout was extremely ugly. Words seem
>> to have run together in some very strange ways; if I had a scanner
>> handy I could show what I mean. Anyway, the same thing happens
>> when I do:
>> troff -man /sys/man/1/cat | dpost | lp
>> but not when I do:
>> troff -ms /sys/doc/asm.ms | dpost | lp
>>
>> Am I missing something simple and fundamental, or is troff/dpost
>> just broken?
>>
>
> I normally do:
>
> troff -ms bla.ms|lp -dstout| aux/download -H/sys/lib/postscript/font
> -mfontmat|lp -H -d printername
That has the same end result for me as just doing troff -man foo | lp
John
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff -man prints poorly
2008-02-26 18:36 ` john
@ 2008-02-26 19:17 ` Sape Mullender
0 siblings, 0 replies; 10+ messages in thread
From: Sape Mullender @ 2008-02-26 19:17 UTC (permalink / raw)
To: 9fans
[-- 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff -man prints poorly
2008-02-26 18:22 [9fans] troff -man prints poorly john
2008-02-26 18:29 ` Gorka Guardiola
2008-02-26 18:32 ` Sape Mullender
@ 2008-02-26 19:46 ` Martin Neubauer
2008-02-26 20:19 ` Sape Mullender
2 siblings, 1 reply; 10+ messages in thread
From: Martin Neubauer @ 2008-02-26 19:46 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
The problem most likely is the missing font informations. If you just use
``dpost -f'' (or the equivalent aux/download ... mentioned earlier) you
should get just what you want. The reason the page display looks good is
that you have access to the fonts as long as you don't leak the postscript
outside a Plan 9 system.
Martin
* john@csplan9.rit.edu (john@csplan9.rit.edu) wrote:
> I've been writing a man page and wanted to see how it looks
> when formatted with troff and printed, so I tried:
> troff -man <file> | dpost | lp
> only to find that the printout was extremely ugly. Words seem
> to have run together in some very strange ways; if I had a scanner
> handy I could show what I mean. Anyway, the same thing happens
> when I do:
> troff -man /sys/man/1/cat | dpost | lp
> but not when I do:
> troff -ms /sys/doc/asm.ms | dpost | lp
>
> Am I missing something simple and fundamental, or is troff/dpost
> just broken?
>
>
> John
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff -man prints poorly
2008-02-26 19:46 ` Martin Neubauer
@ 2008-02-26 20:19 ` Sape Mullender
0 siblings, 0 replies; 10+ messages in thread
From: Sape Mullender @ 2008-02-26 20:19 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
/sys/lib/tmac.an (troff -man) loads the LucidaSans fonts:
.fp 1 R LucidaSans
.fp 2 I LucidaSansI
.fp 3 B LucidaSansB
.fp 5 L LucidaCW
If you don't have those, some other font is substituted and that'll
make your output look ugly.
(/sys/lib/tmac.s (troff -ms) doesn't load fonts (defaults to Times roman)
Sape
[-- Attachment #2: Type: message/rfc822, Size: 4564 bytes --]
From: Martin Neubauer <m.ne@gmx.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] troff -man prints poorly
Date: Tue, 26 Feb 2008 20:46:52 +0100
Message-ID: <20080226194652.GA2267@shodan.homeunix.net>
The problem most likely is the missing font informations. If you just use
``dpost -f'' (or the equivalent aux/download ... mentioned earlier) you
should get just what you want. The reason the page display looks good is
that you have access to the fonts as long as you don't leak the postscript
outside a Plan 9 system.
Martin
* john@csplan9.rit.edu (john@csplan9.rit.edu) wrote:
> I've been writing a man page and wanted to see how it looks
> when formatted with troff and printed, so I tried:
> troff -man <file> | dpost | lp
> only to find that the printout was extremely ugly. Words seem
> to have run together in some very strange ways; if I had a scanner
> handy I could show what I mean. Anyway, the same thing happens
> when I do:
> troff -man /sys/man/1/cat | dpost | lp
> but not when I do:
> troff -ms /sys/doc/asm.ms | dpost | lp
>
> Am I missing something simple and fundamental, or is troff/dpost
> just broken?
>
>
> John
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff -man prints poorly
2008-02-26 18:40 ` john
@ 2008-02-27 15:54 ` Russ Cox
2008-02-27 17:25 ` Gorka Guardiola
0 siblings, 1 reply; 10+ messages in thread
From: Russ Cox @ 2008-02-27 15:54 UTC (permalink / raw)
To: 9fans
>> troff -ms bla.ms|lp -dstout| aux/download -H/sys/lib/postscript/font
>> -mfontmat|lp -H -d printername
>
> That has the same end result for me as just doing troff -man foo | lp
Yes, it would. However, if you spell fontmap right, it should work.
Also the -H option is doing anything here -- that directory is already the default.
cpu% troff -man /sys/man/1/cat | lp -dstdout | aux/download -mfontmat | wc
849 2474 15261
cpu% troff -man /sys/man/1/cat | lp -dstdout | aux/download -mfontmap |wc
4337 7366 268301
cpu%
Russ
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff -man prints poorly
2008-02-27 15:54 ` Russ Cox
@ 2008-02-27 17:25 ` Gorka Guardiola
0 siblings, 0 replies; 10+ messages in thread
From: Gorka Guardiola @ 2008-02-27 17:25 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Wed, Feb 27, 2008 at 4:54 PM, Russ Cox <rsc@swtch.com> wrote:
> >> troff -ms bla.ms|lp -dstout| aux/download -H/sys/lib/postscript/font
> >> -mfontmat|lp -H -d printername
> >
> > That has the same end result for me as just doing troff -man foo | lp
>
> Yes, it would. However, if you spell fontmap right, it should work.
> Also the -H option is doing anything here -- that directory is already the default
upps. sorry it was a typo :-). The -H is probably because
my default directory is broken, I am in an schizophrenic
plan B/plan 9/paureas broken namespace/drawterm
limbo where you cannot trust any default anymore.
--
- curiosity sKilled the cat
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-02-27 17:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-26 18:22 [9fans] troff -man prints poorly 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
2008-02-26 19:46 ` Martin Neubauer
2008-02-26 20:19 ` Sape Mullender
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).