groff
[Top][All Lists]
Advanced

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

Re: [Groff] Re: Readability of troff documents


From: Andreas Kähäri
Subject: Re: [Groff] Re: Readability of troff documents
Date: Fri, 23 May 2003 09:21:50 +0100
User-agent: Mutt/1.4.1i

On Fri, May 23, 2003 at 10:01:46AM +0200, Werner LEMBERG wrote:
> > Is there a way (other than preprocessing through some sed
> > filter) of inserting these the way they're inserted in
> > LaTeX? Ie:
> > 
> > em dash is ---
> > en dash is --
> 
> Unfortunately no.  The ligatures possible are fi, fl, ff, ffi, and
> ffl.  It needs a non-trivial extension to handle more.  Sigh.  Time,
> time, time.

It is fairly easy to write a sed script to do a pre-processing
step.

sed -f fix_things.sed my_doc.mm | groff as usual on stdin >paper.ps

where 'fix_things.sed' looks like

s/---/\\[em]/g
s/--/\\[en]/g
s/ffi/\\[Fi]/g
s/ffl/\\[Fl]/g
s/fi/\\[fi]/g
s/fl/\\[fl]/g
s/ff/\\[ff]/g
# etc. (just make sure long substitutions comes before shorter
# ones, e.g. so that --- doesn't turn into "\[em]-")


Untested, from the top of my head...

-- 
Andreas Kähäri
Essex, England

reply via email to

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