New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch \symbol
under XeTeX (or fix upstream)
#124
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
@davidcarlisle But |
@davidcarlisle I see no reason why we shouldn't do this
|
@josephwright it isn't really about I don't think this should give an error in xetex (it works in luatex)
|
@davidcarlisle OK, so we mark as 'report elsewhere', prod Arthur/Jonathan about XeTeX, close here as it's Not Our Fault? |
I'm confused. Running the code @davidcarlisle showed above outputs nothing for me (other than the page number) if I use LuaTeX and it makes an error if I use XeLaTeX. And If I replace it with \Uchar the only difference is that then both engines print nothing and no error in math for XeTeX. Outside of math both \char and \Uchar do the same in both engies and print the symbol. |
Maybe the question here is what should be the specification of \symbol if used in math, I mean if your math has 8bit fonts then clearly specifying "1D400 doesn't get you far. |
Amusingly,
\lccode`*="1D400
\lowercase{\show*}
gives the correct output of show (namely a math character) but wrong
output in the "recently read" line, which is actually the CJK letter U+D400:
the character 𝐀.
<recently read> \show 퐀
|
@blefloch well that clearly seems to indicate that something is not quite right on the engine level, but I still wonder if we understand what should be considered "right" in the various cases. |
Inside math cmmi (a legacy font ) is used. This naturally has no glyph in this unicode position. luatex handles this gracefully and simply reports a missing char. Xetex errors. Outside math, when the stix font is used, both show the correct char. Using a legacy font in text mode
works with both engines too (with missing char messages and naturally no output). xelatex fails only in math (and the stix font in the example is actually irrelevant):
|
understood that part, yes. And assuming that the math is not using a legacy font then luatex would print a char? if so I don't quite understand why your suggestion to make |
It certainly avoids the problem, |
with unicode-math luatex prints a char, but xetex still errors.
|
Never really looked into the \Uchar \char specs in the Unicode engines, but do I see it right that in LuaTeX the both are 100% equiv? And that in XeTeX one could always use \Uchar instead of \char? or are there other differences? Because if not, then we could drop \char in Unicode engines by setting |
|
as it's being added to ptex, we could consider adding it to pdftex as well, but I still would say the main issue here is a xetex bug. If we make \symbol latex |
No, they aren't equivalent. Beside ``\Uchar
stretches the first line but not the second. I think |
On 11/30/19 2:12 AM, Marcel Krüger wrote:
I think |\symbol| should definitly give the |\char| behaviour, so if
this is changed to |\Uchar| there should be a special case for symbol 32.
Good catch! But special-casing symbol 32 isn't the answer: instead, just
use |\Ucharcat #1 12 |.
|
@blefloch unless you use the l3 (or ucharcat package) Lua implementation that's not available in luatex. I think we should first try to get |
Even if \char is fixed in XeTeX it will still be wrong on older installs
so rolling forward with latexrelease will not work. We could instead
use \Ucharcat exclusively in XeTeX.
|
This issue has been automatically marked as stale because it has not had recent activity. |
Brief outline of the bug
In XeTeX
\Uchar
should be used instead of\char
in some cases.More details here: latex3/unicode-math#499
Minimal example showing the bug
Log file (required) and possibly PDF file
The text was updated successfully, but these errors were encountered: