groff
[Top][All Lists]
Advanced

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

Re: [Groff] How to move page format definition to command line options


From: Ralph Corderoy
Subject: Re: [Groff] How to move page format definition to command line options
Date: Fri, 02 Oct 2015 13:31:48 +0100

Hi Marisa,

> Right now i have the pages defined at the top of each with ".PGFORM 80
> 1000 0 1" but i would like to move this to the command line arguments
> so i can use the same content for 80x24 for plain text version and
> 8.5x11 for the PDF version. Can someone give me tips on doing this?

An alternative, as someone already pointed out, is to have .PGFORM more
than once at the start of your document, but conditionally use only one
of them.

In addition to the `n' and `t' conditions described in section 16 of
CSTR 54, there's also the `.T' string register described in `Built-in
Registers' in the groff manual.

    $ printf '%s\n' '.if n nroff.' '.if t troff.' 'Device is \*(.T.' |
    > nroff |
    > grep .
    nroff.  Device is utf8.
    $

Cheers, Ralph.



reply via email to

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