9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "John A." <john@ankarstrom.se>
To: 9fans@9fans.net
Subject: [9fans] Plan 9 troff paper size solution
Date: Wed, 27 Jan 2021 21:57:23 +0100	[thread overview]
Message-ID: <rusk3d$4ri$1@ciao.gmane.io> (raw)

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

             reply	other threads:[~2021-02-02 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 20:57 John A. [this message]
2021-02-02 13:09 ` sirjofri

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='rusk3d$4ri$1@ciao.gmane.io' \
    --to=john@ankarstrom.se \
    --cc=9fans@9fans.net \
    /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).