unicode-math
unicode-math copied to clipboard
Re-do radicals setup
Description
Radicals are currently set up with:
\tl_set:Nn \l_@@_radicals_tl {\sqrt \longdivision}
This should be done explicitly in unicode-math-table.tex instead.
Check/indicate
- [x] Relevant for XeTeX
- [x] Relevant for LuaTeX
- [x] Issue tracker has been searched for similar issues?
- [x] Links to <tex.stackexchange.com> discussion if appropriate: https://tex.stackexchange.com/a/438180/1090
Minimal example demonstrating the issue
Doesn't work:
\documentclass{article}
\usepackage{unicode-math}
\ExplSyntaxOn
\tl_set:Nn \l__um_radicals_tl {\sqrt\longdivision\cuberoot}
\ExplSyntaxOff
\setmathfont{xits-math.otf}
\begin{document}
Further details
I see that \sqrt, \cuberoot, \fourthroot and \longdivision are marked as \mathopen in unicode-math-tables.tex.
I think that a class marker such as \mathradical should be used (analogously to \mathalpha, \mathfence, \mathaccent, \mathaccentwide and similar new markers).
Exactly my line of thinking :)
Originally unicode-math-table.tex was fairly limited, and the radical code was written very long ago. When I started adding to the "math classes" I never got around to doing the same for the radicals (largely because they're such a small set).
While at it, it would be nice to handle the Arabic versions of \cuberoot and \fourthroot as well:
U+0606 ARABIC-INDIC CUBE ROOT ؆
U+0607 ARABIC-INDIC FOURTH ROOT ؇