groff
[Top][All Lists]
Advanced

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

RE: [Groff] explicit hyphen and numbers


From: Ted Harding
Subject: RE: [Groff] explicit hyphen and numbers
Date: Thu, 10 Aug 2006 14:47:00 +0100 (BST)

On 10-Aug-06 Werner LEMBERG wrote:
> 
> Folks,
> 
> 
> Urs showed up an interesting problem in groff: A hyphen between two
> numbers does *not* insert a breakpoint!  To be more specific, the
> .cflags values 2 and 4 of a character x are only active if the
> characters before and after x both have non-zero hyphenation codes (as
> set with the `hcode' request).
> 
> Since it isn't possible to set the hcode value for numbers, things
> like `200-400' are never hyphenated.  To force a break you have to
> insert a zero-width breakpoint: `200-\:400'.
> 
> I'll document this properly, but I wonder whether this behaviour
> should be changed.  For example, I could add a new `.cflags' value to
> ignore the surrounding hyphenation codes.  On the other hand, until
> now there has never been a complaint...
> 
> 
>     Werner

[Though I composed a reply it does not seem to have been sent and
has disappeared from my system ... here's another try!]

I can't think of a context where a true hyphen between numbers
could be accetably broken.

I'm excluding cases where a number-range is implied, as in

  Items 2-7

since this should properly be represented by an en-dash (with or
without padding), as in

  2\(en7   2\^\(en\^7   1\(en\^8

and cases where it really means a minus sign (for similar reasons).
And, in any case, where these are the meanings you don't want a
break anyway.

The only kind of thing I can think of where a hyphen between
numbers is appropriate is like

  Items item2-1 item2-2 item2-3 item 3-1 item3-5 ...

and again I can't imagine that a break at a hyphen would be
acceptable. Wouldnt it look just awful:

  ............. item3-
-1


If anyone can think of a context where a hyphen break between
two numbers is OK, I'd be very interested to hear of it!

And, if the exceptions are so special, then I'm sure that
Werner's workround of "\:" should be acceptable, since people
are not going to need it all that pften.

Meanwhile, I'm comforted that groff's behavious will prevent
me from getting unwanted hyphen breaks.

Best wishes to all,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 10-Aug-06                                       Time: 14:46:56
------------------------------ XFMail ------------------------------




reply via email to

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