[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] grog doesn't detect -mom ...
From: |
Peter Schaffter |
Subject: |
Re: [Groff] grog doesn't detect -mom ... |
Date: |
Wed, 28 May 2003 16:03:55 -0400 |
User-agent: |
Mutt/1.0.1i |
On Wed, May 28, 2003, Ralph Corderoy wrote:
> In the past, mom's author told me, as I was writing a new grog at the
> time that
>
> /^\.ALD~~/ : macromom
> /^\.DOCTYPE~~/ : macromom
> /^\.FAMILY~~/ : macromom
> /^\.FAM~~/ : macromom
> /^\.FT~~/ : macromom
> /^\.LL~~/ : macromom
> /^\.LS~~/ : macromom
> /^\.NEWPAGE~~/ : macromom
> /^\.PAGE~~/ : macromom
> /^\.PAPER~~/ : macromom
> /^\.PRINTSTYLE~~/ : macromom
> /^\.PT_SIZE~~/ : macromom
> /^\.T_MARGIN~~/ : macromom
The difficulty with getting grog to recognise -mom is that it's a
2-in-1 package: a set of macros for using groff as a typesetting
engine, and a set of macros for using groff as a document
processing engine.
Doc processing is easy: no matter what, at least the following two
macros must be present:
.PRINTSTYLE <arg> (where <arg> is either TYPEWRITE or TYPESET)
and
.START
Typesetting using mom isn't so obvious, since there are no required
macros, only what the user needs for a particular task. As a
general rule, it's hard to imagine any kind of serious typesetting
that doesn't involve setting at least one of left/right/top/bottom
margin, hence a reasonable test for "typeset, no doc processing" mom
files should probably look for
.L_MARGIN
.R_MARGIN
.T_MARGIN
.B_MARGIN
.PAGE
(.PAGE allows the user to set all the margins on a single control
line.)
.PAPER lets the user choose LETTER, A4, LEGAL etc., so, while not
required, is also a likely candidate.
Finally, certain basic typesetting parameters are almost certain to
show up in any "typeset-only" mom file: line length, family, font
and point size. These are, respectively:
.L_LENGTH or .LL
.FAMILY or .FAM
.FONT or .FT
.PT_SIZE
Of these, though, only PT_SIZE is really useful to grog since it's
the only one without a built in alias that doesn't resemble macros
from other common macro sets. Just the same, there's no guarantee
that a user doing some on-the-fly typesetting won't use the groff
default point size, and hence never invoke PT_SIZE.
It was suggested some time ago that -mom users be instructed to
plant an identifying line at the top of files--something as simple
as, say
\"mom
to help out grog. Kinda defeats the purpose of grog, though; users
might as well do "groff -mom."
--
Peter Schaffter
Author of _The Schumann Proof_, appearing fall, 2004
(pub. RendezVous Press, Canada)