[luatex] Question about tex.setmath(..., ..., ...) [hope this is the right list]

Graham Douglas graham.douglas at readytext.co.uk
Mon Jul 18 23:49:46 CEST 2016

Hi All

I'm exploring LuaTeX's OpenType maths capabilities and have a question
about tex.setmath(...,...,...). A minimal working example is below.

Note, it's my own custom (La)TeX setup, not a standard distribution,
which I setup a few days ago using the latest versions of everything
from CTAN. It all works fine, maths typesetting in Cambria Math looks
great apart from some spacing tweaks I want to make.

luaotfload: 2016/06/16 v2.7
unicode-math 2015/09/24 v0.8c

I'm on Windows 7 using LuaTeX, Version 0.96.0 (TeX Live 2016) which I
compiled from source code.

My question is:

I can't get tex.setmath(...,...,...) to work and am stumped why---maybe
I misunderstand its use. In the example below, if I use


in the maths, it works fine and adjusts the spacing nicely (see second
equation in PNG file). However, if I try to apply these settings
globally via:

tex.setmath("global", "fractionnumup", "text", 131072)
tex.setmath("global", "fractionnumvgap", "text", 163840)

then the spacing is not changed. See first equation in the attached PNG
file (which is the output of the minimal example).

What am I doing wrong, or what have I failed to understand? (Note, also
tested the above with a recent build of experimental version, 0.97, but
same result)

Many thanks for any help.


Minimal working LaTeX example:
tex.outputmode = 1
\edef\pdfminorversion{\pdfvariable minorversion}
\def\IHb#1{{\hskip-#1bp\relax}} %kludge to fix spacing around limits on
integrals (to explore cause!)
\setmathfont{Cambria Math}

% This works perfectly:

% This does not, even if I put \directlua{} into the math code to ensure
math mode
tex.setmath("global", "fractionnumup", "text", 131072)
tex.setmath("global", "fractionnumvgap", "text", 163840)

\[    \int_{\IHb{3}a}^{\IHb{1.5}b}u\frac{d^2v}{dx^2}\,dx

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mathsquestion.png
Type: image/png
Size: 26859 bytes
Desc: not available
URL: <http://tug.org/pipermail/luatex/attachments/20160718/76bb94c6/attachment-0001.png>

More information about the luatex mailing list