groff
[Top][All Lists]
Advanced

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

How to make a lettered list in groff ms (was: troff Memorandum Macros do


From: G. Branden Robinson
Subject: How to make a lettered list in groff ms (was: troff Memorandum Macros documentation derived from the paper "MM - Memorandum Macros"
Date: Wed, 21 Jul 2021 03:15:33 +1000
User-agent: NeoMutt/20180716

Hello again, James.

Naturally I goofed my example, because I was in a hurry.

Also, since we're talking about ms now instead of mm, I've updated the
subject.

At 2021-07-21T00:51:42+1000, G. Branden Robinson wrote:
> > A question came up on reddit that might act as a tie-breaker for 
> > you. (!)  It was: how to automatically increment a list with letters?
> > I don't use the style much, but if you want
> > 
> >     1.  foo
> >             a) bar
> >             b) baz
> >     2.  fubar
> > 
> > I don't know how that would be done.  

Here's an example that actually works, using as much ms macro
infrastructure as possible.

.LP
We have a foolproof scheme for getting rich.
.
.
.nr stage 0 1
.IP \n+[stage].
Incorporate in Cayman Islands.
.
.
.IP \n+[stage].
Acquire venture capital.
.
.
.IP \n+[stage].
Hire gnomes.
.
.
.RS
.nr step 0 1
.af step A
.IP \n+[step].
Collect Underpants.
.
.
.IP \n+[step].
???
.
.
.IP \n+[step].
Profit!
.RE
.
.
.IP \n+[stage].
Retire to tropical paradise.

Output:

We have a foolproof scheme for getting rich.

1.   Incorporate in Cayman Islands.

2.   Acquire venture capital.

3.   Hire gnomes.

     A.   Collect Underpants.

     B.   ???

     C.   Profit!

4.   Retire to tropical paradise.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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