groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macros for printing envelopes?


From: G. Branden Robinson
Subject: Re: Macros for printing envelopes?
Date: Sun, 18 Jul 2021 09:13:41 +1000
User-agent: NeoMutt/20180716

Hi, Peter & James!

At 2021-07-16T18:07:10-0400, Peter Schaffter wrote:
> How such a template is used with a script, however, is entirely site
> dependent.  As far as selecting trays goes, that can be done with
> lpoptions(1) or the -o flag to lpr(1) in the script.

And options to lpr can be passed via groff's -L option, so you can say
"groff -L -o -L orientation-requested=4" or whatever.

At 2021-07-16T17:18:04-0500, Nate Bargmann wrote:
> My printer, a Brother HL-5240, takes input from the manual tray and
> like you I insert the envelope and then print.  Typically, I feed the
> envelope in with the short side at the return address in first.  To be
> honest, I'm not entirely sure if that is portrait or landscape
> orientation for envelopes.  On a regular letter sheet of paper the
> print would be in landscape orientation, so I assume the same here.

Not in groff world!  To be militantly consistent, I suppose, in groff,
standard paper formats are always at least as long as they are wide.

groff_tmac(5) discusses the "papersize" macro file.

 papersize
        This macro file is normally loaded at start-up  by  the  troffrc
        file,  so it is seldom necessary to call it explicitly.  It pro‐
        vides an interface to set the paper size  on  the  command  line
        with the option -dpaper=size to groff or troff.  Possible values
        for size are the ISO and DIN formats “A0–A6”, “B0–B6”,  “C0–C6”,
        and  “D0–D6”;  the  U.S.  formats  “letter”, “legal”, “tabloid”,
        “ledger”, “statement”, and “executive”; and the envelope formats
        “com10”,  “monarch”,  and “DL”.  All formats, even those for en‐
        velopes, are in portrait orientation, with their  longer  dimen‐
        sion as the length.  Appending “l” (ell) to any of these denotes
        landscape orientation instead.  An output driver  typically  re‐
        quires command-line switches -p and -l to override the paper di‐
        mensions and orientation,  respectively,  defined  in  its  DESC
        file; see subsection “Paper sizes” of groff(1).

Some of the foregoing language is pretty recent.

By the way, papersize.tmac doesn't support formats A7, B7, C7, D7, but
the output drivers do--thanks to libdriver.  Does anyone know why this
is the case?

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]