groff
[Top][All Lists]
Advanced

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

Re: [Groff] replicating official memo


From: Pierre-Jean
Subject: Re: [Groff] replicating official memo
Date: Tue, 05 Feb 2013 11:49:52 +0100
User-agent: Heirloom mailx 12.5 7/5/10

Daniel Lyons <address@hidden> wrote:

> I'm fairly new to groff.

Me too, I'm a four year old troffer.


> I'm thinking now if I ever want to do footnotes or number
> headings or whatever, I should instead customize one of
> the existing macro packages. This is my question.

I think there's four ways of using troff:

 1. use a standart macro package without modification,
 2. use mom macro package, which is highly customizable,
 3. use a standart macro package by modifying it,
 4. create your own macro package.

Methods 2. and 3. should give the same result. Method 3. is
probably harder, but it's a good starting point to be able
to create an own macro package.


> I gather this is usually done with -ms, is that correct?

If you choose method 3, -ms is known as a good choice, since
it is probably simpler than other macro packages.

That's the one I choosed to start, and I've never complained
about that choice. When ms couldn't suit my needs, I began
to write standalones macros, and so, never really tryed
other macro packages.

> Is the chapter on customizing -ms in UTP the right reference for this kind of 
> job?

In a sense, yes, but the problem is that UTP is based on the
orginal ms. Groff ms has been rewritten from scratch.

But, consider that there is two way of customizing a macro
package:
 - create new macro based on the ms macros, such as .PP,
   .SH, etc. In that case, you only need to know the troff
   commands.
 - hacking the package. you'll have to know the troff commands,
   *and* to understand the internals of the macro package.
   In that case, you'll have to read the ms macro, and try
   to understand it by yourself.


The original "nroff/troff user manual" gives some examples
to manage footnotes and headers. It's, in my opinion, the
best troff documentation. The manual can be found on
heirloom troff website (take care of some incompatibilities
between heirloom troff and groff):
http://heirloom.sourceforge.net/doctools/troff.pdf

Cheers,

Pierre-Jean.



reply via email to

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