groff
[Top][All Lists]
Advanced

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

[Groff] List labels in MM and three argument .ds


From: Blake McBride
Subject: [Groff] List labels in MM and three argument .ds
Date: Fri, 31 Jul 2009 18:37:51 -0500

Greetings,

I'd like to label nested lists with the enclosing list's number using MM
like the following:

1.  First item
    1.1.  First sub-item of the first list
    1.2.  Second sub-item of the first list
2.  Second item
    2.1.  First sub-item of the second list
    2.2.  Second sub-item of the second list

What I attempted to do was specify a label while accessing the internal
counter information.  By accessing those registers I could create any label
I wanted and still retain the auto-numbering.

Is this easy to do in MOM?

While looking at the MM code I noticed a line:

.ie d misc*st-\\$1 .ds misc*st-\\$1 \\$2 \\*[misc*st-\\$1]

It seems like .ds is taking three arguments.  I looked all over and could
find no documentation about this.  I even looked at the C++ source code but
it had no easy way to access and determining the number of arguments that I
could see (why is that, or where is it?).

I admit it has been a long time since I looked at groff macros and I might
be misinterpreting the whole thing.  On the other hand, if .ds does have an
optional third argument, and someone tells me what it does, I'll update the
docs.

Thanks.

Blake McBride


reply via email to

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