groff
[Top][All Lists]
Advanced

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

Re: [Groff] Nesting macro calls in mdoc


From: Werner LEMBERG
Subject: Re: [Groff] Nesting macro calls in mdoc
Date: Fri, 09 Aug 2002 00:59:26 +0200 (CEST)

> > I've got a man page here, written in mdoc, which seems to nest
> > macros correctly according to the documentation but generates an
> > error. Can anyone shed any light on it? The line in question is:
> > 
> >   .Ic Sq \&? .
> > 
> > ... which should print the three characters `?' in a literal font
> > followed by a dot. However, it produces this error message:
> > 
> >   Usage: .Ic interactive_command ... (#102)
> > 
> > Is it not possible to call quoting macros like Sq from other
> > parsed macros? Is the punctuation they generate confusing matters?
> > The problem doesn't seem to be unique to either .Ic or .Sq, so I'm
> > wondering if I've missed something much more fundamental in
> > groff_mdoc(7).
> > 
> The correct command would be ``.Sq \&? .'', .Ic requires a text- or
> punctuation-type argument.

>From groff_mdoc (I've added comments in parentheses since we don't
have bold face in emails):


     Note that a macro takes effect up to the next nested macro.  For
     example, `.Ic foo Aq bar' doesn't produce `foo <bar>' (in bold
     face) but `foo <bar>' (where only `foo' is in bold face).
     Consequently, a warning message is emitted for most commands if
     the first argument is a macro itself since it cancels the effect
     of the calling command completely.  Another consequence is that
     quoting macros never insert literal quotes; `foo <bar>' (in bold
     face) has been produced by `.Ic "foo <bar>"'.


        Werner

reply via email to

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