From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86912 Path: news.gmane.org!not-for-mail From: Philipp Gesang Newsgroups: gmane.comp.tex.context Subject: Re: [luatex-plain] disappearing math-on node Date: Sat, 5 Apr 2014 15:12:39 +0200 Message-ID: <20140405131233.GA16830@acheron> References: <533DD914.2040009@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0393912092==" X-Trace: ger.gmane.org 1396703594 22375 80.91.229.3 (5 Apr 2014 13:13:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2014 13:13:14 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Apr 05 15:13:10 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WWQPD-0003gq-My for gctc-ntg-context-518@m.gmane.org; Sat, 05 Apr 2014 15:13:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4BCD910220 for ; Sat, 5 Apr 2014 15:13:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MpfII8VRPxE3 for ; Sat, 5 Apr 2014 15:13:07 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id AAC4A10221 for ; Sat, 5 Apr 2014 15:13:02 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EC23A101E6 for ; Sat, 5 Apr 2014 15:12:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id O4ldgujDgUCi for ; Sat, 5 Apr 2014 15:12:57 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 082DB101E1 for ; Sat, 5 Apr 2014 15:12:51 +0200 (CEST) Original-Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s35DVWin022331 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 5 Apr 2014 15:31:33 +0200 Original-Received: from ix.urz.uni-heidelberg.de (cyrus-portal.urz.uni-heidelberg.de [129.206.100.176]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s35DCnDD022601 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 5 Apr 2014 15:12:49 +0200 Original-Received: from extmail.urz.uni-heidelberg.de (extmail.urz.uni-heidelberg.de [129.206.100.140]) by ix.urz.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s35DCmbU020723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 5 Apr 2014 15:12:48 +0200 Original-Received: from localhost (stgt-5f716ec6.pool.mediaWays.net [95.113.110.198]) (authenticated bits=0) by extmail.urz.uni-heidelberg.de (8.13.4/8.13.1) with ESMTP id s35DChIP006227 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 5 Apr 2014 15:12:48 +0200 Mail-Followup-To: mailing list for ConTeXt users In-Reply-To: <533DD914.2040009@wxs.nl> X-Operating-System: Linux acheron 3.13.7-1-ARCH User-Agent: Mutt/1.5.23 (2014-03-12) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: =?UTF-8?Q?ip=3D129.206.210.211; _country=3DDE; _region=3DBaden-W=C3=BCrttemberg; _city=3DHeidelberg; _latitude=3D49.4167; _longitude=3D8.7000; _http://maps.google.com/maps=3Fq=3D49.4167,8.7000&z=3D6?= X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01LKdvx2U - ce3bcaa1a509 - 20140405 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:86912 Archived-At: --===============0393912092== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bajzpZikUji1w+G9" Content-Disposition: inline --bajzpZikUji1w+G9 Content-Type: multipart/mixed; boundary="c3bfwLpm8qysLVxt" Content-Disposition: inline --c3bfwLpm8qysLVxt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7 > 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=3Dnode;script=3Dlatn}\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 v= alue) > > > > 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. >=20 > mtxrun --script plain test.tex >=20 > 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=20 \vfill \supereject \end=20 l.17 \bye Though the issue arises only in node mode. > normally the font callback is called on a hlist and there are always=20 > paired math nodes >=20 > (what is line 9616 in the current beta?) Line 9626 with yesterday=E2=80=99s 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 --c3bfwLpm8qysLVxt Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="luatex-fonts-otn.lua_end_of_math.patch" --- luatex-fonts-otn.lua.orig 2014-04-05 15:02:34.711828352 +0200 +++ luatex-fonts-otn.lua 2014-04-05 15:02:36.955171990 +0200 @@ -2375,7 +2375,7 @@ end end start = start.next - elseif id == math_code then + elseif id == math_code and start.subtype == 0 then start = end_of_math(start).next else start = start.next @@ -2567,7 +2567,7 @@ end end start = start.next - elseif id == math_code then + elseif id == math_code and start.subtype == 0 then start = end_of_math(start).next else start = start.next --c3bfwLpm8qysLVxt Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="font-ota.lua_end_of_math.patch" --- font-ota.lua.orig 2014-04-05 14:55:53.789969704 +0200 +++ font-ota.lua 2014-04-05 14:59:32.487654509 +0200 @@ -137,7 +137,7 @@ last[a_state] = s_fina end first, last, n = nil, nil, 0 - if id == math_code then + if id == math_code and current.subtype == 0 then current = end_of_math(current) end end @@ -423,7 +423,7 @@ if first or last then first, last = finish(first,last) end - if id == math_code then + if id == math_code and current.subtype == 0 then current = end_of_math(current) end end --c3bfwLpm8qysLVxt-- --bajzpZikUji1w+G9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAEBCgAGBQJTQAFHAAoJEI7yfcKNwM1+NUUIAMUtfiNfMNGWi5qwjSOUovyj B/intBjYOwRPG8UKa8genJSIY4y5Q0fxXK7AUiHgYFq3hlcOQKOhePxxxjFNSK3B Nps2XDcW5zgpfb0dngYuXuYObWAf9047lSJBFmEMCi/n0VCHMvXgty+boBap7Xv4 DyrYV7CGiifa2g0+QY4jiv5CC2URa1sI1skgU8WT2CiwsEL96QiO2Gd7ToUXCr8T WqgG81kqch89UnF3lhByw8N/YY8p3kX0pav1qgrQcXuAxgQAOJo5lp/p52VtVCAy knWsQCJ8Aqpgyi6WjmJ3ojJQdhc7aCiDJAaVM0cVKzK48jSBZXRNQN9Qp9S783Q= =yqPu -----END PGP SIGNATURE----- --bajzpZikUji1w+G9-- --===============0393912092== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0393912092==--