9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Plan 9 troff paper size solution
@ 2021-01-27 20:57 John A.
  2021-02-02 13:09 ` sirjofri
  0 siblings, 1 reply; 2+ messages in thread
From: John A. @ 2021-01-27 20:57 UTC (permalink / raw)
  To: 9fans

Hi everyone,

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

This seems to work properly with ms footers, too.  The last two steps
have been mentioned on the mailing list before, but I think the first
step is new.

Best regards
John


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-02 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 20:57 [9fans] Plan 9 troff paper size solution John A.
2021-02-02 13:09 ` sirjofri

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).