groff
[Top][All Lists]
Advanced

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

Re: [Groff] Underlining, again


From: Peter Schaffter
Subject: Re: [Groff] Underlining, again
Date: Fri, 10 Sep 2010 20:40:50 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Sep 10, 2010, Ted Harding wrote:
> I made a serious attempt myself some years ago to try to crack the
> underlining problem. The basic issue, of course, is that .cu, or .ul,
> as you say, simply switches to "underlined font" (which in general
> is italic).
> ...
> One has the feeling that one could reach out and graso it, but it
> always seems to be just a few inches further w=away than the length
> of one's arm ...

True enough.  At one point, I even played around with using sed to
insert underscores under characters and spaces (remember, I'm mostly
interested in solving this issue for simulated typewriter-style
output, so I doesn't have to be pretty) into a completed diversion.
The idea was to write the diversion to a file, then replace every
printable character with
  \Z'<x>'_
and every space with
  \:\Z' '_

Once I figured out how many times to escape the backslash for the
rhs of the sed expression called with .sy (six, in case anyone's
interested), the solution *almost* worked, except that I ended up
with underscored spaces at the start of every line after the first
in multi-line passages.

I then got to wondering if there were a way of establishing where
groff would break lines when a diversion was output.  Something like
.asciify, but instead of returning the diversion to its original
state, it asciified the formatted output line-for-line.  If such a
thing existed, or so I reasoned, I could write a sed expression for
ends of lines as well, and thus trick groff into doing exactly what
I wanted when the diversion was introduced into the output stream.

Sadly, there is no such magical asciify.

-- 
Peter Schaffter

Author of The Binbrook Caucus
http://www.schaffter.ca



reply via email to

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