> I'm trying to make some macros that will build up the SEE ALSO list
> [...]
> 
> 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?  

You have first to call .TH within the man page (.TH defines .SH), then
redefining .SH.

Below is a snippet which does what you want.


    Werner


======================================================================


.TH foo
.
.rn SH ORIGINAL_SH
.
.de1 SH
.       if d SEE_ALSO \{\
.               nop \\*[SEE_ALSO]
.               rm SEE_ALSO
.       \}
.       ORIGINAL_SH \\$@
..
.
.de SA
.       if d SEE_ALSO \
.         as SEE_ALSO , \"
.       as SEE_ALSO \\$1
..      
.
.
.SH SEE ALSO
.SA foo
.SA bar
.SA blech
.
.SH SOMETHING_ELSE
bar


_______________________________________________
Groff mailing list
Groff@gnu.org
http://lists.gnu.org/mailman/listinfo/groff

Reply via email to