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: Ruslan Ermilov
Subject: Re: [Groff] Nesting macro calls in mdoc
Date: Fri, 9 Aug 2002 17:56:35 +0300
User-agent: Mutt/1.3.99i

On Fri, Aug 09, 2002 at 12:59:26AM +0200, Werner LEMBERG wrote:
> > > 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>"'.
> 
Nice, I even forgot we have this is the manpage.  :-)

I have something to submit to mdoc(7) soon; new *BSD releases, new
(old) standards, etc., BTW.


Cheers,
-- 
Ruslan Ermilov          Sysadmin and DBA,
address@hidden          Sunbay Software AG,
address@hidden          FreeBSD committer,
+380.652.512.251        Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

Attachment: pgp9JLKaQX0RY.pgp
Description: PGP signature


reply via email to

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