Hi Ulrike,
On 28 Jun 2019, at 6:27 am, Ulrike Fischer
<[email protected]<mailto:[email protected]>> wrote:
Am Thu, 27 Jun 2019 21:13:05 +0200 schrieb Christian Tellechea:
> there is probably something wrong with XeLaTeX, but I cannot find what.
The difference between xetex and xelatex is the font:
I’m sorry but I don’t understand this as an answer.
I would expect the test of \lastkern to always give n
no matter what the driver, font, with LaTeX or not.
The result from \lastkern (according to the TeXBook)
is that it is only non-zero when the last item on the current list is a kern.
(It is *not* a place-holder for the last kern that has been used.)
Thus the appearance of the letter A should have reset \lastkern to 0,
*except* if there is a kern provided by A itself (font dependent, perhaps yes);
but in that case it is unlikely to have the value of 2019sp .
Of course, maybe this value has been chosen, *because* that font does end with
such a kern.
This would be the only valid reason that you could ever get a y from this
code.
Put another way, the result of the test should not depend upon the initial use
of \kern2019sp at all.
However, if it is commented-out, then XeTeX does give n , so the y is *not*
coming from the letter A .
To me this *does* indicate a bug;
or at least a difference in how XeTeX behaves, compared with the original TeX.
\documentclass{article}
\begin{document}
Should be An: \kern2019sp A\ifnum\lastkern=2019 y\else n\fi\par
\fontencoding{OT1}\selectfont
Should be An: \kern2019sp A\ifnum\lastkern=2019 y\else n\fi\par
\end{document}
or in plain xetex:
Should be An: \kern2019sp A\ifnum\lastkern=2019 y\else n\fi\par
\font\test="[lmroman10-regular.otf]"\test
Should be An: \kern2019sp A\ifnum\lastkern=2019 y\else n\fi\par
\bye
--
Ulrike Fischer
https://www.troubleshooting-tex.de/<https://protect-au.mimecast.com/s/EjjEC4QO8xSlXW8wCxnhXi?domain=troubleshooting-tex.de>
Cheers,
Ross
Dr Ross Moore
Department of Mathematics and Statistics
12 Wally’s Walk, Level 7, Room 734
Macquarie University, NSW 2109, Australia
T: +61 2 9850 8955 | F: +61 2 9850 8114
M:+61 407 288 255 | E: [email protected]<mailto:[email protected]>
http://www.maths.mq.edu.au
[cid:[email protected]]
CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.
This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University. <http://mq.edu.au/>
<http://mq.edu.au/>