[pdftex] Backtick producing a wrong character code in PDF output

Reinhard Kotucha reinhard.kotucha at web.de
Tue Feb 1 00:28:33 CET 2022

Let me respond to your last two mails here.

You said:

 > If this summary is correct, then the only question left is “how to fix
 > the remaining ½ of the problems” — but this is off-topic here.

Actually the whole discussion is off-topic here.  Replacing ASCII
quotes in your TeX sources by typographic quotes was a decision made
by Donald Knuth and he's using typographic quotes in all his books.

PDFTeX extends Knuth's TeX by adding a backend which produces PDF
instead if DVI.  Otherwise it behaves exactly as Knuth's TeX.  This is
absolutely necessary because macro packages like LaTeX require equal
behavior with all engines.  This is why PDFTeX can't be changed.

The only way to change the behavior is to provide macros as done by
upquote.sty.  I understand the need to use computer code in footnotes
but this is not specific to PDFTeX and you would get more help at
texhax, a mailing list for general questions about TeX and LaTeX:


The problem is that you can't use \verb in footnotes for TeXnical
reasons.  But you can certainly write a macro which allows you to
replace typographic quotes with ASCII quotes.  This is what
upquote.sty does.  It redefines \verb and the verbatim environment but
not \texttt for a good reason.  If you need computer code in footnotes
it's better to ask on texhax.

 >> pdftex does exactly what you tell it.  No more, no less.
  > The developers of a PDF viewer claim otherwise.

They are right.  But it's not PDFTeX, the TeX engine, which should be
changed.  The problem can be fixed at macro level.

  > I do not know enough to argue with them.  Can you please take part
  > in the discussion I mentioned?

No, as far as I understand you want to achieve that the
copy-and-paste function in SumatraPDF silently replaces U+2018
with U+60.  How can U+2018 (a typographic quote) be accessed then?


Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de

More information about the pdftex mailing list.