groff
[Top][All Lists]
Advanced

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

Re: [Groff] strike through fonts?


From: Greg 'groggy' Lehey
Subject: Re: [Groff] strike through fonts?
Date: Sun, 10 Nov 2002 15:04:29 +1030
User-agent: Mutt/1.4i

On Saturday,  9 November 2002 at  9:18:08 -0800, Larry McVoy wrote:
> Hi, I'm using groff to work on legal docs with lawyers and they want
> old/new markups where they can see what the old stuff was but it is
> struck through like Word does.
>
> I've developed formatting tools which take troff input and reformat
> things such that each sentence starts on a new line and is formatted
> to the same length where possible.  So I can format the new/old input
> and diff that to get sentence based diffs.  For the strike through
> stuff I'll make a version which formats on word boundaries so we get
> word based diffs.
>
> My thought was to post process the diff output, eating both the old
> and new and use a different font for the old, a font which has all
> the characters with a horizontal line through the width of the char.
>
> Do you see what I am trying to do?  Is there a better way to do it?
>
> Maybe this is a more clear way to ask the question:
>
>     Suppose I had a sequence of words in the form
>
>       unchanged
>       unchanged
>       old | new
>       unchanged
>       unchanged
>       old | new
>       unchanged
>
>     How do I make troff take that input and produce the "old" with a
>     horizontal line through it and "new" underlined?

Try this macro for size:

.de overstrike
.nr width \w'\\$1'
\\$1\v'-.25v'\h'address@hidden@u'\l'address@hidden@u'\v'.25v'
..
For your example above, you'd write:

unchanged
unchanged
.overstrike old 
new

etc.

Greg
--
Finger address@hidden for PGP public key
See complete headers for address and phone numbers

reply via email to

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