groff
[Top][All Lists]
Advanced

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

Re: Macro package loading best practices


From: Dave Kemper
Subject: Re: Macro package loading best practices
Date: Fri, 23 Feb 2024 09:07:42 -0600

On 2/22/24, G. Branden Robinson <g.branden.robinson@gmail.com> wrote:
> I've come to think that a set of "best practice" for *roff document
> composition is to:
>
> A.  Load your desired full-service macro package (if any) on the command
>     line with `-m`.
> B.  Load any auxiliary macro packages that your document _requires_
>     either on the command line with `-m` or at the very beginning of
>     your document with `mso`.

Point A is a widespread historical expectation (at least partly
because, far enough back in history, troff didn't have .mso), but I
don't think it should be generally considered best practice.
Command-line options ought to be what the name says: *options*.  Want
a different paper size or font family?  Sure, those are options.

But in no sense is loading m.tmac optional for -mm documents.  It is
absolutely required, so ideally it should not be incumbent on every
user who wants to render that document to know which switches to flip
to get it to work right, but on the document author to include this
within the document.

There are exceptions, of course.  Users rarely render man pages with a
groff command, and the man frontend takes care of the groff switches.
I seem to recall that at least one of the historical macro packages
assumes that it's specified on the command line and initializes
something differently if not.

But absent one of those exceptions, it doesn't seem groff
documentation should recommend, as a best practice, requiring every
user to specify one or more -m options for things that aren't
optional.  The document author, not the user, should be the one
specifying the document's required macro package(s).



reply via email to

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