[Top][All Lists]

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

Re: [Groff] Underlining in groff

From: Ted Harding
Subject: Re: [Groff] Underlining in groff
Date: Thu, 26 Aug 2010 18:34:58 +0100 (BST)

On 26-Aug-10 13:18:06, Werner LEMBERG wrote:
> [Talking about ul.tmac]
>> The first problem I'm having is that I can't seem to avoid having
>> spaces around my underlined material.  For example:
>> This word is
>> .Underline underlined
>> !
>> This will cause a space to appear between the word "underlined" and
>> the "!"  Do you know of a way that I could avoid this?
> You can't.  I've thus defined a new macro `Underline1' which handles
> trailing punctuation.

In that sort of situation, it usually works to us "\c" to eliminate
extra space introduced by the line break. Here, however, it has a
more interesting effect! Using the existing '.Underline' macro:

This word is
.Underline underlined

does as originally stated: "underlined" is underlined, and there is
a space between it and the following "!". However:

This word is
.Underline underlined\c

has somewhat the effect described below (though "underlined" is
still on the same line), namely "This word is " [including the space]
is underlined. However, "underlined" is not!. (Though now there is
no space between "underlined" ande "!").

>> The second problem is that if the word-wrapping of a paragraph puts
>> the underlined word as the first word on a new output line, the
>> whole previous line gets underlined as well as the specified word.
> Ah, this has escaped my tests.  Thanks for the report.  Attached is a
> new version.  Not yet perfect, but...
>     Werner

In this situation, if you put "\p" following the word preceding
"underlined", i.e. just before the line-wrap occurs, then it is
fine using the original ul.tmac (except for the space before "!").

I have also just tested Werner's Underline1 in his new version
'ul-1.4/ul.tmac'. With:

This word is
.Underline1 underlined

there is still a space between "underlined" and "!". With "\c"
after "underlined" it is the same as before. With extra text to
force word-wrap (and without "\c") it is now just "underlined"
which is underlined, but there is still a space before the "!". 

So it seems it is still not a complete solution!

E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 26-Aug-10                                       Time: 18:34:55
------------------------------ XFMail ------------------------------

reply via email to

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