[Top][All Lists]

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

Re: [Groff] Headers in MM

From: Anton Shepelev
Subject: Re: [Groff] Headers in MM
Date: Fri, 30 Apr 2010 11:23:24 +0400

Mike Bianchi:

> Anton,
> Since HX, HY and HZ are initialized as empty, and hence no-ops, using them to
> do anything that works for you is just fine.
> The one thing to be careful of is using knowledge of the implementation
> obtained by reading the code.  Any of that can be changed.
> In this case, you use the  }0  string, which is documented in the code
> (file m.tmac) as being available for use within a user-provided  HX  macro.
> I'd say you are very safe there.
> Using  a  as the name of a number register is more risky as it could easily
> conflict with another temporary register elsewhere.  groff supports long
> names and that helps avoid collisions.  (See register  temp_indent_  below.)
> (I always use the  \*[name],  \n[name],  etc.  style of reference, even for
> 1- and 2-character references.  They stand out better and all references
> look alike.)
> In playing with your example, I found that it was nroff specific, since
>  .length  gives a character count and your indent and outdent are in terms
> of  n  units.  The following also works in troff/groff.  It obtains the
> width of the  }0  mark in troff/groff's "units" (aka "scaled points")
> from the  \w'string'  escape sequence, and then uses it that way.

Thank you very much, Mike


reply via email to

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