opensubscriber
   Find in this group all groups
 
Unknown more information…

g : groff@gnu.org 12 September 2007 • 8:48AM -0400

Re: [Groff] hyphen vs. minus sign
by Bruno Haible

REPLY TO AUTHOR
 
REPLY TO GROUP




Tadziu Hoffmann wrote:
> I can't reproduce what you're saying about hyphens vs. minus
> signs with regard to cutting and pasting to the command line.
> I use acrobat reader to view a PDF version of your document.
> When I copy your first example to the command line, my acrobat
> translates the minus signs (internally coded as "AD") to spaces.
> In your second example, the hyphens (coded as "2D") retain their
> encoding as "2D" (hyphen/minus in ASCII) and are thus copied
> correctly to the command line.

Indeed. This mapping of  \-  vs.  -  does not look optimal, regarding
copy&paste.

Input:
                      \-              -
                   MINUS SIGN       HYPHEN

Output with older groff (1.17.2 or so):

groff -Tutf8        U+2212          U+2010
                   MINUS SIGN       HYPHEN

Output with the current groff CVS:

groff -Tutf8        U+2212          U+002D
                   MINUS SIGN     HYPHEN-MINUS

groff -Thtml        U+2212          U+002D
                   MINUS SIGN     HYPHEN-MINUS

groff -Tdvi,        U+002D          U+002D
dvipdf, acroread5,  HYPHEN-MINUS   HYPHEN-MINUS
copy & paste

groff -Tps,         U+00AD          U+002D
ps2pdf, acroread5,  SOFT HYPHEN     HYPHEN-MINUS
copy & paste


So what you can see:

1) - (HYPHEN) does not produce a hyphen character in any of the 4 cases.

2) \- (MINUS SIGN), in the utf8 and html cases, produces a character that
   looks very similar to the one produced by - (HYPHEN) but is not well
   usable in copy&paste (since many programs don't understand U+2212). So
   people conclude that they need to use - (HYPHEN) when they want a
   copy&pastable minus sign.

3) Copy & paste from a PDF document can produce a SOFT HYPHEN.

What sense does this all make??

Sorry for reviving this discussion, but the current status appears worse
than the one in or around 1.17.2.

Bruno



Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.