It's a bug in unicode-math-luatex
: if you try
\documentclass{article}
\usepackage{unicode-math}
\setmathfont[Scale=2.8]{latinmodern-math.otf}
\begin{document}
\[\nu_e + \beta^+\]
\end{document}
you get
![LuaTeX output](https://cdn.statically.io/img/i.sstatic.net/pcQgq.png)
with LuaLaTeX, while you get the expected
![XeTeX output](https://cdn.statically.io/img/i.sstatic.net/RTB04.png)
with XeLaTeX.
If I add \showthe\Umathsupshiftup\displaystyle
in the formula, I get 3.62994pt
with LuaLaTeX and \showthe\fontdimen13\textfont2
gives 3.63pt
with XeLaTeX.
When I use \showlists
, the box where the superscript is typeset is
.\hbox(11.42676+1.6268)x15.80873, shifted -3.62994, direction TLT
..\EU2/latinmodern-math.otf(0)/m/n/6.99997 +
with LuaLaTeX, while it is
.\hbox(11.42676+1.6268)x15.74875, shifted -10.16402
..\EU1/latinmodern-math.otf(0)/m/n/6.99997 glyph#12
with XeLaTeX. Since
10.16402/2.8 = 3.63001
the conclusion is that LuaLaTeX doesn't apply the scaling to the math font parameters,
Notice that this seems restricted to superscripts, because the box with the subscript is
.\hbox(8.66316+0.2156)x13.82913, shifted 5.22322, direction TLT
..\EU2/latinmodern-math.otf(0)/m/n/6.99997 𝑒
in LuaLaTeX and
.\hbox(8.66316+0.2156)x13.76915, shifted 6.916
..\EU1/latinmodern-math.otf(0)/m/n/6.99997 glyph#1354
with XeLaTeX; still a difference, but much less noticeable (XeLaTeX seems wrong in this respect, because it seems to assume the presence of a superscript; the placement is the same if \nu^{}_e
is used).
It doesn't seem to depend on the font, because the same problem shows with XITS Math or Asana Math.
If I use
\documentclass{article}
\usepackage{unicode-math}
\setmathfont[Scale=2.8]{latinmodern-math.otf}
\makeatletter
\AtBeginDocument{%
\check@mathfonts
\Umathsupshiftup\displaystyle=10.16402pt
}
\begin{document}
\[
\nu_e + \beta^+_{}
\]
\end{document}
the output is correct
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/tg5Tq.png)
Of course this is just a hack.