Consider this input file (the second line uses U+2019).

```
\input texinfo

c''''

c’’’’

@bye
```

If processed with pdftex (or xetex), everything's fine.  In the first
line, '''' gets resolved into two closing double quotes via TeX's
input ligature mechanism, as expected.  In the second line, the four
U+2019 characters stay as-is.

However, if I say

```
PDFTEX=luatex texi2pdf ...
```

I get incorrect output – as can be seen in the attached image, U+2019
is mapped to ' and TeX's input ligature mechanism unexpectedly kicks
in.  I think this is because luatex is a 'better' TeX than TeX itself:
it completely handles input manipulation before converting stuff to
glyphs.

I suggest the following patch to `texinfo.tex` to fix this – maybe you
find something better.


    Werner


======================================================================


--- texinfo.tex 2024-11-01 05:47:01.000000000 +0100
+++ texinfo.tex.new     2024-11-01 07:44:21.096584941 +0100
@@ -11139,8 +11139,8 @@
   % Punctuation
   \DeclareUnicodeCharacter{2013}{--}%
   \DeclareUnicodeCharacter{2014}{---}%
-  \DeclareUnicodeCharacter{2018}{\quoteleft{}}%
-  \DeclareUnicodeCharacter{2019}{\quoteright{}}%
+  \DeclareUnicodeCharacter{2018}{\kern0pt\quoteleft{}}%
+  \DeclareUnicodeCharacter{2019}{\kern0pt\quoteright{}}%
   \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}%
   \DeclareUnicodeCharacter{201C}{\quotedblleft{}}%
   \DeclareUnicodeCharacter{201D}{\quotedblright{}}%

Reply via email to