[pdftex] Backtick producing a wrong character code in PDF output
Ilya Zakharevich
nospam-abuse at ilyaz.org
Fri Jan 28 23:48:43 CET 2022
On Fri, Jan 28, 2022 at 10:59:20PM +0100, Reinhard Kotucha wrote:
> > Did you notice that I do not complain about “the shape of the glyph”?
> > I discuss only how cut-and-paste, search etc. would behave.
> >
> > (It seems that Adobe Acrobat is special-casing font “Tt”. Should
> > not PDFTeX do this instead when it marks glyphs with character
> > codes in PDF?)
>
> You can't cut-and-paste to pdftex.
And I never said I do this. Since it seems that I was not clear: I’m
discussing the following pipeline:
A snippet of code in TeX document.
↓
PDFTeX converts it to PDF document (with glyphs — ignored below — and character codes).
↓
A PDF viewer uses these character codes for copy&paste and search.
① On the first arrow: apparently, PDFTeX creates wrong character codes (by default).
② On the second arrow: Adobe Acrobat seems to have workarounds against
these bugs in PDFTeX. However, as the discussion I referred to
shows, it seems that a lot of other PDF viewers take what PDFTeX
produces LITERALLY, without workarounds.
The result: the PDF viewers do not allow copy&paste of code
fragments, and a correct search in these fragments.
> pdftex does exactly what you tell it. No more, no less.
The developers of a PDF viewer claim otherwise. I do not know enough
to argue with them. Can you please take part in the discussion I mentioned?
> The distinct behaviour is on purpose. \verb is for computer code and
> \texttt is for normal text.
If you say that \textt is “for normal text”, then what do I use for
code fragments in (say) footnotes?
Thanks,
Ilya
More information about the pdftex
mailing list.