All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Deri <deri@chuzzlewit.myzen.co.uk>
Cc: groff@gnu.org,
	"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: Fri, 22 Jan 2021 09:08:20 +0100	[thread overview]
Message-ID: <CAKgNAkgiF0nbS5Sg3AJNpFgfL-O=cuk7BPB3j3QsKV-ajsVwMA@mail.gmail.com> (raw)
In-Reply-To: <10486111.L9TUC2MGYt@pip>

Hi Deri,

On Thu, 21 Jan 2021 at 18:42, Deri <deri@chuzzlewit.myzen.co.uk> wrote:
>
> 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").

Thanks! That's a helpful explanation!

Cheers,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

  reply	other threads:[~2021-01-22  8:09 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
2021-01-22  8:08       ` Michael Kerrisk (man-pages) [this message]
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='CAKgNAkgiF0nbS5Sg3AJNpFgfL-O=cuk7BPB3j3QsKV-ajsVwMA@mail.gmail.com' \
    --to=mtk.manpages@gmail.com \
    --cc=deri@chuzzlewit.myzen.co.uk \
    --cc=g.branden.robinson@gmail.com \
    --cc=groff@gnu.org \
    --cc=linux-man@vger.kernel.org \
    /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.