Root index and subscript placement with STIX Two Math Font (Lualatex)

The index spacing is somewhat problematic in STIX Two Math (v2.1) font. It is most evident with the root index, but subscripts are a little to close to the main symbol in my opinion, too. Exponents feel that way, as well. But especially those root indices...

Is there a way to improve it by a setting while loading the font or by other means?

A minimal working example:

% !TeX program = lualatex
\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{STIX Two Math}
\begin{document}

$$\sqrt[q]{a^p} P_k$$

\end{document}


1 Answer

You asked,

Is there a way to improve it by a setting while loading the font or by other means?

I'm not aware of ways to fix the issues you've identified at font loading time.

The amsmath package provides the directives \uproot and \leftroot to tweak the placement of the root index.

% !TeX program = lualatex
\documentclass{article}
\usepackage{amsmath} % for '\uproot' and '\leftroot' directives
\usepackage{unicode-math}
\setmainfont{STIX Two Text}
\setmathfont{STIX Two Math}

\begin{document}
$\sqrt[q]{a^p} P_k$ vs.\
$\sqrt[\uproot{3}\leftroot{-3}q]{a^p} P^{}_k$
\end{document}

• From your suggestion, today, I've learnt \uproot and \leftroot, thanks a lot... to be frank, till date, I didn't know about these...(feel shame on me...). :-( – MadyYuvi Feb 2 at 8:33