6

I am using XITS to typeset math, but I have noticed that whitespace in fractions gets larger due to subscripts. The minimal example (typesetted with XeLaTex):

\documentclass[11pt]{article} 
\usepackage{unicode-math}
\setmainfont[Mapping=tex-text]{XITS}
\setsansfont{XITS}
\setmathfont{XITS Math}

\begin{document}
\begin{equation}
\frac{\partial V}{\partial I} = \frac{\partial V_{k,l}}{\partial I}
\end{equation}
\end{document}

gives me this:

enter image description here

but I would like the symbols to stay on the same level such as with default math:

enter image description here

How can this be fixed in XITS?


Update: Instead of XITS, I have tried using STIX with pdflatex, xelatex and lualatex. I have also tried XITS with lualatex and the result is always the same. As suggested by @Ruben, I have also tried using

\fontdimen16\textfont2=0pt
\fontdimen17\textfont2=0pt
\begin{equation}...

which ameliorates the situation

enter image description here

but the difference is still rather noticeable. Going to negative values gives the same result as 0pt and I cannot seem to be able to bring \fontdimen19 to yield any effect.

Is there a better fix?

Void
  • 195

1 Answers1

4

The main problem is that with this font the subscript sits rather deep. You can try to hide this depth with \smash, with lualatex you can also move the subscript a bit up -- but you should test how this looks with other characters. (It is certainly also possible with xelatex, but it is too late to look up the fontdimen numbers):

\documentclass[11pt]{article}
\usepackage{unicode-math}
%\setmainfont[Mapping=tex-text]{XITS}
%\setsansfont{XITS}
\setmathfont{XITS Math}
\begin{document}

\begin{equation}
 \frac{\partial V}{\partial I} = \frac{\partial V_{k,l}}{\partial I}
\end{equation}

\begin{equation}
 \frac{\partial V}{\partial I} = \frac{\partial V_{\smash{k,l}}}{\partial I}
\end{equation}

\begin{equation}
 \frac{\partial V}{\partial I} = \frac{\partial \smash{V_{k,l}}}{\partial I}
\end{equation}


\Umathfractionnumvgap\displaystyle=0pt
\Umathsubshiftdown\textstyle 1pt
\begin{equation}
\frac{\partial V}{\partial I} = \frac{\partial V_{k,l}}{\partial I}
\end{equation}
\end{document}

enter image description here

Ulrike Fischer
  • 327,261