[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Smart quotes
From: |
Mark Lawrence |
Subject: |
Re: [Groff] Smart quotes |
Date: |
Tue, 6 Feb 2001 09:45:40 -0600 |
User-agent: |
Mutt/1.2i |
On Tue, Feb 06, 2001 at 02:13:41AM -0500, Peter Schaffter wrote:
>
> I can't believe I'm the first person who's ever wanted/needed
> smart quotes in groff.
>
This is not a pure troff solution, but it may give you some ideas.
I've used a short perl filter to turn typewriter double quotes into
troff double quotes:
#!/usr/bin/perl -p
s/(\S)"/\1''/g;
s/"/``\1/g;
I run my file through this filter before sending it to troff so I can
type as I normally do (using ") while still getting the typeset ouput
I want.
Instead of replacing the " with '' and ``, you could (I think)
replace them with macros or special characters that change their
output depending on the desired style.
--
Mark Lawrence
www.unified-eng.com