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: Dale Snell
Subject: Re: [Groff] How to move page format definition to command line options
Date: Thu, 1 Oct 2015 11:57:35 -0700

On Thu, 01 Oct 2015 00:12:32 -0700, in message
address@hidden, Marisa Giancarla wrote:

> 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?
> 
> Thanks!
> 
> Marisa


I think you'll need to do some in-document modifications first.
See sections 5.20.1 and 5.20.2 in the Groff manual.  You can use
the .ie and .el requests to set up the different settings you need
for nroff (terminal output) and troff (PDF output).  E.g.,

     .ie n <do_something> \" nroff setup
     .el <do_something_else> \" troff setup

If you need more than one line, you can use \{ and \} to build
blocks of code; the manual shows how.

Once that's done, you can create your documents with "nroff -mm ..."
and "troff -mm ...".  Groff will then Do The Right Thing™ and
build your documents the way you want.

Hope this helps.

--Dale

-- 
"It is by caffeine alone I set my mind in motion.  It is by the
beans of Java that thoughts acquire speed, the hands acquire
shakes, the shakes become a warning.  It is by caffeine alone I set
my mind in motion."    -- The Programmer's Mantra

Attachment: pgpwZIbwYk5Gs.pgp
Description: OpenPGP digital signature


reply via email to

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