groff
[Top][All Lists]
Advanced

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

Re: [Groff] Smart quotes


From: Peter Schaffter
Subject: Re: [Groff] Smart quotes
Date: Tue, 6 Feb 2001 21:49:18 -0500
User-agent: Mutt/1.2.5i

On Tue, Feb 06, 2001, Werner LEMBERG wrote:
> 
> > I'd like to write a macro that gets invoked *inline* with
> > the " character ( .char " \*[QUOTE_MACRO] ).  QUOTE_MACRO would
> > evaluate whether " was an open-quote or a close-quote, and
> > substitute `` or '' accordingly.

> What about this:
> 
> .ds quote0 ``
> .ds quote1 ''
> .nr start-or-end 0
> .
> .char " \\*[quote\\n[start-or-end]]\R'start-or-end (1 - \\n[start-or-end])'
> .

Ah.  Exactly what I needed.  I wasn't seeing my way past the
(perceived) need to do this in a macro.  Your solution is
elegant.  Thanks.
 
> If you need more sophisticated stuff you should rather use TeX which
> has full active character support.

No, I prefer groff, which isn't so bloated.  Actually, it's
superior in some ways, especially for people who've been in
commercial typesetting for a while.

> For reasons unknown to me,
> processing of macros in character definition is intentionally
> disabled.  Has someone more background info about this?

I've always wondered about that, too.  It's an onerous burden,
not being able to process macros in character defs.  Think how
groff would fly if you could do that!

-- 
PTPi
Peter Schaffter
15, chemin Brunette, RR2 CP 406
Ste-Cécile-de-Masham (Québec)
CANADA  J0X 2W0

A confirmed GNU/Linuxer. Sorry, I don't do Windows.

reply via email to

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