[Top][All Lists]

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

Re: [Groff] MM's nested lists: AL inside BVL

From: Anton Shepelev
Subject: Re: [Groff] MM's nested lists: AL inside BVL
Date: Mon, 28 Jun 2010 19:20:49 +0400

Ted Harding:

> That  --  the  asymmetry  --  is  also  my feeling
> exactly! However, I think the  increment/decrement
> operation is best left alone!  Consider:

So  you show a way to make Groff do what you want it
to do, but my mind either inattentive  or  lazy  and
therefore  prone  to  human mistakes, which makes me
incline to "Safe" programming languages  (Pascal  in
preference to C, for example). So I might even write
some "Safe" macros if I  found  myself  bumping  too
often into this kind of error:

   \" Common wrapper for safe assign, increment
   \" and decrement operations, not to be used
   \" directly.
   .de cAS
   .   nr \\$1 \\$2(\\$3)
   \" Safe assign
   .de NR
   .   cAS \\$1 "" \\$2
   .\" Decrement register $1 by value $2
   .de DR
   .   cAS \\$1 - \\$2
   .\" Increment register $1 by value $2
   .de IR
   .   cAS \\$1 + \\$2

But  where  to  stop?  I might end up with a wrapper
around groff...

> and, later: "When interpolated, a number  register
> is  converted into decimal (default), decimal with
> leading zeros, lower-case Roman, upper-case Roman,
> lower-  case  sequential alphabetic, or upper-case
> sequential alphabetic,  according  to  the  format
> specified by 'af'."

I too thought about .af  when  saw  it  in  Tadziu's
example.  My  idea  was  to  introduce a format that
would expand into a value  in  parentheses,  but  it
would  be  adding another dimenstion to formats, not
just another format, which is wrong.

> And, while you're at it, you might as well  always
> bracket it since the "+" prefix will still work as
> before with the brackets,...

So all one needs to be happy is just to be aware  of
the  feature  and  do  some extra writing to take it
into account.


reply via email to

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