[NTG-context] [luatex-plain] disappearing math-on node

Philipp Gesang philipp.gesang at alumni.uni-heidelberg.de
Sat Apr 5 15:12:39 CEST 2014


···<date: 2014-04-03, Thursday>···<from: Hans Hagen>···

> On 4/3/2014 6:29 PM, Dohyun Kim wrote:
> > This is a bug report based on the issue discussed at
> > https://github.com/lualatex/luaotfload/issues/212
> >
> > \font\tenrm{file:lmroman10-regular.otf:mode=node;script=latn}\tenrm
> > \setbox0\vbox{%
> >    x\penalty-10000
> >    $a$x$a$
> > }
> > \unvbox0
> > \setbox0\lastbox
> > \unhbox0
> > \end
> >
> > The plain tex code shown above fails with a lua error:
> > luatex-fonts-merged.lua:9616: attempt to index local 'current' (a nil value)
> >
> > My guess is: as math-on (math-off too) is a "discardable" item after a
> > linebreak, the first math-on node has gone away. So the
> > math-on/math-off pair has become broken, by which the behavior of
> > "node.end_of_math" is confused.
> 
> mtxrun --script plain test.tex
> 
> runs ok here so i need an example that fails with context or luatex-plain

It fails with the luatex-plain format from the minimals as of
yesterday and Luatex 4972:

    error: .../context/tex/texmf-context/tex/context/base/font-ota.lua:144: attempt to index local 'current' (a nil value)
    .
    \bye ^^@-\par 
                \vfill \supereject \end 
    l.17 \bye

Though the issue arises only in node mode.

> normally the font callback is called on a hlist and there are always 
> paired math nodes
> 
> (what is line 9616 in the current beta?)

Line 9626 with yesterday’s code. Attached are patches for
font-ota.lua and luatex-fonts-otn.lua that guard all invocations
of end_of_math() with checks for the subtype.

Best,
Philipp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: luatex-fonts-otn.lua_end_of_math.patch
Type: text/x-diff
Size: 911 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140405/266aec1e/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: font-ota.lua_end_of_math.patch
Type: text/x-diff
Size: 706 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140405/266aec1e/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140405/266aec1e/attachment.pgp>


More information about the ntg-context mailing list