unicode-math icon indicating copy to clipboard operation
unicode-math copied to clipboard

Re-do radicals setup

Open wspr opened this issue 7 years ago • 3 comments
trafficstars

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

wspr avatar Jun 27 '18 08:06 wspr

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).

eg9 avatar Jun 27 '18 09:06 eg9

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).

wspr avatar Jun 27 '18 11:06 wspr

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 ؇

khaledhosny avatar Jun 27 '18 21:06 khaledhosny