[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] hyphen, minus sign and hyphen-minus
From: |
Deri James |
Subject: |
Re: [groff] hyphen, minus sign and hyphen-minus |
Date: |
Sat, 26 May 2018 13:03:33 +0100 |
User-agent: |
KMail/4.14.10 (Linux/4.4.114-desktop-1.mga5; KDE/4.14.35; x86_64; ; ) |
On Sat 26 May 2018 11:50:31 Ralph Corderoy wrote:
> Hi Deri,
>
> > man -Tpdf will produce what you want. The '\-' (minus) is used as the
> > output glyph, but any copy/paste (or searching within document) will
> > use '-' (hyphen).
> >
> > This is similar to the treatment of ligatures. If you look at the
> > groff pdf output of the "find" man page you will see that "fi" has
> > been replaced with a ligature in the output, but if you cut and paste
> > the two characters “fi" are returned, and you can search for "find".
>
> For those of us that don't know PDF, how is this achieved? Is it the
> PDF viewer that's translating to try and be helpful, assuming we don't
> want the ligature, and thus vary by viewer, or the PDF itself that
> states this should happen? What if I do want to paste the ligature in
> `groff'?
Hi Ralph,
The "-u" flag for gropdf allows you to specify your own CMap which contains
the information on glyph mapping. The default if you don't use the flag is:-
===========================================================================
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000> <FFFF>
endcodespacerange
2 beginbfrange
<008b> <008f> [<00660066> <00660069> <0066006c> <006600660069> <00660066006C>]
<00ad> <00ad> <002d>
endbfrange
endcmap
CMapName currentdict /CMap defineresource pop
end
end
===========================================================================
The section starting "beginbfrange" specifies the glyph to character mapping.
The first two numbers are a start and end pair followed by the mapping you
would like to use for each glyph in the range. If you include the flag "-u" on
its own the default is not included so you could cut and paste the ligatures
if you wanted.
Cheers
Deri
- [groff] hyphen, minus sign and hyphen-minus, Pali Rohár, 2018/05/25
- Re: [groff] hyphen, minus sign and hyphen-minus, Ingo Schwarze, 2018/05/25
- Re: [groff] hyphen, minus sign and hyphen-minus, Pali Rohár, 2018/05/25
- Re: [groff] hyphen, minus sign and hyphen-minus, Deri James, 2018/05/25
- Re: [groff] hyphen, minus sign and hyphen-minus, Ralph Corderoy, 2018/05/26
- Re: [groff] hyphen, minus sign and hyphen-minus, Pali Rohár, 2018/05/26
- Re: [groff] hyphen, minus sign and hyphen-minus,
Deri James <=
- Re: [groff] hyphen, minus sign and hyphen-minus, Pali Rohár, 2018/05/26
- Re: [groff] hyphen, minus sign and hyphen-minus, Deri James, 2018/05/28
- Re: [groff] hyphen, minus sign and hyphen-minus, Ralph Corderoy, 2018/05/29
- Re: [groff] hyphen, minus sign and hyphen-minus, Ingo Schwarze, 2018/05/27
- Re: [groff] hyphen, minus sign and hyphen-minus, Pali Rohár, 2018/05/27
- Re: [groff] hyphen, minus sign and hyphen-minus, Ingo Schwarze, 2018/05/27
- Re: [groff] hyphen, minus sign and hyphen-minus, Pali Rohár, 2018/05/28
- Re: [groff] hyphen, minus sign and hyphen-minus, Pali Rohár, 2018/05/28
- Re: [groff] hyphen, minus sign and hyphen-minus, Pali Rohár, 2018/05/28
- Re: [groff] hyphen, minus sign and hyphen-minus, Mike Bianchi, 2018/05/28