[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Macro rename - what am I doing wrong?
From: |
Larry McVoy |
Subject: |
[Groff] Macro rename - what am I doing wrong? |
Date: |
Thu, 23 Feb 2006 11:48:48 -0800 |
User-agent: |
Mutt/1.5.11 |
I'm trying to make some macros that will build up the SEE ALSO list in a man
page so I can do
.SH SEE ALSO
.SA foo
.SA bar
.SA blech
.SH SOMETHING_ELSE
and get
SEE ALSO
foo, bar, blech
SOMETHING_ELSE
The approach I took was to try and rename the .SH macro to something else
and stick my code in there. That flopped, what am I doing wrong?
Is there a better way to do this?
.rn SH ORIGINAL_SH
.de1 SH
. tm SH \\$*
. if !'\\*[SEE_ALSO]'' \{\
. chop SEE_ALSO
. chop SEE_ALSO
. tm SEE_ALSO=\\*[SEE_ALSO]
\\*[SEE_ALSO]
. ds SEE_ALSO
. \}
. ORIGINAL_SH
..
.de SA
. tm SEE_ALSO \\$1
. as SEE_ALSO \\$1
. as SEE_ALSO ,
..
---
Larry McVoy lm at bitmover.com http://www.bitkeeper.com
- [Groff] Macro rename - what am I doing wrong?,
Larry McVoy <=