groff
[Top][All Lists]
Advanced

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

Re: Escaping hyphens ("real" minus signs in groff)


From: G. Branden Robinson
Subject: Re: Escaping hyphens ("real" minus signs in groff)
Date: Sat, 23 Jan 2021 04:02:19 +1100
User-agent: NeoMutt/20180716

Hi Deri!

At 2021-01-22T16:27:38+0000, Deri wrote:
> On Friday, 22 January 2021 03:56:00 GMT G. Branden Robinson wrote:
> > The gap between aspiration and implementation.  I don't think the
> > "copy-and-paste from PDF to terminal window" matter is completely
> > sorted out yet.
> 
> Hi Branden,
> 
> I can't seem to make this not work. In my last email I explained how a
> default ucmap is installed in the pdfs produced by gropdf, so assuming
> the pdf viewer supports the pdf standard it should not require a
> change to the man macros you favour. I have tested using 'xpdf' as the
> viewer which pastes:-
> 
> - − fi <== without ucmap
> - - fi        <== with ucmap
> 
> Of course, if the pdf is produced by using grops and ghostscript the
> result will be the same as using gropdf with no ucmap, i.e. '-' and
> '\-' will be pasted as different characters.

You're right!  It works for me with both evince (my usual viewer) and
xpdf as it does for you.  I had had a problem with PDF man pages in the
past but couldn't remember clearly what it was, and had thought it was
this.

But I was able to copy-and-paste and run the "ls -l" from the attached
trivial man page from the PDF without trouble:

$ groff -Tpdf -man hyphen-minus.man > hm.pdf
$ evince hm.pdf

This is actually a relief to me.  I feared that special-casing the \-
would become a camel's nose that would support the recent lobbying
effort for permanent degradation of traditional *roff glyphs to ASCII
"just for man pages".

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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