4

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}

enter image description here

4
  • See github.com/stipub/stixfonts/issues/222. This is problem of Stix Two Math under XeLaTeX. Positioning of subscript is correct with LuaLaTeX. Commented Jun 1, 2022 at 9:13
  • Don't know about XeLaTeX, but after your comment I checked again: (using Texlive 2021 and also Texlive 2022, fully updated). Unfortunately, the problems illustrated in the picture produced by the tex markup in the question remain. It is probably neither Lualatex nor xetex (not sure about the latter) but a font issue, I never used xelatex for anything anyways.
    – balcinus
    Commented Jun 2, 2022 at 11:02
  • @balcibus: I tested XeLaTeX and LuaLaTeX with StixTwo under MikTeX. My book under LuaLaTeX gets few pages shorter than under XeLaTeX. In both cases StixTwo was used. As I wroted earlier positioning of subscripts under XeLaTeX was annoying. Commented Jun 9, 2022 at 2:35
  • Using lualatex version LuaHBTeX, Version 1.14.0 (TeX Live 2022/dev/Debian) , just redownloaded STIX2, the problem is still there
    – am70
    Commented Oct 7, 2023 at 15:38

1 Answer 1

5

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.

enter image description here

% !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}
3
  • 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
    Commented Feb 2, 2021 at 8:33
  • 1
    See github.com/stipub/stixfonts/issues/222. This is problem of Stix Two Math under XeLaTeX. Positioning of subscript is correct with LuaLaTeX. Version 2.20 of Stix Two is expected soon. Commented Jun 1, 2022 at 9:13
  • no. The problem happens also with lualatex. I tested it in different environments. I also tested using overleaf , they use LuaHBTeX, Version 1.16.0 (TeX Live 2023) , it is still wrong
    – am70
    Commented Oct 7, 2023 at 15:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .