# Using Libertinus Math and XeTeX, binomial coefficients don't diplay correctly in inline mode

I'm using Libertinus Math as my math font in XeTeX, and $\binom{n}{k}$ gives me a binomial coefficient in which the lower entry (k) sticks out below the parentheses. Display math works fine [ \binom{n}{k} ] looks perfect.

Switching to another font (eg, Tex Gyre Pagella Math) solves the problem, but I don't want Pagella, I want Libertinus.

Any ideas on how I can fix this? I tried redefining \binom using the \genfrac command, but I got the same results:

\renewcommand{\binom}{\genfrac{(}{)}{0pt}{}} %This looks identical to standard \binom.


MWE:

\documentclass{article}

\usepackage{amsmath}
\usepackage{fontspec}
\usepackage[math-style=ISO,bold-style=ISO]{unicode-math}
\defaultfontfeatures{Ligatures=TeX,Numbers=OldStyle}
\setmainfont{Libertinus Serif}
\setsansfont{Libertinus Sans}
\setmathfont{Libertinus Math}
\setmonofont{Libertinus Mono}

\begin{document}

This  $\binom{n}{k}$ looks goofy, while $\binom{n}{k}$ looks perfect.

\end{document}

• Works well with LuaLaTeX – egreg Jun 13 at 19:17
• you could use $n \choose k$ as a workaround, (the original looks better in luatex than xetex) but I'd need to trace what's happening. in recent years amsmath re-implements genfrac in xetex/luatex to work around missing parameters in opentype math, not sure if that implementation s wrong or it's a font issue I had some difficulty getting \binom to work at all. – David Carlisle Jun 13 at 19:18
• Hmm, using LuaLaTex on my MWE I get errors thrown by fontenc and fontspec. First error is: Font \TU/lmr/m/n/10=[lmroman10-regular]:+tlig; at 10pt not loadable: metric data not found or bad. \fontencoding \encodingdefault\selectfont (I don't use LuaLaTeX nomally, I have no idea what is going wrong.) – user23924 Jun 13 at 19:27