From: Deri <deri@chuzzlewit.myzen.co.uk>
To: groff@gnu.org
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
"G. Branden Robinson" <g.branden.robinson@gmail.com>,
linux-man <linux-man@vger.kernel.org>
Subject: Re: Escaping hyphens ("real" minus signs in groff)
Date: Thu, 21 Jan 2021 17:42:52 +0000 [thread overview]
Message-ID: <10486111.L9TUC2MGYt@pip> (raw)
In-Reply-To: <a1af3f5c-f3e9-4bf3-cad5-389571c45d27@gmail.com>
On Thursday, 21 January 2021 11:03:13 GMT Michael Kerrisk (man-pages) wrote:
> > And I mean copy-and-paste not just from PDF but from a terminal window.
>
> Yes, but I have a question: "\-1" renders in PDF as a long dash
> followed by a "1". This looks okay in PDF, but if I copy and paste
> into a terminal, I don't get an ASCII 45. Seems seems to contradict
> what you are saying about cut-and-paste above. What am I missing?
If I do:-
echo "- \- \[fi]"|groff -Tpdf | okular -
I see a hyphen, minus and fi ligature. Copying to a text document gives hyphen
hyphen f i. The reason is because gropdf adds a ToUnicode CMAP entry to fonts
which used the text.enc encoding when created with afmtodit. You can see a
difference if you run:-
echo "- \- \[fi]"|groff -Tpdf -P-u | okular -
Which prevents the CMAP entry, and when you copy to text the minus unicode cha
character is seen. (On my system the fi ligature is separated into f i still
but I suspect that is KDE being "helpful").
Cheers
Deri
next prev parent reply other threads:[~2021-01-21 18:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 21:03 Escaping hyphens ("real" minus signs in groff) Michael Kerrisk (man-pages)
2021-01-21 6:12 ` G. Branden Robinson
2021-01-21 11:03 ` Michael Kerrisk (man-pages)
2021-01-21 17:42 ` Deri [this message]
2021-01-22 8:08 ` Michael Kerrisk (man-pages)
2021-01-22 3:56 ` G. Branden Robinson
2021-01-22 16:27 ` Deri
2021-01-22 17:02 ` G. Branden Robinson
2021-03-07 0:06 ` Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10486111.L9TUC2MGYt@pip \
--to=deri@chuzzlewit.myzen.co.uk \
--cc=g.branden.robinson@gmail.com \
--cc=groff@gnu.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.