Re: [NTG-context] [luatex-plain] disappearing math-on node
···date: 2014-04-06, Sunday···from: Hans Hagen··· On 4/5/2014 3:12 PM, Philipp Gesang wrote: ···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-1 $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. I think that the removed math node is a bad thing so that will change in a next luatex release (i tested a patch but it will not go in the tl release). (Just like the math node at the end of a line it will have zero surround in order to make the backend happy.) I’d be interested in testing the patch as well. In order to avoid the 'current' issue I'll use an overload of end_of_math in the generic code. The real solution is to make the built-in end_of_math more strict (trivial patch ready and tested so that can end up in the next luatex). In the context code i won't intercept it because end_of_math will do that at some point. Good news. Though I’m a little worried about the fontloader in Context and the generic format diverging too much. Thanks for looking into this, Philipp pgpTujGgc2Gcn.pgp Description: PGP signature ___ 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 ___
[NTG-context] page reference to figure fails when figure location is none
Using a recent MkIV beta (2014.03.27), it seems that a page reference to a figure fails if the figure location is none. Here is a minimal example: \starttext \input knuth \placefigure[none][regularref]{}{\pagereference[workaroundref] \externalfigure[cow.pdf]} \input knuth See \at{page}[workaroundref] or \at{page}[regularref] \stoptext The log file has references unknown reference '[][regularref]' and the .pdf file has See page 1 or page ?? That is, the \at{page}[regularref] doesn't work. (But the workaround reference does work.) If the figure's location key is changed from none to nonumber or just deleted, then the regularref page reference works. It also works with MkII (with or without none), so I am guessing that it is a bug in MkIV. -Sanjoy ___ 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 ___
Re: [NTG-context] page reference to figure fails when figure location is none
On 4/6/2014 12:14 PM, Sanjoy Mahajan wrote: Using a recent MkIV beta (2014.03.27), it seems that a page reference to a figure fails if the figure location is none. Here is a minimal example: \starttext \input knuth \placefigure[none][regularref]{}{\pagereference[workaroundref] \externalfigure[cow.pdf]} \input knuth See \at{page}[workaroundref] or \at{page}[regularref] \stoptext The log file has references unknown reference '[][regularref]' and the .pdf file has See page 1 or page ?? That is, the \at{page}[regularref] doesn't work. (But the workaround reference does work.) If the figure's location key is changed from none to nonumber or just deleted, then the regularref page reference works. It also works with MkII (with or without none), so I am guessing that it is a bug in MkIV. more a side effect .. in mkii we store refs independently, in mkiv they can also travel with other properties (like lists and here we have no list entry in the next beta this will work ok \starttext \placefigure [none] [regularref-1] {} {\hbox{\pagereference[workaroundref-1]\externalfigure[cow.pdf]}} \placefigure [here] [regularref-2] {} {\hbox{\pagereference[workaroundref-2]\externalfigure[cow.pdf]}} See \at{page}[workaroundref-1] or \at{page}[regularref-1] See \at{page}[workaroundref-2] or \at{page}[regularref-2] \blank \placelist[figure][criterium=text] \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] page reference to figure fails when figure location is none
Hans Hagen pra...@wxs.nl writes: more a side effect .. in mkii we store refs independently, in mkiv they can also travel with other properties (like lists and here we have no list entry in the next beta this will work ok That make sense. I will try it out. I have found a few other buglets with placefigure for which I will make minimal examples. -- -Sanjoy ___ 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 ___
[NTG-context] \placefigure and title bug in latest beta
Hans-- In today's beta, the following produces a figure entitled Figure 1 title: \setupexternalfigures[location={local,default}] \starttext \useexternalfigure[cow.pdf] \startplacefigure[title={A cow}] {\externalfigure[Graphic][cow.pdf]} \stopplacefigure \stoptext Alan ___ 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 ___
Re: [NTG-context] [luatex-plain] disappearing math-on node
···date: 2014-04-06, Sunday···from: Hans Hagen··· On 4/5/2014 3:12 PM, Philipp Gesang wrote: ···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-1 $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. I think that the removed math node is a bad thing so that will change in a next luatex release (i tested a patch but it will not go in the tl release). (Just like the math node at the end of a line it will have zero surround in order to make the backend happy.) In order to avoid the 'current' issue I'll use an overload of end_of_math in the generic code. The real solution is to make the built-in end_of_math more strict (trivial patch ready and tested so that can end up in the next luatex). With experimental revision 4974 the bug is gone. Thanks! Philipp pgpWF8OKID9U5.pgp Description: PGP signature ___ 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 ___
Re: [NTG-context] \placefigure and title bug in latest beta
Hi, I can confirm this… This is probably due to the new features Hans added today. Also, the new feature \placelist[figure][criterium=text] places indeed the list of the figures, but the names of the figures, or rather their captions are all indicated by the word « list ». Best regards: OK On 6 avr. 2014, at 16:26, Alan Bowen bowenala...@gmail.com wrote: Hans— In today’s beta, the following produces a figure entitled “Figure 1 title”: \setupexternalfigures[location={local,default}] \starttext \useexternalfigure[cow.pdf] \startplacefigure[title={A cow}] {\externalfigure[Graphic][cow.pdf]} \stopplacefigure \stoptext Alan ___ 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 ___ ___ 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 ___
[NTG-context] three long-standing issues
Hans, the following sample shows three long-standing issues with ConTeXt (I’m afraid they might be bugs): \definestructureconversionset[chapternumbers][0,I,a,n,g][n] \setupheads[sectionconversionset=chapternumbers] \setupsectionblock[bodypart][page=no] \setupheadertexts[chapter] \setupinteraction[state=start] \placebookmarks[chapter] \starttext \chapter{\TeX} \input knuth\par \startfrontmatter \dorecurse{5}{\chapter{Front matter} \input zapf\par} \stopfrontmatter \startbodymatter \dorecurse{5}{\chapter{Body matter} \input zapf\par} \stopbodymatter \stoptext 1. PDF bookmarks don’t contain Roman capital numerals (as I think they should). 2. \setupsectionblock[...][page=no] causes the last page in bodypart to have its header removed. 3. \chapter{\TeX} causes bookmarks from bodymatter to be located before bookmarks from frontmatter. I have tested this file against ConTeXt from TeX Live 2013 (2013.05.28 00:36), ConTeXt Suite stable (2014.01.03 00:40), and latest beta (2014.04.06 13:09). Except issue 3 and ConTeXt from TeX Live 2013, all three versions suffer from these issues. Could you fix these issues? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] Set two symbols in relative coordinates
Just remembering this. If it is really impossible, I will try another way. Thanks! Huseyin ___ 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 ___
Re: [NTG-context] Bug in ligature lookup
Just remembering. Is it possible to fix this bug? Thanks! Huseyin ___ 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 ___