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

Ilya Zakharevich nospam-abuse at ilyaz.org
Sat Jan 29 05:53:58 CET 2022


On Fri, Jan 28, 2022 at 10:59:20PM +0100, Reinhard Kotucha wrote:
> The distinct behaviour is on purpose.  \verb is for computer code and
> \texttt is for normal text.  If you are writing normal text with a
> typewriter font you want "typograhic" quotes of course.
> 
>  > Moreover, tons of existing documents with code excerpts are written
>  > without using `upquote´.  Should they all be modified to special-case
>  > PDF output?
> 
> Yes, definitely!

Let me try to summarize your arguments:

  • When ` is used as a character in TeX, its usage matches U+2018 most of the time.
  • This includes the use inside \texttt.
  • When the character reaches PDFTeX’s stomach, it cannot distinguish
    the use inside \texttt from the use inside \verb.

And

  • “If this creates bugs when used with out-of-the-box \verb” — tough luck!
  • The package `uptick´ makes it possible to avoid ½ of the problems.

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.

  Anyway: let me try: is there an analogue of `uptick´ which modifies
  	      	      \texttt?

Thanks,
Ilya


More information about the pdftex mailing list.