groff
[Top][All Lists]
Advanced

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

Re: [groff] Problems redefining macro $c for -me macros


From: G. Branden Robinson
Subject: Re: [groff] Problems redefining macro $c for -me macros
Date: Sun, 3 Dec 2017 11:47:31 -0500
User-agent: NeoMutt/20170113 (1.7.2)

At 2017-12-03T09:06:52-0500, Mike Bianchi wrote:
> > I also find it funny if I ever need to talk about money in dollars: a
> > dollar sign ($) is obviously needed.  Tried escaping the $ like `\$', but
> > that ..obviously.. didn't work.
> 
> But it seemed ..so.. close, so I tried this:
>       .char \[$] "$
>       Dollar \[$]
> 
> The special character \[$] is defined as the string  "$" .
> NOTE that the  .char  statement _requires_ that the trailing " not be present.

There is already a character escape for the dollar sign.

$ echo 'You are Lobby Lud and I claim my \[Do]5.' | nroff| head -n 1
You are Lobby Lud and I claim my $5.

If compatibility with classical troff is desired,

\(Do

can be used.

-- 
Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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