Thanks very much, Brian and Larry. Both approaches work. You've given me food for thought about what is possible with groff.
Ken On Fri, Aug 28, 2009 at 10:53 PM, Larry Kollar<kol...@windstream.net> wrote: > > Ken Smith wrote: > >> Is there a way to conditionally define the .XN macro so that, when I'm >> building my HTML document, it is a no-op that returns its arguments >> verbatim to be considered as content? > > Something like this should work (I haven't tested): > > .rn XN XN-old > .de XN > .ie '\*[.T]'html' .nop \\$* > .el .XN-old > .. > > The .T string contains the argument to -T. > > What I did with my rig (based on -ms) was to define a new heading macro that > calls the appropriate pdf directives to build the bookmarks (when built with > -Tps) or inserts the correct markup (-Thtml). > > Larry >