Quoth John A. <j...@ankarstrom.se>:
> I've been trying to figure out how to create A4 documents with
> Plan 9 troff.  Looking at the source of dpost and the PostScript
> output of GNU troff, I found a very easy solution.
> 
> 1. Call dpost with -P to set the correct page size:
> 
>    dpost -P '<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice' 
> 
> 2. Use .pl to set the page length:
> 
>     .pl 29.7c
> 
> 3. Use .ll (.nr LL with ms) to set the line length:
> 
>     .nr LL 15.92c \" assuming PO = 1i

(At least on 9front) you can just use ps2pdf ghostscript arguments
instead of step 1.  I use:

  troff -ms | lp -dstdout | ps2pdf '-sPAPERSIZE=a4' > $target

which works fine. Adjusting pagelength and linelength is still needed as in 
steps 2 and 3.

sirjofri


------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T529d24fea0ba8e21-Me7a7dd9036c4b754ac6c4cce
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to