Re: [9fans] troff -man prints poorly
On Wed, Feb 27, 2008 at 4:54 PM, Russ Cox <[EMAIL PROTECTED]> 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
Re: [9fans] troff -man prints poorly
>> 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 8492474 15261 cpu% troff -man /sys/man/1/cat | lp -dstdout | aux/download -mfontmap |wc 43377366 268301 cpu% Russ
Re: [9fans] troff -man prints poorly
/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 --- Begin Message --- 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 * [EMAIL PROTECTED] ([EMAIL PROTECTED]) 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 | 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--- End Message ---
Re: [9fans] troff -man prints poorly
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 * [EMAIL PROTECTED] ([EMAIL PROTECTED]) 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 | 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
Re: [9fans] troff -man prints poorly
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 ---
Re: [9fans] troff -man prints poorly
> On Tue, Feb 26, 2008 at 7:22 PM, <[EMAIL PROTECTED]> 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 | 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
Re: [9fans] troff -man prints poorly
> troff -man /sys/man/1/cat | page Looks good. > troff -man /sys/man/1/cat | lp -dPrinter Looks terrible.
Re: [9fans] troff -man prints poorly
troff -man /sys/man/1/cat | page troff -man /sys/man/1/cat | lp -dPrinter --- Begin Message --- 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 | 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--- End Message ---
Re: [9fans] troff -man prints poorly
On Tue, Feb 26, 2008 at 7:22 PM, <[EMAIL PROTECTED]> 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 | 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