Thread (9 messages) 9 messages, 4 authors, 2021-03-07

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

From: G. Branden Robinson <hidden>
Date: 2021-01-22 17:04:12

Hi Deri!

At 2021-01-22T16:27:38+0000, Deri wrote:
On Friday, 22 January 2021 03:56:00 GMT G. Branden Robinson wrote:
quoted
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help