Open SainoNamkho opened 2 years ago
I have a related but opposite issue when unicode-math 0.8q (2020/01/31) is used with XeTeX 3.141592653-2.6-0.999995 or LuaHBTeX 1.17.0 shipped with TeX Live 2023. If I specify range={up, X}
, where X
is from the following table, up
is ignored:
codepoints | characters |
---|---|
U+00391–U+003A1, U+003A3–U+003A9 | Α–Ω |
U+003B1–U+003C9 | α–ω (incl. ο, ς) |
U+003F4 | ϴ |
U+02202 | ∂ |
U+02207 | ∇ |
U+1D434–U+1D44D | 𝐴–𝑍 |
U+1D44E–U+1D454, U+1D456–U+1D467 | 𝑎–𝑔, 𝑖–𝑧 |
U+1D6E2–U+1D6FA | 𝛢–𝛺 (incl. 𝛩, 𝛳) |
U+1D6FC–U+1D714 | 𝛼–𝜔 (incl. 𝜍, 𝜎) |
Here is the script that prints out each offending codepoint. Be warned that it may take days to loop through all the codepoints:
import os
import subprocess
latex = 'xelatex' # or 'lualatex'
doc1 = r'''
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{XITS Math}
\setmathfont{TeX Gyre Termes Math}[range={up, "
'''.strip('\n')
doc2 = r'''
}]
\begin{document}
$\symup{ABC}$
\end{document}
'''.strip('\n')
for code in range(0x20000):
char = chr(code)
hex = f'{code:05X}'
uni = f'U+{hex}'
try:
subprocess.run(
[latex, f'--jobname={uni}'],
check=True, input=doc1+hex+doc2, stdout=subprocess.DEVNULL,
encoding='utf8')
result = subprocess.run(
['pdffonts', f'{uni}.pdf'],
check=True, capture_output=True, encoding='utf8')
if 'TeXGyreTermesMath' not in result.stdout:
print(uni, char, flush=True)
except:
print(uni, char, 'error', flush=True)
finally:
os.remove(f'{uni}.log')
os.remove(f'{uni}.aux')
os.remove(f'{uni}.pdf')
Description
A sentence or two describing the issue.
Add info or delete as appropriate:
https://tex.stackexchange.com/questions/597185/range-option-not-working-properly-in-setmathfont https://tex.stackexchange.com/questions/348481/when-specifying-a-character-in-unicode-maths-range-option-why-are-alternativ
Minimal example demonstrating the issue
The font for numbers is not set.
If add something to the range
"0391-"03A1,"03A3-"03AF,"03B1-"03BF,"03F4,"2202,"2207,"1D434-"1D454,"1D456-"1D467,"1D6E2-"1D6FA,"1D6FC-"1D714
Further details
U+1D455 is not defined, mathmatical h is at U+210E (not working)