[luatex] math font setting

Khaled Hosny khaledhosny at eglug.org
Tue Dec 4 15:44:32 CET 2012


On Tue, Dec 04, 2012 at 10:03:02AM +0100, Herbert Voss wrote:
> Hi all,
> 
> \input luaotfload.sty
> \font\testA={name:TG Pagella Math:mode=base;script=math} at 12pt
> 
> %\Umathspaceafterscript\crampedscriptstyle=1pt
> 
> \textfont0=\testA Pagella:
> $ {1 \over x^2} $
> \bye
> 
> has the output
> 
> -----------------
> This is LuaTeX, Version beta-0.70.2-2012052410 (TeX Live 2012)
>  restricted \write18 enabled.
> (./Namenlos-4.tex
> (/usr/local/texlive/2012/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
> 
> [ ... ]
> 
> ! Math error: parameter \Umathspace_after_script\crampedscriptstyle
> is not set.
> l.7 $ {1 \over x^2} $
> 
> ?
> ------------------
> 
> is that the intended behaviour? Or shouldn't \Umathspaceafterscript
> not set by LuaTeX?

You have to set script and scriptscript fonts as well, else LuaTeX will
be using the old, non-OpenType fonts:

\input luaotfload.sty
\font\testA={name:TG Pagella Math:mode=base;script=math} at 12pt
\font\testB={name:TG Pagella Math:mode=base;script=math;ssty=0} at 12pt
\font\testC={name:TG Pagella Math:mode=base;script=math;ssty=1} at 12pt

\textfont0=\testA \scriptfont0=\testA \scriptscriptfont0=\testA
\Umathcode`x="7"0"1D465
Pagella:
$ {1 \over x^2} $
\bye

Regards,
Khaled


More information about the luatex mailing list